|
static PX_PHYSX_COMMON_API bool | sweep (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) |
| Sweep a specified geometry object in space and test for collision with a given object. More...
|
|
static PX_PHYSX_COMMON_API bool | overlap (const PxGeometry &geom0, const PxTransform &pose0, const PxGeometry &geom1, const PxTransform &pose1) |
| Overlap test for two geometry objects. More...
|
|
static PX_PHYSX_COMMON_API PxU32 | raycast (const PxVec3 &origin, const PxVec3 &unitDir, const PxGeometry &geom, const PxTransform &pose, PxReal maxDist, PxHitFlags hitFlags, PxU32 maxHits, PxRaycastHit *PX_RESTRICT rayHits) |
| Raycast test against a geometry object. More...
|
|
static PX_PHYSX_COMMON_API bool | computePenetration (PxVec3 &direction, PxF32 &depth, const PxGeometry &geom0, const PxTransform &pose0, const PxGeometry &geom1, const PxTransform &pose1) |
| Compute minimum translational distance (MTD) between two geometry objects. More...
|
|
static PX_PHYSX_COMMON_API PxReal | pointDistance (const PxVec3 &point, const PxGeometry &geom, const PxTransform &pose, PxVec3 *closestPoint=NULL) |
| Computes distance between a point and a geometry object. More...
|
|
static PX_PHYSX_COMMON_API PxBounds3 | getWorldBounds (const PxGeometry &geom, const PxTransform &pose, float inflation=1.01f) |
| get the bounds for a geometry object More...
|
|
static PX_PHYSX_COMMON_API bool | isValid (const PxGeometry &geom) |
| Checks if provided geometry is valid. More...
|
|
Collection of geometry object queries (sweeps, raycasts, overlaps, ...).
Compute minimum translational distance (MTD) between two geometry objects.
All combinations of geom objects are supported except:
- plane/plane
- plane/mesh
- plane/heightfield
- mesh/mesh
- mesh/heightfield
- heightfield/heightfield
The function returns a unit vector ('direction') and a penetration depth ('depth').
The depenetration vector D = direction * depth should be applied to the first object, to get out of the second object.
Returned depth should always be positive or null.
If objects do not overlap, the function can not compute the MTD and returns false.
- Parameters
-
[out] | direction | Computed MTD unit direction |
[out] | depth | Penetration depth. Always positive or null. |
[in] | geom0 | The first geometry object |
[in] | pose0 | Pose of the first geometry object |
[in] | geom1 | The second geometry object |
[in] | pose1 | Pose of the second geometry object |
- Returns
- True if the MTD has successfully been computed, i.e. if objects do overlap.
- See also
- PxGeometry PxTransform