1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
|
<html>
<head>
<title>NVIDIA(R) PhysX(R) SDK 3.4 API Reference: PxGeometryQuery Class Reference</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK HREF="NVIDIA.css" REL="stylesheet" TYPE="text/css">
</head>
<body bgcolor="#FFFFFF">
<div id="header">
<hr class="first">
<img alt="" src="images/PhysXlogo.png" align="middle"> <br>
<center>
<a class="qindex" href="main.html">Main Page</a>
<a class="qindex" href="hierarchy.html">Class Hierarchy</a>
<a class="qindex" href="annotated.html">Compound List</a>
<a class="qindex" href="functions.html">Compound Members</a>
</center>
<hr class="second">
</div>
<!-- Generated by Doxygen 1.5.8 -->
<div class="contents">
<h1>PxGeometryQuery Class Reference<br>
<small>
[<a class="el" href="group__geomutils.html">Geomutils</a>]</small>
</h1><!-- doxytag: class="PxGeometryQuery" -->Collection of geometry object queries (sweeps, raycasts, overlaps, ...).
<a href="#_details">More...</a>
<p>
<code>#include <<a class="el" href="PxGeometryQuery_8h-source.html">PxGeometryQuery.h</a>></code>
<p>
<p>
<a href="classPxGeometryQuery-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static PX_PHYSX_COMMON_API bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxGeometryQuery.html#574970e722f882778a250c51f77b5b85">sweep</a> (const <a class="el" href="classPxVec3.html">PxVec3</a> &unitDir, const PxReal maxDist, const <a class="el" href="classPxGeometry.html">PxGeometry</a> &geom0, const <a class="el" href="classPxTransform.html">PxTransform</a> &pose0, const <a class="el" href="classPxGeometry.html">PxGeometry</a> &geom1, const <a class="el" href="classPxTransform.html">PxTransform</a> &pose1, <a class="el" href="structPxSweepHit.html">PxSweepHit</a> &sweepHit, PxHitFlags hitFlags=PxHitFlag::eDEFAULT, const PxReal inflation=0.f)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sweep a specified geometry object in space and test for collision with a given object. <a href="#574970e722f882778a250c51f77b5b85"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static PX_PHYSX_COMMON_API bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxGeometryQuery.html#62d7a791dba43d475d96a28571f585b4">overlap</a> (const <a class="el" href="classPxGeometry.html">PxGeometry</a> &geom0, const <a class="el" href="classPxTransform.html">PxTransform</a> &pose0, const <a class="el" href="classPxGeometry.html">PxGeometry</a> &geom1, const <a class="el" href="classPxTransform.html">PxTransform</a> &pose1)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Overlap test for two geometry objects. <a href="#62d7a791dba43d475d96a28571f585b4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static PX_PHYSX_COMMON_API <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxGeometryQuery.html#79e90c0d753b17536aa1b8d1f2f29baa">raycast</a> (const <a class="el" href="classPxVec3.html">PxVec3</a> &origin, const <a class="el" href="classPxVec3.html">PxVec3</a> &unitDir, const <a class="el" href="classPxGeometry.html">PxGeometry</a> &geom, const <a class="el" href="classPxTransform.html">PxTransform</a> &pose, PxReal maxDist, PxHitFlags hitFlags, <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> maxHits, <a class="el" href="structPxRaycastHit.html">PxRaycastHit</a> *PX_RESTRICT rayHits)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Raycast test against a geometry object. <a href="#79e90c0d753b17536aa1b8d1f2f29baa"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static PX_PHYSX_COMMON_API bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxGeometryQuery.html#cb75659cb117228b3ed8585250cdb65e">computePenetration</a> (<a class="el" href="classPxVec3.html">PxVec3</a> &direction, PxF32 &depth, const <a class="el" href="classPxGeometry.html">PxGeometry</a> &geom0, const <a class="el" href="classPxTransform.html">PxTransform</a> &pose0, const <a class="el" href="classPxGeometry.html">PxGeometry</a> &geom1, const <a class="el" href="classPxTransform.html">PxTransform</a> &pose1)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Compute minimum translational distance (MTD) between two geometry objects. <a href="#cb75659cb117228b3ed8585250cdb65e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static PX_PHYSX_COMMON_API PxReal </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxGeometryQuery.html#248da4b70cd35bd32d4481775b4c9821">pointDistance</a> (const <a class="el" href="classPxVec3.html">PxVec3</a> &point, const <a class="el" href="classPxGeometry.html">PxGeometry</a> &geom, const <a class="el" href="classPxTransform.html">PxTransform</a> &pose, <a class="el" href="classPxVec3.html">PxVec3</a> *closestPoint=NULL)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Computes distance between a point and a geometry object. <a href="#248da4b70cd35bd32d4481775b4c9821"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static PX_PHYSX_COMMON_API <br class="typebreak">
<a class="el" href="classPxBounds3.html">PxBounds3</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxGeometryQuery.html#ac80fbc6fd9c2315aee6dddc9c1e9795">getWorldBounds</a> (const <a class="el" href="classPxGeometry.html">PxGeometry</a> &geom, const <a class="el" href="classPxTransform.html">PxTransform</a> &pose, float inflation=1.01f)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">get the bounds for a geometry object <a href="#ac80fbc6fd9c2315aee6dddc9c1e9795"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static PX_PHYSX_COMMON_API bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxGeometryQuery.html#6d05e22a063ff742214c3ad9f48ff209">isValid</a> (const <a class="el" href="classPxGeometry.html">PxGeometry</a> &geom)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Checks if provided geometry is valid. <a href="#6d05e22a063ff742214c3ad9f48ff209"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Collection of geometry object queries (sweeps, raycasts, overlaps, ...). <hr><h2>Member Function Documentation</h2>
<a class="anchor" name="cb75659cb117228b3ed8585250cdb65e"></a><!-- doxytag: member="PxGeometryQuery::computePenetration" ref="cb75659cb117228b3ed8585250cdb65e" args="(PxVec3 &direction, PxF32 &depth, const PxGeometry &geom0, const PxTransform &pose0, const PxGeometry &geom1, const PxTransform &pose1)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static PX_PHYSX_COMMON_API bool PxGeometryQuery::computePenetration </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classPxVec3.html">PxVec3</a> & </td>
<td class="paramname"> <em>direction</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">PxF32 & </td>
<td class="paramname"> <em>depth</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxGeometry.html">PxGeometry</a> & </td>
<td class="paramname"> <em>geom0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxTransform.html">PxTransform</a> & </td>
<td class="paramname"> <em>pose0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxGeometry.html">PxGeometry</a> & </td>
<td class="paramname"> <em>geom1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxTransform.html">PxTransform</a> & </td>
<td class="paramname"> <em>pose1</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Compute minimum translational distance (MTD) between two geometry objects.
<p>
All combinations of geom objects are supported except:<ul>
<li>plane/plane</li><li>plane/mesh</li><li>plane/heightfield</li><li>mesh/mesh</li><li>mesh/heightfield</li><li>heightfield/heightfield</li></ul>
<p>
The function returns a unit vector ('direction') and a penetration depth ('depth').<p>
The depenetration vector D = direction * depth should be applied to the first object, to get out of the second object.<p>
Returned depth should always be positive or null.<p>
If objects do not overlap, the function can not compute the MTD and returns false.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>direction</em> </td><td>Computed MTD unit direction </td></tr>
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>depth</em> </td><td>Penetration depth. Always positive or null. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>geom0</em> </td><td>The first geometry object </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>pose0</em> </td><td>Pose of the first geometry object </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>geom1</em> </td><td>The second geometry object </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>pose1</em> </td><td>Pose of the second geometry object </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if the MTD has successfully been computed, i.e. if objects do overlap.</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxGeometry.html" title="A geometry object.">PxGeometry</a> <a class="el" href="classPxTransform.html" title="class representing a rigid euclidean transform as a quaternion and a vector">PxTransform</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="ac80fbc6fd9c2315aee6dddc9c1e9795"></a><!-- doxytag: member="PxGeometryQuery::getWorldBounds" ref="ac80fbc6fd9c2315aee6dddc9c1e9795" args="(const PxGeometry &geom, const PxTransform &pose, float inflation=1.01f)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static PX_PHYSX_COMMON_API <a class="el" href="classPxBounds3.html">PxBounds3</a> PxGeometryQuery::getWorldBounds </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classPxGeometry.html">PxGeometry</a> & </td>
<td class="paramname"> <em>geom</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxTransform.html">PxTransform</a> & </td>
<td class="paramname"> <em>pose</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"> <em>inflation</em> = <code>1.01f</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
get the bounds for a geometry object
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>geom</em> </td><td>The geometry object </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>pose</em> </td><td>Pose of the geometry object </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>inflation</em> </td><td>Scale factor for computed world bounds. Box extents are multiplied by this value. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The bounds of the object</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxGeometry.html" title="A geometry object.">PxGeometry</a> <a class="el" href="classPxTransform.html" title="class representing a rigid euclidean transform as a quaternion and a vector">PxTransform</a> </dd></dl>
<p>Referenced by <a class="el" href="PxShapeExt_8h-source.html#l00146">PxShapeExt::getWorldBounds()</a>.</p>
</div>
</div><p>
<a class="anchor" name="6d05e22a063ff742214c3ad9f48ff209"></a><!-- doxytag: member="PxGeometryQuery::isValid" ref="6d05e22a063ff742214c3ad9f48ff209" args="(const PxGeometry &geom)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static PX_PHYSX_COMMON_API bool PxGeometryQuery::isValid </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classPxGeometry.html">PxGeometry</a> & </td>
<td class="paramname"> <em>geom</em> </td>
<td> ) </td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Checks if provided geometry is valid.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>geom</em> </td><td>The geometry object. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if geometry is valid.</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxGeometry.html" title="A geometry object.">PxGeometry</a> <a class="el" href="classPxSphereGeometry.html" title="A class representing the geometry of a sphere.">PxSphereGeometry</a>, <a class="el" href="classPxCapsuleGeometry.html" title="Class representing the geometry of a capsule.">PxCapsuleGeometry</a>, <a class="el" href="classPxBoxGeometry.html" title="Class representing the geometry of a box.">PxBoxGeometry</a>, PxConvexGeometry </dd></dl>
</div>
</div><p>
<a class="anchor" name="62d7a791dba43d475d96a28571f585b4"></a><!-- doxytag: member="PxGeometryQuery::overlap" ref="62d7a791dba43d475d96a28571f585b4" args="(const PxGeometry &geom0, const PxTransform &pose0, const PxGeometry &geom1, const PxTransform &pose1)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static PX_PHYSX_COMMON_API bool PxGeometryQuery::overlap </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classPxGeometry.html">PxGeometry</a> & </td>
<td class="paramname"> <em>geom0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxTransform.html">PxTransform</a> & </td>
<td class="paramname"> <em>pose0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxGeometry.html">PxGeometry</a> & </td>
<td class="paramname"> <em>geom1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxTransform.html">PxTransform</a> & </td>
<td class="paramname"> <em>pose1</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Overlap test for two geometry objects.
<p>
All combinations are supported except: <ul>
<li><a class="el" href="classPxPlaneGeometry.html" title="Class describing a plane geometry.">PxPlaneGeometry</a> vs. {<a class="el" href="classPxPlaneGeometry.html" title="Class describing a plane geometry.">PxPlaneGeometry</a>, <a class="el" href="classPxTriangleMeshGeometry.html" title="Triangle mesh geometry class.">PxTriangleMeshGeometry</a>, <a class="el" href="classPxHeightFieldGeometry.html" title="Height field geometry class.">PxHeightFieldGeometry</a>} </li>
<li><a class="el" href="classPxTriangleMeshGeometry.html" title="Triangle mesh geometry class.">PxTriangleMeshGeometry</a> vs. {<a class="el" href="classPxTriangleMeshGeometry.html" title="Triangle mesh geometry class.">PxTriangleMeshGeometry</a>, <a class="el" href="classPxHeightFieldGeometry.html" title="Height field geometry class.">PxHeightFieldGeometry</a>} </li>
<li><a class="el" href="classPxHeightFieldGeometry.html" title="Height field geometry class.">PxHeightFieldGeometry</a> vs. {<a class="el" href="classPxHeightFieldGeometry.html" title="Height field geometry class.">PxHeightFieldGeometry</a>}</li>
</ul>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>geom0</em> </td><td>The first geometry object </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>pose0</em> </td><td>Pose of the first geometry object </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>geom1</em> </td><td>The second geometry object </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>pose1</em> </td><td>Pose of the second geometry object </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if the two geometry objects overlap</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxGeometry.html" title="A geometry object.">PxGeometry</a> <a class="el" href="classPxTransform.html" title="class representing a rigid euclidean transform as a quaternion and a vector">PxTransform</a> </dd></dl>
<p>Referenced by <a class="el" href="PxShapeExt_8h-source.html#l00104">PxShapeExt::overlap()</a>.</p>
</div>
</div><p>
<a class="anchor" name="248da4b70cd35bd32d4481775b4c9821"></a><!-- doxytag: member="PxGeometryQuery::pointDistance" ref="248da4b70cd35bd32d4481775b4c9821" args="(const PxVec3 &point, const PxGeometry &geom, const PxTransform &pose, PxVec3 *closestPoint=NULL)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static PX_PHYSX_COMMON_API PxReal PxGeometryQuery::pointDistance </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classPxVec3.html">PxVec3</a> & </td>
<td class="paramname"> <em>point</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxGeometry.html">PxGeometry</a> & </td>
<td class="paramname"> <em>geom</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxTransform.html">PxTransform</a> & </td>
<td class="paramname"> <em>pose</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classPxVec3.html">PxVec3</a> * </td>
<td class="paramname"> <em>closestPoint</em> = <code>NULL</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Computes distance between a point and a geometry object.
<p>
Currently supported geometry objects: box, sphere, capsule, convex.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>point</em> </td><td>The point P </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>geom</em> </td><td>The geometry object </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>pose</em> </td><td>Pose of the geometry object </td></tr>
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>closestPoint</em> </td><td>Optionally returned closest point to P on the geom object. Only valid when returned distance is strictly positive. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Square distance between the point and the geom object, or 0.0 if the point is inside the object, or -1.0 if the geometry type is not supported.</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxGeometry.html" title="A geometry object.">PxGeometry</a> <a class="el" href="classPxTransform.html" title="class representing a rigid euclidean transform as a quaternion and a vector">PxTransform</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="79e90c0d753b17536aa1b8d1f2f29baa"></a><!-- doxytag: member="PxGeometryQuery::raycast" ref="79e90c0d753b17536aa1b8d1f2f29baa" args="(const PxVec3 &origin, const PxVec3 &unitDir, const PxGeometry &geom, const PxTransform &pose, PxReal maxDist, PxHitFlags hitFlags, PxU32 maxHits, PxRaycastHit *PX_RESTRICT rayHits)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static PX_PHYSX_COMMON_API <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> PxGeometryQuery::raycast </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classPxVec3.html">PxVec3</a> & </td>
<td class="paramname"> <em>origin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxVec3.html">PxVec3</a> & </td>
<td class="paramname"> <em>unitDir</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxGeometry.html">PxGeometry</a> & </td>
<td class="paramname"> <em>geom</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxTransform.html">PxTransform</a> & </td>
<td class="paramname"> <em>pose</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">PxReal </td>
<td class="paramname"> <em>maxDist</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">PxHitFlags </td>
<td class="paramname"> <em>hitFlags</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td>
<td class="paramname"> <em>maxHits</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structPxRaycastHit.html">PxRaycastHit</a> *PX_RESTRICT </td>
<td class="paramname"> <em>rayHits</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Raycast test against a geometry object.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>origin</em> </td><td>The origin of the ray to test the geometry object against </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>unitDir</em> </td><td>Normalized direction of the ray to test the geometry object against </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>geom</em> </td><td>The geometry object to test the ray against </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>pose</em> </td><td>Pose of the geometry object </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>maxDist</em> </td><td>Maximum ray length, has to be in the [0, inf) range </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>hitFlags</em> </td><td>Specification of the kind of information to retrieve on hit. Combination of <a class="el" href="structPxHitFlag.html" title="Scene query and geometry query behavior flags.">PxHitFlag</a> flags </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>maxHits</em> </td><td>max number of returned hits = size of 'rayHits' buffer </td></tr>
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>rayHits</em> </td><td>Raycast hits information </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of hits between the ray and the geometry object</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="structPxRaycastHit.html" title="Stores results of raycast queries.">PxRaycastHit</a> <a class="el" href="classPxGeometry.html" title="A geometry object.">PxGeometry</a> <a class="el" href="classPxTransform.html" title="class representing a rigid euclidean transform as a quaternion and a vector">PxTransform</a> </dd></dl>
<p>Referenced by <a class="el" href="PxShapeExt_8h-source.html#l00085">PxShapeExt::raycast()</a>.</p>
</div>
</div><p>
<a class="anchor" name="574970e722f882778a250c51f77b5b85"></a><!-- doxytag: member="PxGeometryQuery::sweep" ref="574970e722f882778a250c51f77b5b85" args="(const PxVec3 &unitDir, const PxReal maxDist, const PxGeometry &geom0, const PxTransform &pose0, const PxGeometry &geom1, const PxTransform &pose1, PxSweepHit &sweepHit, PxHitFlags hitFlags=PxHitFlag::eDEFAULT, const PxReal inflation=0.f)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static PX_PHYSX_COMMON_API bool PxGeometryQuery::sweep </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classPxVec3.html">PxVec3</a> & </td>
<td class="paramname"> <em>unitDir</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const PxReal </td>
<td class="paramname"> <em>maxDist</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxGeometry.html">PxGeometry</a> & </td>
<td class="paramname"> <em>geom0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxTransform.html">PxTransform</a> & </td>
<td class="paramname"> <em>pose0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxGeometry.html">PxGeometry</a> & </td>
<td class="paramname"> <em>geom1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxTransform.html">PxTransform</a> & </td>
<td class="paramname"> <em>pose1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structPxSweepHit.html">PxSweepHit</a> & </td>
<td class="paramname"> <em>sweepHit</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">PxHitFlags </td>
<td class="paramname"> <em>hitFlags</em> = <code>PxHitFlag::eDEFAULT</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const PxReal </td>
<td class="paramname"> <em>inflation</em> = <code>0.f</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sweep a specified geometry object in space and test for collision with a given object.
<p>
The following combinations are supported.<p>
<ul>
<li><a class="el" href="classPxSphereGeometry.html" title="A class representing the geometry of a sphere.">PxSphereGeometry</a> vs. {<a class="el" href="classPxSphereGeometry.html" title="A class representing the geometry of a sphere.">PxSphereGeometry</a>, <a class="el" href="classPxPlaneGeometry.html" title="Class describing a plane geometry.">PxPlaneGeometry</a>, <a class="el" href="classPxCapsuleGeometry.html" title="Class representing the geometry of a capsule.">PxCapsuleGeometry</a>, <a class="el" href="classPxBoxGeometry.html" title="Class representing the geometry of a box.">PxBoxGeometry</a>, <a class="el" href="classPxConvexMeshGeometry.html" title="Convex mesh geometry class.">PxConvexMeshGeometry</a>, <a class="el" href="classPxTriangleMeshGeometry.html" title="Triangle mesh geometry class.">PxTriangleMeshGeometry</a>, <a class="el" href="classPxHeightFieldGeometry.html" title="Height field geometry class.">PxHeightFieldGeometry</a>} </li>
<li><a class="el" href="classPxCapsuleGeometry.html" title="Class representing the geometry of a capsule.">PxCapsuleGeometry</a> vs. {<a class="el" href="classPxSphereGeometry.html" title="A class representing the geometry of a sphere.">PxSphereGeometry</a>, <a class="el" href="classPxPlaneGeometry.html" title="Class describing a plane geometry.">PxPlaneGeometry</a>, <a class="el" href="classPxCapsuleGeometry.html" title="Class representing the geometry of a capsule.">PxCapsuleGeometry</a>, <a class="el" href="classPxBoxGeometry.html" title="Class representing the geometry of a box.">PxBoxGeometry</a>, <a class="el" href="classPxConvexMeshGeometry.html" title="Convex mesh geometry class.">PxConvexMeshGeometry</a>, <a class="el" href="classPxTriangleMeshGeometry.html" title="Triangle mesh geometry class.">PxTriangleMeshGeometry</a>, <a class="el" href="classPxHeightFieldGeometry.html" title="Height field geometry class.">PxHeightFieldGeometry</a>} </li>
<li><a class="el" href="classPxBoxGeometry.html" title="Class representing the geometry of a box.">PxBoxGeometry</a> vs. {<a class="el" href="classPxSphereGeometry.html" title="A class representing the geometry of a sphere.">PxSphereGeometry</a>, <a class="el" href="classPxPlaneGeometry.html" title="Class describing a plane geometry.">PxPlaneGeometry</a>, <a class="el" href="classPxCapsuleGeometry.html" title="Class representing the geometry of a capsule.">PxCapsuleGeometry</a>, <a class="el" href="classPxBoxGeometry.html" title="Class representing the geometry of a box.">PxBoxGeometry</a>, <a class="el" href="classPxConvexMeshGeometry.html" title="Convex mesh geometry class.">PxConvexMeshGeometry</a>, <a class="el" href="classPxTriangleMeshGeometry.html" title="Triangle mesh geometry class.">PxTriangleMeshGeometry</a>, <a class="el" href="classPxHeightFieldGeometry.html" title="Height field geometry class.">PxHeightFieldGeometry</a>} </li>
<li><a class="el" href="classPxConvexMeshGeometry.html" title="Convex mesh geometry class.">PxConvexMeshGeometry</a> vs. {<a class="el" href="classPxSphereGeometry.html" title="A class representing the geometry of a sphere.">PxSphereGeometry</a>, <a class="el" href="classPxPlaneGeometry.html" title="Class describing a plane geometry.">PxPlaneGeometry</a>, <a class="el" href="classPxCapsuleGeometry.html" title="Class representing the geometry of a capsule.">PxCapsuleGeometry</a>, <a class="el" href="classPxBoxGeometry.html" title="Class representing the geometry of a box.">PxBoxGeometry</a>, <a class="el" href="classPxConvexMeshGeometry.html" title="Convex mesh geometry class.">PxConvexMeshGeometry</a>, <a class="el" href="classPxTriangleMeshGeometry.html" title="Triangle mesh geometry class.">PxTriangleMeshGeometry</a>, <a class="el" href="classPxHeightFieldGeometry.html" title="Height field geometry class.">PxHeightFieldGeometry</a>}</li>
</ul>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>unitDir</em> </td><td>Normalized direction along which object geom0 should be swept </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>maxDist</em> </td><td>Maximum sweep distance, has to be in the [0, inf) range </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>geom0</em> </td><td>The geometry object to sweep. Supported geometries are <a class="el" href="classPxSphereGeometry.html" title="A class representing the geometry of a sphere.">PxSphereGeometry</a>, <a class="el" href="classPxCapsuleGeometry.html" title="Class representing the geometry of a capsule.">PxCapsuleGeometry</a>, <a class="el" href="classPxBoxGeometry.html" title="Class representing the geometry of a box.">PxBoxGeometry</a> and <a class="el" href="classPxConvexMeshGeometry.html" title="Convex mesh geometry class.">PxConvexMeshGeometry</a> </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>pose0</em> </td><td>Pose of the geometry object to sweep </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>geom1</em> </td><td>The geometry object to test the sweep against </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>pose1</em> </td><td>Pose of the geometry object to sweep against </td></tr>
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>sweepHit</em> </td><td>The sweep hit information. Only valid if this method returns true. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>hitFlags</em> </td><td>Specify which properties per hit should be computed and written to result hit array. Combination of <a class="el" href="structPxHitFlag.html" title="Scene query and geometry query behavior flags.">PxHitFlag</a> flags </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>inflation</em> </td><td>Surface of the swept shape is additively extruded in the normal direction, rounding corners and edges.</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if the swept geometry object geom0 hits the object geom1</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="structPxSweepHit.html" title="Stores results of sweep queries.">PxSweepHit</a> <a class="el" href="classPxGeometry.html" title="A geometry object.">PxGeometry</a> <a class="el" href="classPxTransform.html" title="class representing a rigid euclidean transform as a quaternion and a vector">PxTransform</a> </dd></dl>
<p>Referenced by <a class="el" href="PxShapeExt_8h-source.html#l00127">PxShapeExt::sweep()</a>.</p>
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="PxGeometryQuery_8h-source.html">PxGeometryQuery.h</a></ul>
</div>
<hr style="width: 100%; height: 2px;"><br>
Copyright © 2008-2018 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. <a href="http://www.nvidia.com ">www.nvidia.com</a>
</body>
</html>
|