Classes | Macros | Typedefs | Functions
Extensions

Classes

class  PxSerializer
 Serialization interface class. More...
 
class  PxSerializerDefaultAdapter< T >
 Default PxSerializer implementation. More...
 
struct  PxConverterReportMode
 
class  PxBinaryConverter
 Binary converter for serialized streams. More...
 
class  PxBroadPhaseExt
 
class  PxClothFabricCooker
 
class  PxCollectionExt
 
struct  PxConstraintExtIDs
 Unique identifiers for extensions classes which implement a constraint based on PxConstraint. More...
 
struct  PxD6Axis
 Used to specify one of the degrees of freedom of a D6 joint. More...
 
struct  PxD6Motion
 Used to specify the range of motions allowed for a degree of freedom in a D6 joint. More...
 
struct  PxD6Drive
 Used to specify which axes of a D6 joint are driven. More...
 
struct  PxD6JointDriveFlag
 flags for configuring the drive model of a PxD6Joint More...
 
class  PxD6JointDrive
 parameters for configuring the drive model of a PxD6Joint More...
 
class  PxD6Joint
 A D6 joint is a general constraint between two actors. More...
 
class  PxDefaultAllocator
 default implementation of the allocator interface required by the SDK More...
 
struct  PxBufferedProfilerEvent
 Event structure for buffered profiler callback. More...
 
class  PxBufferedProfilerCallback
 A profiler callback that is called when the event buffer of a PxProfileZone fills up or is flushed. More...
 
class  PxDefaultBufferedProfiler
 Default implementation for profile event handler. More...
 
class  PxDefaultCpuDispatcher
 A default implementation for a CPU task dispatcher. More...
 
class  PxGroupsMask
 64-bit mask used for collision filtering. More...
 
struct  PxFilterOp
 Collision filtering operations. More...
 
class  PxDefaultMemoryOutputStream
 default implementation of a memory write stream More...
 
class  PxDefaultMemoryInputData
 default implementation of a memory read stream More...
 
class  PxDefaultFileOutputStream
 default implementation of a file write stream More...
 
class  PxDefaultFileInputData
 default implementation of a file read stream More...
 
struct  PxDistanceJointFlag
 flags for configuring the drive of a PxDistanceJoint More...
 
class  PxDistanceJoint
 a joint that maintains an upper or lower bound (or both) on the distance between two points on different objects More...
 
class  PxFixedJoint
 A fixed joint permits no relative movement between two bodies. ie the bodies are glued together. More...
 
struct  PxJointConcreteType
 an enumeration of PhysX' built-in joint types More...
 
struct  PxJointActorIndex
 an enumeration for specifying one or other of the actors referenced by a joint More...
 
class  PxJoint
 a base interface providing common functionality for PhysX joints More...
 
class  PxSpring
 
class  PxJointLimitParameters
 Describes the parameters for a joint limit. More...
 
class  PxJointLinearLimit
 Describes a one-sided linear limit. More...
 
class  PxJointLinearLimitPair
 Describes a two-sided limit. More...
 
class  PxJointAngularLimitPair
 
class  PxJointLimitCone
 Describes an elliptical conical joint limit. Note that very small or highly elliptical limit cones may result in jitter. More...
 
class  PxParticleExt
 
struct  PxPrismaticJointFlag
 Flags specific to the prismatic joint. More...
 
class  PxPrismaticJoint
 A prismatic joint permits relative translational movement between two bodies along an axis, but no relative rotational movement. More...
 
struct  PxRepXObject
 Helper class containing the mapping of id to object, and type name. More...
 
struct  PxRepXInstantiationArgs
 Arguments required to instantiate a serializable object from RepX. More...
 
struct  PxRevoluteJointFlag
 Flags specific to the Revolute Joint. More...
 
class  PxRevoluteJoint
 A joint which behaves in a similar way to a hinge or axle. More...
 
class  PxRigidBodyExt
 utility functions for use with PxRigidBody and subclasses More...
 
class  PxSerialization
 Utility functions for serialization. More...
 
class  PxShapeExt
 utility functions for use with PxShape More...
 
struct  PxSphericalJointFlag
 Flags specific to the spherical joint. More...
 
class  PxSphericalJoint
 A joint which behaves in a similar way to a ball and socket. More...
 
class  PxMeshOverlapUtil
 Utility class to find mesh triangles touched by a specified geometry object. More...
 
struct  PxVisualDebuggerConnectionFlag
 
class  PxVisualDebuggerExt
 

Macros

#define PX_NEW_SERIALIZER_ADAPTER(x)
 Preprocessor Macro to simplify adapter creation. More...
 
#define PX_DELETE_SERIALIZER_ADAPTER(x)   { PxSerializer* s = x; if (s) { s->~PxSerializer(); PxGetFoundation().getAllocatorCallback().deallocate(s); } }
 Preprocessor Macro to simplify adapter deletion. More...
 
#define PX_BINARY_SERIAL_VERSION   0
 

Typedefs

typedef PxFlags
< PxD6JointDriveFlag::Enum,
PxU32
PxD6JointDriveFlags
 
typedef FILE * PxFileHandle
 
typedef PxFlags
< PxDistanceJointFlag::Enum,
PxU16
PxDistanceJointFlags
 
typedef PxJointConcreteType PxJointType
 legacy joint type enumeration. DEPRECATED. Use PxJointConcreteType More...
 
typedef PxFlags
< PxPrismaticJointFlag::Enum,
PxU16
PxPrismaticJointFlags
 
typedef PxFlags
< PxRevoluteJointFlag::Enum,
PxU16
PxRevoluteJointFlags
 
typedef PxFlags
< PxSphericalJointFlag::Enum,
PxU16
PxSphericalJointFlags
 
typedef PxMeshOverlapUtil PxFindOverlapTriangleMeshUtil
 DEPRECATED typedef for backward compatibility with PhysX 3.2. More...
 
typedef physx::PxFlags
< PxVisualDebuggerConnectionFlag::Enum,
PxU32
PxVisualDebuggerConnectionFlags
 

Functions

PxClothFabricPxClothFabricCreate (PxPhysics &physics, const PxClothMeshDesc &desc, const PxVec3 &gravity, bool useGeodesicTether=true)
 Cooks a triangle mesh to a PxClothFabric. More...
 
PxD6JointPxD6JointCreate (PxPhysics &physics, PxRigidActor *actor0, const PxTransform &localFrame0, PxRigidActor *actor1, const PxTransform &localFrame1)
 Create a D6 joint. More...
 
PX_FORCE_INLINE void * platformAlignedAlloc (size_t size)
 
PX_FORCE_INLINE void platformAlignedFree (void *ptr)
 
PxDefaultBufferedProfilerPxDefaultBufferedProfilerCreate (PxFoundation &foundation, const char *profileZoneNames)
 Create default PxDefaultBufferedProfiler. More...
 
PxDefaultCpuDispatcherPxDefaultCpuDispatcherCreate (PxU32 numThreads, PxU32 *affinityMasks=NULL)
 Create default dispatcher, extensions SDK needs to be initialized first. More...
 
PxFilterFlags PxDefaultSimulationFilterShader (PxFilterObjectAttributes attributes0, PxFilterData filterData0, PxFilterObjectAttributes attributes1, PxFilterData filterData1, PxPairFlags &pairFlags, const void *constantBlock, PxU32 constantBlockSize)
 Implementation of a simple filter shader that emulates PhysX 2.8.x filtering. More...
 
bool PxGetGroupCollisionFlag (const PxU16 group1, const PxU16 group2)
 Determines if collision detection is performed between a pair of groups. More...
 
void PxSetGroupCollisionFlag (const PxU16 group1, const PxU16 group2, const bool enable)
 Specifies if collision should be performed by a pair of groups. More...
 
PxU16 PxGetGroup (const PxActor &actor)
 Retrieves the value set with PxSetGroup() More...
 
void PxSetGroup (PxActor &actor, const PxU16 collisionGroup)
 Sets which collision group this actor is part of. More...
 
void PxGetFilterOps (PxFilterOp::Enum &op0, PxFilterOp::Enum &op1, PxFilterOp::Enum &op2)
 Retrieves filtering operation. See comments for PxGroupsMask. More...
 
void PxSetFilterOps (const PxFilterOp::Enum &op0, const PxFilterOp::Enum &op1, const PxFilterOp::Enum &op2)
 Setups filtering operations. See comments for PxGroupsMask. More...
 
bool PxGetFilterBool ()
 Retrieves filtering's boolean value. See comments for PxGroupsMask. More...
 
void PxSetFilterBool (const bool enable)
 Setups filtering's boolean value. See comments for PxGroupsMask. More...
 
void PxGetFilterConstants (PxGroupsMask &c0, PxGroupsMask &c1)
 Gets filtering constant K0 and K1. See comments for PxGroupsMask. More...
 
void PxSetFilterConstants (const PxGroupsMask &c0, const PxGroupsMask &c1)
 Setups filtering's K0 and K1 value. See comments for PxGroupsMask. More...
 
PxGroupsMask PxGetGroupsMask (const PxActor &actor)
 Gets 64-bit mask used for collision filtering. See comments for PxGroupsMask. More...
 
void PxSetGroupsMask (PxActor &actor, const PxGroupsMask &mask)
 Sets 64-bit mask used for collision filtering. See comments for PxGroupsMask. More...
 
PxDistanceJointPxDistanceJointCreate (PxPhysics &physics, PxRigidActor *actor0, const PxTransform &localFrame0, PxRigidActor *actor1, const PxTransform &localFrame1)
 Create a distance Joint. More...
 
PX_C_EXPORT bool PX_CALL_CONV PxInitExtensions (physx::PxPhysics &physics)
 Initialize the PhysXExtensions library. More...
 
PX_C_EXPORT void PX_CALL_CONV PxCloseExtensions ()
 Shut down the PhysXExtensions library. More...
 
PxFixedJointPxFixedJointCreate (PxPhysics &physics, PxRigidActor *actor0, const PxTransform &localFrame0, PxRigidActor *actor1, const PxTransform &localFrame1)
 Create a fixed joint. More...
 
PX_C_EXPORT void PX_CALL_CONV PxSetJointGlobalFrame (physx::PxJoint &joint, const physx::PxVec3 *wsAnchor, const physx::PxVec3 *wsAxis)
 Helper function to setup a joint's global frame. More...
 
PxPrismaticJointPxPrismaticJointCreate (PxPhysics &physics, PxRigidActor *actor0, const PxTransform &localFrame0, PxRigidActor *actor1, const PxTransform &localFrame1)
 Create a prismatic joint. More...
 
PxRevoluteJointPxRevoluteJointCreate (PxPhysics &physics, PxRigidActor *actor0, const PxTransform &localFrame0, PxRigidActor *actor1, const PxTransform &localFrame1)
 Create a revolute joint. More...
 
PxRigidDynamicPxCreateDynamic (PxPhysics &sdk, const PxTransform &transform, const PxGeometry &geometry, PxMaterial &material, PxReal density, const PxTransform &shapeOffset=PxTransform(PxIdentity))
 simple method to create a PxRigidDynamic actor with a single PxShape. More...
 
PxRigidDynamicPxCreateDynamic (PxPhysics &sdk, const PxTransform &transform, PxShape &shape, PxReal density)
 simple method to create a PxRigidDynamic actor with a single PxShape. More...
 
PxRigidDynamicPxCreateKinematic (PxPhysics &sdk, const PxTransform &transform, const PxGeometry &geometry, PxMaterial &material, PxReal density, const PxTransform &shapeOffset=PxTransform(PxIdentity))
 simple method to create a kinematic PxRigidDynamic actor with a single PxShape. More...
 
PxRigidDynamicPxCreateKinematic (PxPhysics &sdk, const PxTransform &transform, PxShape &shape, PxReal density)
 simple method to create a kinematic PxRigidDynamic actor with a single PxShape. More...
 
PxRigidStaticPxCreateStatic (PxPhysics &sdk, const PxTransform &transform, const PxGeometry &geometry, PxMaterial &material, const PxTransform &shapeOffset=PxTransform(PxIdentity))
 simple method to create a PxRigidStatic actor with a single PxShape. More...
 
PxRigidStaticPxCreateStatic (PxPhysics &sdk, const PxTransform &transform, PxShape &shape)
 simple method to create a PxRigidStatic actor with a single PxShape. More...
 
PxRigidStaticPxCloneStatic (PxPhysics &physicsSDK, const PxTransform &transform, const PxRigidActor &actor)
 create a static body by copying attributes from another rigid actor More...
 
PxRigidDynamicPxCloneDynamic (PxPhysics &physicsSDK, const PxTransform &transform, const PxRigidDynamic &body)
 create a dynamic body by copying attributes from an existing body More...
 
PxRigidStaticPxCreatePlane (PxPhysics &sdk, const PxPlane &plane, PxMaterial &material)
 create a plane actor. The plane equation is n.x + d = 0 More...
 
void PxScaleRigidActor (PxRigidActor &actor, PxReal scale, bool scaleMassProps=true)
 scale a rigid actor by a uniform scale More...
 
PX_C_EXPORT bool PX_CALL_CONV PxBuildSmoothNormals (physx::PxU32 nbTris, physx::PxU32 nbVerts, const physx::PxVec3 *verts, const physx::PxU32 *dFaces, const physx::PxU16 *wFaces, physx::PxVec3 *normals, bool flip)
 Builds smooth vertex normals over a mesh. More...
 
PxSphericalJointPxSphericalJointCreate (PxPhysics &physics, PxRigidActor *actor0, const PxTransform &localFrame0, PxRigidActor *actor1, const PxTransform &localFrame1)
 Create a spherical joint. More...
 
PxVec3 PxComputeMeshPenetration (PxU32 maxIter, const PxGeometry &geom, const PxTransform &geomPose, const PxTriangleMeshGeometry &meshGeom, const PxTransform &meshPose, PxU32 &nb)
 Computes an approximate minimum translational distance (MTD) between a geometry object and a mesh. More...
 
PxVec3 PxComputeHeightFieldPenetration (PxU32 maxIter, const PxGeometry &geom, const PxTransform &geomPose, const PxHeightFieldGeometry &heightFieldGeom, const PxTransform &heightFieldPose, PxU32 &nb)
 Computes an approximate minimum translational distance (MTD) between a geometry object and a heightfield. More...
 

Detailed Description

Macro Definition Documentation

#define PX_BINARY_SERIAL_VERSION   0

PX_BINARY_SERIAL_VERSION is used to specify the binary data format compatibility additionally to the physics sdk version. The binary format version is defined as "PX_PHYSICS_VERSION_MAJOR.PX_PHYSICS_VERSION_MINOR.PX_PHYSICS_VERSION_BUGFIX-PX_BINARY_SERIAL_VERSION". The following binary format versions are compatible with the current physics version: 3.3.1-0 3.3.2-0 3.3.3-0 3.3.4-0

The PX_BINARY_SERIAL_VERSION for a given PhysX release is typically 0. If incompatible modifications are made to a cutomer specific branch the number should be increased.

#define PX_DELETE_SERIALIZER_ADAPTER (   x)    { PxSerializer* s = x; if (s) { s->~PxSerializer(); PxGetFoundation().getAllocatorCallback().deallocate(s); } }

Preprocessor Macro to simplify adapter deletion.

#define PX_NEW_SERIALIZER_ADAPTER (   x)
Value:
*new( PxGetFoundation().getAllocatorCallback().allocate(sizeof(PxSerializerDefaultAdapter<x>), \
"PxSerializerDefaultAdapter", __FILE__, __LINE__ )) PxSerializerDefaultAdapter<x>(#x)

Preprocessor Macro to simplify adapter creation.

Note: that the allocator used for creation needs to match with the one used in PX_DELETE_SERIALIZER_ADAPTER.

Typedef Documentation

typedef FILE* PxFileHandle

DEPRECATED typedef for backward compatibility with PhysX 3.2.

legacy joint type enumeration. DEPRECATED. Use PxJointConcreteType

See Also
PxJointConcreteType PxJoint::getType()

Function Documentation

PX_FORCE_INLINE void* platformAlignedAlloc ( size_t  size)
PX_FORCE_INLINE void platformAlignedFree ( void *  ptr)
PX_C_EXPORT bool PX_CALL_CONV PxBuildSmoothNormals ( physx::PxU32  nbTris,
physx::PxU32  nbVerts,
const physx::PxVec3 *  verts,
const physx::PxU32 dFaces,
const physx::PxU16 wFaces,
physx::PxVec3 *  normals,
bool  flip 
)

Builds smooth vertex normals over a mesh.

  • "smooth" because smoothing groups are not supported here
  • takes angles into account for correct cube normals computation

To use 32bit indices pass a pointer in dFaces and set wFaces to zero. Alternatively pass a pointer to wFaces and set dFaces to zero.

Parameters
[in]nbTrisNumber of triangles
[in]nbVertsNumber of vertices
[in]vertsArray of vertices
[in]dFacesArray of dword triangle indices, or null
[in]wFacesArray of word triangle indices, or null
[out]normalsArray of computed normals (assumes nbVerts vectors)
[in]flipFlips the normals or not
Returns
True on success.
PxRigidDynamic* PxCloneDynamic ( PxPhysics physicsSDK,
const PxTransform transform,
const PxRigidDynamic body 
)

create a dynamic body by copying attributes from an existing body

The following properties are copied:

  • shapes
  • actor flags and rigidDynamic flags
  • mass, moment of inertia, and center of mass frame
  • linear and angular velocity
  • linear and angular damping
  • maximum angular velocity
  • position and velocity solver iterations
  • sleep threshold
  • contact report threshold
  • dominance group
  • owner client and client behavior bits

The following are not copied and retain their default values:

  • name
  • joints or observers
  • aggregate or scene membership
  • sleep timer
  • user data
Note
Transforms are not copied with bit-exact accuracy.
Parameters
[in]physicsSDKPxPhysics - the physics SDK used to allocate the rigid static
[in]bodythe rigid dynamic to clone.
[in]transformthe transform of the new dynamic
Returns
the newly-created rigid static
PxRigidStatic* PxCloneStatic ( PxPhysics physicsSDK,
const PxTransform transform,
const PxRigidActor actor 
)

create a static body by copying attributes from another rigid actor

The function clones a PxRigidDynamic as a PxRigidStatic. A uniform scale is applied. The following properties are copied:

  • shapes
  • actor flags
  • owner client and client behavior bits

The following are not copied and retain their default values:

  • name
  • joints or observers
  • aggregate or scene membership
  • user data
Note
Transforms are not copied with bit-exact accuracy.
Parameters
[in]physicsSDK- the physics SDK used to allocate the rigid static
[in]actorthe rigid actor from which to take the attributes.
[in]transformthe transform of the new static.
Returns
the newly-created rigid static
PX_C_EXPORT void PX_CALL_CONV PxCloseExtensions ( )

Shut down the PhysXExtensions library.

This function should be called to cleanly shut down the PhysXExtensions library before application exit.

Note
This function is required to be called to release foundation usage.
See Also
PxInitExtensions
PxClothFabric* PxClothFabricCreate ( PxPhysics physics,
const PxClothMeshDesc desc,
const PxVec3 gravity,
bool  useGeodesicTether = true 
)

Cooks a triangle mesh to a PxClothFabric.

Parameters
physicsThe physics instance.
descThe cloth mesh descriptor on which the generation of the cooked mesh depends.
gravityA normalized vector which specifies the direction of gravity. This information allows the cooker to generate a fabric with higher quality simulation behavior.
useGeodesicTetherA flag to indicate whether to compute geodesic distance for tether constraints.
Returns
The created cloth fabric, or NULL if creation failed.
PxVec3 PxComputeHeightFieldPenetration ( PxU32  maxIter,
const PxGeometry geom,
const PxTransform geomPose,
const PxHeightFieldGeometry heightFieldGeom,
const PxTransform heightFieldPose,
PxU32 nb 
)

Computes an approximate minimum translational distance (MTD) between a geometry object and a heightfield.

This iterative function computes an approximate vector that can be used to depenetrate a geom object from a heightfield. Returned depenetration vector should be applied to 'geom', to get out of the heightfield.

The function works best when the amount of overlap between the geom object and the mesh is small. If the geom object's center goes inside the heightfield, backface culling usually kicks in, no overlap is detected, and the function does not compute an MTD vector.

The function early exits if no overlap is detected after a depenetration attempt. This means that if maxIter = N, the code will attempt at most N iterations but it might exit earlier if depenetration has been successful. Usually N = 4 gives good results.

Parameters
[in]maxIterMax number of iterations before returning.
[in]geomThe geometry object
[in]geomPosePose for the geometry object
[in]heightFieldGeomThe heightfield geometry
[in]heightFieldPosePose for the heightfield
[out]nbNumber of depenetrations attempts performed during the call. 0 means no overlap has been detected.
Returns
Approximate depenetration vector
See Also
PxGeometry PxTransform PxHeightFieldGeometry
PxVec3 PxComputeMeshPenetration ( PxU32  maxIter,
const PxGeometry geom,
const PxTransform geomPose,
const PxTriangleMeshGeometry meshGeom,
const PxTransform meshPose,
PxU32 nb 
)

Computes an approximate minimum translational distance (MTD) between a geometry object and a mesh.

This iterative function computes an approximate vector that can be used to depenetrate a geom object from a triangle mesh. Returned depenetration vector should be applied to 'geom', to get out of the mesh.

The function works best when the amount of overlap between the geom object and the mesh is small. If the geom object's center goes inside the mesh, backface culling usually kicks in, no overlap is detected, and the function does not compute an MTD vector.

The function early exits if no overlap is detected after a depenetration attempt. This means that if maxIter = N, the code will attempt at most N iterations but it might exit earlier if depenetration has been successful. Usually N = 4 gives good results.

Parameters
[in]maxIterMax number of iterations before returning.
[in]geomThe geometry object
[in]geomPosePose for the geometry object
[in]meshGeomThe mesh geometry
[in]meshPosePose for the mesh
[out]nbNumber of depenetrations attempts performed during the call. 0 means no overlap has been detected.
Returns
Approximate depenetration vector
See Also
PxGeometry PxTransform PxTriangleMeshGeometry
PxRigidDynamic* PxCreateDynamic ( PxPhysics sdk,
const PxTransform transform,
const PxGeometry geometry,
PxMaterial material,
PxReal  density,
const PxTransform shapeOffset = PxTransform(PxIdentity) 
)

simple method to create a PxRigidDynamic actor with a single PxShape.

Parameters
[in]sdkthe PxPhysics object
[in]transformthe global pose of the new object
[in]geometrythe geometry of the new object's shape, which must be a sphere, capsule, box or convex
[in]materialthe material for the new object's shape
[in]densitythe density of the new object. Must be greater than zero.
[in]shapeOffsetan optional offset for the new shape, defaults to identity
Returns
a new dynamic actor with the PxRigidBodyFlag, or NULL if it could not be constructed
See Also
PxRigidDynamic PxShapeFlag
PxRigidDynamic* PxCreateDynamic ( PxPhysics sdk,
const PxTransform transform,
PxShape shape,
PxReal  density 
)

simple method to create a PxRigidDynamic actor with a single PxShape.

Parameters
[in]sdkthe PxPhysics object
[in]transformthe transform of the new object
[in]shapethe shape of the new object
[in]densitythe density of the new object. Must be greater than zero.
Returns
a new dynamic actor with the PxRigidBodyFlag, or NULL if it could not be constructed
See Also
PxRigidDynamic PxShapeFlag
PxRigidDynamic* PxCreateKinematic ( PxPhysics sdk,
const PxTransform transform,
const PxGeometry geometry,
PxMaterial material,
PxReal  density,
const PxTransform shapeOffset = PxTransform(PxIdentity) 
)

simple method to create a kinematic PxRigidDynamic actor with a single PxShape.

Parameters
[in]sdkthe PxPhysics object
[in]transformthe global pose of the new object
[in]geometrythe geometry of the new object's shape
[in]materialthe material for the new object's shape
[in]densitythe density of the new object. Must be greater than zero if the object is to participate in simulation.
[in]shapeOffsetan optional offset for the new shape, defaults to identity
Note
unlike PxCreateDynamic, the geometry is not restricted to box, capsule, sphere or convex. However, kinematics of other geometry types may not participate in simulation collision and may be used only for triggers or scene queries of moving objects under animation control. In this case the density parameter will be ignored and the created shape will be set up as a scene query only shape (see PxShapeFlag::eSCENE_QUERY_SHAPE)
Returns
a new dynamic actor with the PxRigidBodyFlag::eKINEMATIC set, or NULL if it could not be constructed
See Also
PxRigidDynamic PxShapeFlag
PxRigidDynamic* PxCreateKinematic ( PxPhysics sdk,
const PxTransform transform,
PxShape shape,
PxReal  density 
)

simple method to create a kinematic PxRigidDynamic actor with a single PxShape.

Parameters
[in]sdkthe PxPhysics object
[in]transformthe global pose of the new object
[in]densitythe density of the new object. Must be greater than zero if the object is to participate in simulation.
[in]shapethe shape of the new object
Note
unlike PxCreateDynamic, the geometry is not restricted to box, capsule, sphere or convex. However, kinematics of other geometry types may not participate in simulation collision and may be used only for triggers or scene queries of moving objects under animation control. In this case the density parameter will be ignored and the created shape will be set up as a scene query only shape (see PxShapeFlag::eSCENE_QUERY_SHAPE)
Returns
a new dynamic actor with the PxRigidBodyFlag::eKINEMATIC set, or NULL if it could not be constructed
See Also
PxRigidDynamic PxShapeFlag
PxRigidStatic* PxCreatePlane ( PxPhysics sdk,
const PxPlane plane,
PxMaterial material 
)

create a plane actor. The plane equation is n.x + d = 0

Parameters
[in]sdkthe PxPhysics object
[in]planea plane of the form n.x + d = 0
[in]materialthe material for the new object's shape
Returns
a new static actor, or NULL if it could not be constructed
See Also
PxRigidStatic
PxRigidStatic* PxCreateStatic ( PxPhysics sdk,
const PxTransform transform,
const PxGeometry geometry,
PxMaterial material,
const PxTransform shapeOffset = PxTransform(PxIdentity) 
)

simple method to create a PxRigidStatic actor with a single PxShape.

Parameters
[in]sdkthe PxPhysics object
[in]transformthe global pose of the new object
[in]geometrythe geometry of the new object's shape
[in]materialthe material for the new object's shape
[in]shapeOffsetan optional offset for the new shape, defaults to identity
Returns
a new static actor, or NULL if it could not be constructed
See Also
PxRigidStatic
PxRigidStatic* PxCreateStatic ( PxPhysics sdk,
const PxTransform transform,
PxShape shape 
)

simple method to create a PxRigidStatic actor with a single PxShape.

Parameters
[in]sdkthe PxPhysics object
[in]transformthe global pose of the new object
[in]shapethe new object's shape
Returns
a new static actor, or NULL if it could not be constructed
See Also
PxRigidStatic
PxD6Joint* PxD6JointCreate ( PxPhysics physics,
PxRigidActor actor0,
const PxTransform localFrame0,
PxRigidActor actor1,
const PxTransform localFrame1 
)

Create a D6 joint.

Parameters
[in]physicsthe physics SDK
[in]actor0an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in]localFrame0the position and orientation of the joint relative to actor0
[in]actor1an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in]localFrame1the position and orientation of the joint relative to actor1
See Also
PxD6Joint
PxDefaultBufferedProfiler* PxDefaultBufferedProfilerCreate ( PxFoundation foundation,
const char *  profileZoneNames 
)

Create default PxDefaultBufferedProfiler.

Create a default buffered profiler.

Parameters
[in]foundationPxFoundation used for PxProfileZoneManager creation.
[in]profileZoneNamesSpace-separated names of PxProfileZones for which events should be reported to the callback.
Note
Example usage: PxDefaultBufferedProfilerCreate(*gFoundation, "PhysXSDK PxTaskManager");
List of PhysX SDK profile zone names: PhysXSDK, PxTaskManager, PxGpuDispatcher (for CUDA GPU events)
See Also
PxDefaultBufferedProfiler physx::PxProfileZoneManager physx::PxProfileZone
PxDefaultCpuDispatcher* PxDefaultCpuDispatcherCreate ( PxU32  numThreads,
PxU32 affinityMasks = NULL 
)

Create default dispatcher, extensions SDK needs to be initialized first.

Parameters
[in]numThreadsNumber of worker threads the dispatcher should use.
[in]affinityMasksArray with affinity mask for each thread. If not defined, default masks will be used.
Note
numThreads may be zero in which case no worker thread are initialized and simulation tasks will be executed on the thread that calls PxScene::simulate()
See Also
PxDefaultCpuDispatcher
PxFilterFlags PxDefaultSimulationFilterShader ( PxFilterObjectAttributes  attributes0,
PxFilterData  filterData0,
PxFilterObjectAttributes  attributes1,
PxFilterData  filterData1,
PxPairFlags pairFlags,
const void *  constantBlock,
PxU32  constantBlockSize 
)

Implementation of a simple filter shader that emulates PhysX 2.8.x filtering.

This shader provides the following logic:

Filter mask logic: Given the two PxFilterData structures fd0 and fd1 of two collision objects, the pair passes the filter if the following conditions are met:

1) Collision groups of the pair are enabled
2) Collision filtering equation is satisfied
See Also
PxSimulationFilterShader
PxDistanceJoint* PxDistanceJointCreate ( PxPhysics physics,
PxRigidActor actor0,
const PxTransform localFrame0,
PxRigidActor actor1,
const PxTransform localFrame1 
)

Create a distance Joint.

Parameters
[in]physicsthe physics SDK
[in]actor0an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in]localFrame0the position and orientation of the joint relative to actor0
[in]actor1an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in]localFrame1the position and orientation of the joint relative to actor1
See Also
PxDistanceJoint
PxFixedJoint* PxFixedJointCreate ( PxPhysics physics,
PxRigidActor actor0,
const PxTransform localFrame0,
PxRigidActor actor1,
const PxTransform localFrame1 
)

Create a fixed joint.

Parameters
[in]physicsthe physics SDK
[in]actor0an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in]localFrame0the position and orientation of the joint relative to actor0
[in]actor1an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in]localFrame1the position and orientation of the joint relative to actor1
See Also
PxFixedJoint
bool PxGetFilterBool ( )

Retrieves filtering's boolean value. See comments for PxGroupsMask.

Returns
flag Boolean value for filter.
See Also
PxSetFilterBool PxSetFilterConstants
void PxGetFilterConstants ( PxGroupsMask c0,
PxGroupsMask c1 
)

Gets filtering constant K0 and K1. See comments for PxGroupsMask.

Returns
the filtering constants, as a mask. See PxGroupsMask.
See Also
PxSetFilterOps PxSetFilterBool PxSetFilterConstants
void PxGetFilterOps ( PxFilterOp::Enum op0,
PxFilterOp::Enum op1,
PxFilterOp::Enum op2 
)

Retrieves filtering operation. See comments for PxGroupsMask.

Parameters
[out]op0First filter operator.
[out]op1Second filter operator.
[out]op2Third filter operator.
Returns
the filter operations requested
See Also
PxSetFilterOps PxSetFilterBool PxSetFilterConstants
PxU16 PxGetGroup ( const PxActor actor)

Retrieves the value set with PxSetGroup()

Note
Collision group is an integer between 0 and 31.
Parameters
[in]actorThe actor
Returns
The collision group this actor belongs to
See Also
PxSetGroup
bool PxGetGroupCollisionFlag ( const PxU16  group1,
const PxU16  group2 
)

Determines if collision detection is performed between a pair of groups.

Note
Collision group is an integer between 0 and 31.
Parameters
[in]group1First Group
[in]group2Second Group
Returns
True if the groups could collide
See Also
PxSetGroupCollisionFlag
PxGroupsMask PxGetGroupsMask ( const PxActor actor)

Gets 64-bit mask used for collision filtering. See comments for PxGroupsMask.

Parameters
[in]actorThe actor
Returns
The group mask for the actor.
See Also
PxSetGroupsMask()
PX_C_EXPORT bool PX_CALL_CONV PxInitExtensions ( physx::PxPhysics &  physics)

Initialize the PhysXExtensions library.

This should be called before calling any functions or methods in extensions which may require allocation.

Note
This function does not need to be called before creating a PxDefaultAllocator object.
Parameters
physicsa PxPhysics object
See Also
PxCloseExtensions PxFoundation PxPhysics
PxPrismaticJoint* PxPrismaticJointCreate ( PxPhysics physics,
PxRigidActor actor0,
const PxTransform localFrame0,
PxRigidActor actor1,
const PxTransform localFrame1 
)

Create a prismatic joint.

Parameters
[in]physicsthe physics SDK
[in]actor0an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in]localFrame0the position and orientation of the joint relative to actor0
[in]actor1an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in]localFrame1the position and orientation of the joint relative to actor1
See Also
PxPrismaticJoint
PxRevoluteJoint* PxRevoluteJointCreate ( PxPhysics physics,
PxRigidActor actor0,
const PxTransform localFrame0,
PxRigidActor actor1,
const PxTransform localFrame1 
)

Create a revolute joint.

Parameters
[in]physicsthe physics SDK
[in]actor0an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in]localFrame0the position and orientation of the joint relative to actor0
[in]actor1an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in]localFrame1the position and orientation of the joint relative to actor1
See Also
PxRevoluteJoint
void PxScaleRigidActor ( PxRigidActor actor,
PxReal  scale,
bool  scaleMassProps = true 
)

scale a rigid actor by a uniform scale

The geometry and relative positions of the actor are multiplied by the given scale value. If the actor is a rigid body or an articulation link and the scaleMassProps value is true, the mass properties are scaled assuming the density is constant: the center of mass is linearly scaled, the mass is multiplied by the cube of the scale, and the inertia tensor by the fifth power of the scale.

Parameters
[in]actora rigid actor
[in]scalethe scale by which to multiply the actor
[in]scaleMassPropswhether to scale the mass properties
void PxSetFilterBool ( const bool  enable)

Setups filtering's boolean value. See comments for PxGroupsMask.

Parameters
[in]enableBoolean value for filter.
See Also
PxSetFilterOps PxSsetFilterConstants
void PxSetFilterConstants ( const PxGroupsMask c0,
const PxGroupsMask c1 
)

Setups filtering's K0 and K1 value. See comments for PxGroupsMask.

Parameters
[in]c0The new group mask. See PxGroupsMask.
[in]c1The new group mask. See PxGroupsMask.
See Also
PxSetFilterOps PxSetFilterBool PxGetFilterConstants
void PxSetFilterOps ( const PxFilterOp::Enum op0,
const PxFilterOp::Enum op1,
const PxFilterOp::Enum op2 
)

Setups filtering operations. See comments for PxGroupsMask.

Parameters
[in]op0Filter op 0.
[in]op1Filter op 1.
[in]op2Filter op 2.
See Also
PxSetFilterBool PxSetFilterConstants
void PxSetGroup ( PxActor actor,
const PxU16  collisionGroup 
)

Sets which collision group this actor is part of.

Note
Collision group is an integer between 0 and 31.
Parameters
[in]actorThe actor
[in]collisionGroupCollision group this actor belongs to
See Also
PxGetGroup
void PxSetGroupCollisionFlag ( const PxU16  group1,
const PxU16  group2,
const bool  enable 
)

Specifies if collision should be performed by a pair of groups.

Note
Collision group is an integer between 0 and 31.
Parameters
[in]group1First Group
[in]group2Second Group
[in]enableTrue to enable collision between the groups
See Also
PxGetGroupCollisionFlag
void PxSetGroupsMask ( PxActor actor,
const PxGroupsMask mask 
)

Sets 64-bit mask used for collision filtering. See comments for PxGroupsMask.

Parameters
[in]actorThe actor
[in]maskThe group mask to set for the actor.
See Also
PxGetGroupsMask()
PX_C_EXPORT void PX_CALL_CONV PxSetJointGlobalFrame ( physx::PxJoint &  joint,
const physx::PxVec3 *  wsAnchor,
const physx::PxVec3 *  wsAxis 
)

Helper function to setup a joint's global frame.

This replaces the following functions from previous SDK versions:

void NxJointDesc::setGlobalAnchor(const NxVec3& wsAnchor); void NxJointDesc::setGlobalAxis(const NxVec3& wsAxis);

The function sets the joint's localPose using world-space input parameters.

Parameters
[in]wsAnchorGlobal frame anchor point. Range: position vector
[in]wsAxisGlobal frame axis. Range: direction vector
[in,out]jointJoint having its global frame set.
PxSphericalJoint* PxSphericalJointCreate ( PxPhysics physics,
PxRigidActor actor0,
const PxTransform localFrame0,
PxRigidActor actor1,
const PxTransform localFrame1 
)

Create a spherical joint.

Parameters
[in]physicsthe physics SDK
[in]actor0an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in]localFrame0the position and orientation of the joint relative to actor0
[in]actor1an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in]localFrame1the position and orientation of the joint relative to actor1
See Also
PxSphericalJoint


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com