#include <PxShapeExt.h>
Static Public Member Functions | |
static PX_INLINE PxTransform | getGlobalPose (const PxShape &shape, const PxRigidActor &actor) |
Retrieves the world space pose of the shape. | |
static PX_INLINE PxU32 | raycast (const PxShape &shape, const PxRigidActor &actor, const PxVec3 &rayOrigin, const PxVec3 &rayDir, PxReal maxDist, PxHitFlags hitFlags, PxU32 maxHits, PxRaycastHit *rayHits) |
Raycast test against the shape. | |
static PX_INLINE bool | overlap (const PxShape &shape, const PxRigidActor &actor, const PxGeometry &otherGeom, const PxTransform &otherGeomPose) |
Test overlap between the shape and a geometry object. | |
static PX_INLINE bool | sweep (const PxShape &shape, const PxRigidActor &actor, const PxVec3 &unitDir, const PxReal distance, const PxGeometry &otherGeom, const PxTransform &otherGeomPose, PxSweepHit &sweepHit, PxHitFlags hitFlags) |
Sweep a geometry object against the shape. | |
static PX_INLINE PxBounds3 | getWorldBounds (const PxShape &shape, const PxRigidActor &actor, float inflation=1.01f) |
Retrieves the axis aligned bounding box enclosing the shape. |
static PX_INLINE PxTransform PxShapeExt::getGlobalPose | ( | const PxShape & | shape, | |
const PxRigidActor & | actor | |||
) | [inline, static] |
Retrieves the world space pose of the shape.
[in] | shape | The shape for which to get the global pose. |
[in] | actor | The actor to which the shape is attached |
References PxRigidActor::getGlobalPose(), and PxShape::getLocalPose().
static PX_INLINE PxBounds3 PxShapeExt::getWorldBounds | ( | const PxShape & | shape, | |
const PxRigidActor & | actor, | |||
float | inflation = 1.01f | |||
) | [inline, static] |
Retrieves the axis aligned bounding box enclosing the shape.
[in] | shape | the shape |
[in] | actor | the actor to which the shape is attached |
[in] | inflation | Scale factor for computed world bounds. Box extents are multiplied by this value. |
References PxGeometryHolder::any(), PxShape::getGeometry(), and PxGeometryQuery::getWorldBounds().
static PX_INLINE bool PxShapeExt::overlap | ( | const PxShape & | shape, | |
const PxRigidActor & | actor, | |||
const PxGeometry & | otherGeom, | |||
const PxTransform & | otherGeomPose | |||
) | [inline, static] |
Test overlap between the shape and a geometry object.
[in] | shape | the shape |
[in] | actor | the actor to which the shape is attached |
[in] | otherGeom | The other geometry object to test overlap with |
[in] | otherGeomPose | Pose of the other geometry object |
References PxGeometryHolder::any(), PxShape::getGeometry(), and PxGeometryQuery::overlap().
static PX_INLINE PxU32 PxShapeExt::raycast | ( | const PxShape & | shape, | |
const PxRigidActor & | actor, | |||
const PxVec3 & | rayOrigin, | |||
const PxVec3 & | rayDir, | |||
PxReal | maxDist, | |||
PxHitFlags | hitFlags, | |||
PxU32 | maxHits, | |||
PxRaycastHit * | rayHits | |||
) | [inline, static] |
Raycast test against the shape.
[in] | shape | the shape |
[in] | actor | the actor to which the shape is attached |
[in] | rayOrigin | The origin of the ray to test the geometry object against |
[in] | rayDir | The direction of the ray to test the geometry object against |
[in] | maxDist | Maximum ray length |
[in] | hitFlags | Specify which properties per hit should be computed and written to result hit array. Combination of PxHitFlag flags |
[in] | maxHits | max number of returned hits = size of 'rayHits' buffer |
[out] | rayHits | Raycast hits information |
References PxGeometryHolder::any(), PxShape::getGeometry(), and PxGeometryQuery::raycast().
static PX_INLINE bool PxShapeExt::sweep | ( | const PxShape & | shape, | |
const PxRigidActor & | actor, | |||
const PxVec3 & | unitDir, | |||
const PxReal | distance, | |||
const PxGeometry & | otherGeom, | |||
const PxTransform & | otherGeomPose, | |||
PxSweepHit & | sweepHit, | |||
PxHitFlags | hitFlags | |||
) | [inline, static] |
Sweep a geometry object against the shape.
Currently only box, sphere, capsule and convex mesh shapes are supported, i.e. the swept geometry object must be one of those types.
[in] | shape | the shape |
[in] | actor | the actor to which the shape is attached |
[in] | unitDir | Normalized direction along which the geometry object should be swept. |
[in] | distance | Sweep distance. Needs to be larger than 0. |
[in] | otherGeom | The geometry object to sweep against the shape |
[in] | otherGeomPose | Pose of the geometry object |
[out] | sweepHit | The sweep hit information. Only valid if this method returns true. |
[in] | hitFlags | Specify which properties per hit should be computed and written to result hit array. Combination of PxHitFlag flags |
References PxGeometryHolder::any(), PxShape::getGeometry(), and PxGeometryQuery::sweep().