PhysX SDK 3.2 API Reference: Extensions

PhysX SDK 3.2 API

Extensions

Collaboration diagram for Extensions:
PvdPhysicsCommon

Classes

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...
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...
struct  PxDistanceJointFlag
 flags for configuring the drive of a PxDistanceJoint More...
class  PxDistanceJoint
class  PxFixedJoint
 A fixed joint permits no relative movement between two bodies. ie the bodies are glued together. More...
struct  PxJointType
 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  PxJointLimitParameters
 Describes the parameters for a joint limit. More...
class  PxJointLimit
 Describes a one-sided limit. More...
class  PxJointLimitPair
 Describes a two-sided limit. More...
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  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  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  PxFindOverlapTriangleMeshUtil
struct  PxVisualDebuggerConnectionFlag
class  PxVisualDebuggerExt

Namespaces

namespace  physx
namespace  PVD

Typedefs

typedef PxFlags
< PxD6JointDriveFlag::Enum,
PxU32
PxD6JointDriveFlags
typedef PxFlags
< PxDistanceJointFlag::Enum,
PxU16
PxDistanceJointFlags
typedef PxFlags
< PxPrismaticJointFlag::Enum,
PxU16
PxPrismaticJointFlags
typedef PxFlags
< PxRevoluteJointFlag::Enum,
PxU16
PxRevoluteJointFlags
typedef PxFlags
< PxSphericalJointFlag::Enum,
PxU16
PxSphericalJointFlags
typedef physx::PxFlags
< PxVisualDebuggerConnectionFlag::Enum,
PxU32
PxVisualDebuggerConnectionFlags

Functions

PxD6JointPxD6JointCreate (PxPhysics &physics, PxRigidActor *actor0, const PxTransform &localFrame0, PxRigidActor *actor1, const PxTransform &localFrame1)
 Create a D6 joint.
 PX_FLAGS_OPERATORS (PxD6JointDriveFlag::Enum, PxU32)
PxDefaultCpuDispatcherPxDefaultCpuDispatcherCreate (PxU32 numThreads, PxU32 *affinityMasks=NULL)
 Create default dispatcher, extensions SDK needs to be initialized first.
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.
bool PxGetGroupCollisionFlag (const PxU16 group1, const PxU16 group2)
 Determines if collision detection is performed between a pair of groups.
void PxSetGroupCollisionFlag (const PxU16 group1, const PxU16 group2, const bool enable)
 Specifies if collision should be performed by a pair of shape groups.
PxU16 PxGetGroup (const PxRigidActor &actor)
 Retrieves the value set with PxSetGroup().
void PxSetGroup (const PxRigidActor &actor, const PxU16 collisionGroup)
 Sets which collision group this actor is part of.
void PxGetFilterOps (PxFilterOp::Enum &op0, PxFilterOp::Enum &op1, PxFilterOp::Enum &op2)
 Retrieves filtering operation. See comments for PxGroupsMask.
void PxSetFilterOps (const PxFilterOp::Enum &op0, const PxFilterOp::Enum &op1, const PxFilterOp::Enum &op2)
 Setups filtering operations. See comments for PxGroupsMask.
bool PxGetFilterBool ()
 Retrieves filtering's boolean value. See comments for PxGroupsMask.
void PxSetFilterBool (const bool enable)
 Setups filtering's boolean value. See comments for PxGroupsMask.
void PxGetFilterConstants (PxGroupsMask &c0, PxGroupsMask &c1)
 Gets filtering constant K0 and K1. See comments for PxGroupsMask.
void PxSetFilterConstants (const PxGroupsMask &c0, const PxGroupsMask &c1)
 Setups filtering's K0 and K1 value. See comments for PxGroupsMask.
PxGroupsMask PxGetGroupsMask (const PxRigidActor &actor)
 Gets 64-bit mask used for collision filtering. See comments for PxGroupsMask.
void PxSetGroupsMask (const PxRigidActor &actor, const PxGroupsMask &mask)
 Sets 64-bit mask used for collision filtering. See comments for PxGroupsMask.
PxDistanceJointPxDistanceJointCreate (PxPhysics &physics, PxRigidActor *actor0, const PxTransform &localFrame0, PxRigidActor *actor1, const PxTransform &localFrame1)
 Create a distance Joint.
 PX_FLAGS_OPERATORS (PxDistanceJointFlag::Enum, PxU16)
PX_C_EXPORT bool PX_CALL_CONV PxInitExtensions (physx::PxPhysics &physics)
 Initialize the PhysXExtensions library.
PX_C_EXPORT void PX_CALL_CONV PxCloseExtensions ()
 Shut down the PhysXExtensions library.
PX_C_EXPORT void PX_CALL_CONV PxDumpMetaData (physx::PxOutputStream &stream, const physx::PxPhysics &sdk)
 Dumps the SDK's meta-data to a stream.
PX_C_EXPORT void PxCollectForExportSDK (const physx::PxPhysics &sdk, physx::PxCollection &collection)
 Collects all PxPhysics-level objects for export.
PX_C_EXPORT void PxCollectForExportScene (const physx::PxScene &scene, physx::PxCollection &collection)
 Collects all PxScene-level objects for export.
PxFixedJointPxFixedJointCreate (PxPhysics &physics, PxRigidActor *actor0, const PxTransform &localFrame0, PxRigidActor *actor1, const PxTransform &localFrame1)
 Create a fixed joint.
 PX_DEFINE_TYPEINFO (PxFixedJoint, PxConcreteType::eUSER_FIXED_JOINT)
 PX_DEFINE_TYPEINFO (PxRevoluteJoint, PxConcreteType::eUSER_REVOLUTE_JOINT)
 PX_DEFINE_TYPEINFO (PxPrismaticJoint, PxConcreteType::eUSER_PRISMATIC_JOINT)
 PX_DEFINE_TYPEINFO (PxSphericalJoint, PxConcreteType::eUSER_SPHERICAL_JOINT)
 PX_DEFINE_TYPEINFO (PxDistanceJoint, PxConcreteType::eUSER_DISTANCE_JOINT)
 PX_DEFINE_TYPEINFO (PxD6Joint, PxConcreteType::eUSER_D6_JOINT)
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.
PxPrismaticJointPxPrismaticJointCreate (PxPhysics &physics, PxRigidActor *actor0, const PxTransform &localFrame0, PxRigidActor *actor1, const PxTransform &localFrame1)
 Create a prismatic joint.
 PX_FLAGS_OPERATORS (PxPrismaticJointFlag::Enum, PxU16)
PxRevoluteJointPxRevoluteJointCreate (PxPhysics &physics, PxRigidActor *actor0, const PxTransform &localFrame0, PxRigidActor *actor1, const PxTransform &localFrame1)
 Create a revolute joint.
 PX_FLAGS_OPERATORS (PxRevoluteJointFlag::Enum, PxU16)
PX_C_EXPORT
physx::PxRigidDynamic
*PX_CALL_CONV 
PxCreateDynamic (physx::PxPhysics &sdk, const physx::PxTransform &transform, const physx::PxGeometry &geometry, physx::PxMaterial &material, physx::PxReal density, const physx::PxTransform &shapeOffset=physx::PxTransform::createIdentity())
 simple method to create a PxRigidDynamic actor with a single PxShape.
PX_C_EXPORT
physx::PxRigidDynamic
*PX_CALL_CONV 
PxCreateKinematic (physx::PxPhysics &sdk, const physx::PxTransform &transform, const physx::PxGeometry &geometry, physx::PxMaterial &material, physx::PxReal density, const physx::PxTransform &shapeOffset=physx::PxTransform::createIdentity())
 simple method to create a kinematic PxRigidDynamic actor with a single PxShape.
PX_C_EXPORT
physx::PxRigidStatic
*PX_CALL_CONV 
PxCreateStatic (physx::PxPhysics &sdk, const physx::PxTransform &transform, const physx::PxGeometry &geometry, physx::PxMaterial &material, const physx::PxTransform &shapeOffset=physx::PxTransform::createIdentity())
 simple method to create a PxRigidStatic actor with a single PxShape.
PX_C_EXPORT
physx::PxRigidStatic
*PX_CALL_CONV 
PxCloneStatic (physx::PxPhysics &physicsSDK, const physx::PxTransform &transform, const physx::PxRigidActor &actor)
 create a static body by copying attributes from another rigid actor
PX_C_EXPORT
physx::PxRigidDynamic
*PX_CALL_CONV 
PxCloneDynamic (physx::PxPhysics &physicsSDK, const physx::PxTransform &transform, const physx::PxRigidDynamic &body)
 create a dynamic body by copying attributes from an existing body
PX_C_EXPORT
physx::PxRigidStatic
*PX_CALL_CONV 
PxCreatePlane (physx::PxPhysics &sdk, const physx::PxPlane &plane, physx::PxMaterial &material)
 create a plane actor. The plane equation is n.x + d = 0
PX_C_EXPORT void PX_CALL_CONV PxScaleRigidActor (physx::PxRigidActor &actor, physx::PxReal scale, bool scaleMassProps=true)
 scale a rigid actor by a uniform scale
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.
PxSphericalJointPxSphericalJointCreate (PxPhysics &physics, PxRigidActor *actor0, const PxTransform &localFrame0, PxRigidActor *actor1, const PxTransform &localFrame1)
 Create a spherical joint.
 PX_FLAGS_OPERATORS (PxSphericalJointFlag::Enum, PxU16)
 PX_FLAGS_OPERATORS (PxVisualDebuggerConnectionFlag::Enum, PxU32)

Typedef Documentation


Function Documentation

PX_DEFINE_TYPEINFO ( PxD6Joint  ,
PxConcreteType::eUSER_D6_JOINT   
)

PX_DEFINE_TYPEINFO ( PxDistanceJoint  ,
PxConcreteType::eUSER_DISTANCE_JOINT   
)

PX_DEFINE_TYPEINFO ( PxSphericalJoint  ,
PxConcreteType::eUSER_SPHERICAL_JOINT   
)

PX_DEFINE_TYPEINFO ( PxPrismaticJoint  ,
PxConcreteType::eUSER_PRISMATIC_JOINT   
)

PX_DEFINE_TYPEINFO ( PxRevoluteJoint  ,
PxConcreteType::eUSER_REVOLUTE_JOINT   
)

PX_DEFINE_TYPEINFO ( PxFixedJoint  ,
PxConcreteType::eUSER_FIXED_JOINT   
)

PX_FLAGS_OPERATORS ( PxVisualDebuggerConnectionFlag::Enum  ,
PxU32   
)

PX_FLAGS_OPERATORS ( PxSphericalJointFlag::Enum  ,
PxU16   
)

PX_FLAGS_OPERATORS ( PxRevoluteJointFlag::Enum  ,
PxU16   
)

PX_FLAGS_OPERATORS ( PxPrismaticJointFlag::Enum  ,
PxU16   
)

PX_FLAGS_OPERATORS ( PxDistanceJointFlag::Enum  ,
PxU16   
)

PX_FLAGS_OPERATORS ( PxD6JointDriveFlag::Enum  ,
PxU32   
)

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] nbTris Number of triangles
[in] nbVerts Number of vertices
[in] verts Array of vertices
[in] dFaces Array of dword triangle indices, or null
[in] wFaces Array of word triangle indices, or null
[out] normals Array of computed normals (assumes nbVerts vectors)
[in] flip Flips the normals or not
Returns:
True on success.

PX_C_EXPORT physx::PxRigidDynamic* PX_CALL_CONV PxCloneDynamic ( physx::PxPhysics &  physicsSDK,
const physx::PxTransform &  transform,
const physx::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] physicsSDK PxPhysics - the physics SDK used to allocate the rigid static
[in] body the rigid dynamic to clone.
[in] transform the transform of the new dynamic
Returns:
returns the newly-created rigid static

PX_C_EXPORT physx::PxRigidStatic* PX_CALL_CONV PxCloneStatic ( physx::PxPhysics &  physicsSDK,
const physx::PxTransform &  transform,
const physx::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] actor the rigid actor from which to take the attributes.
[in] transform the transform of the new static.
Returns:
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 currently not required to be called, but is reserved for cleanup in future uses of the PhysXExtensions library.
See also:
PxInitExtensions

PX_C_EXPORT void PxCollectForExportScene ( const physx::PxScene &  scene,
physx::PxCollection &  collection 
)

Collects all PxScene-level objects for export.

This function adds all objects managed by the PxScene object to the input collection, which can then be serialized. Collected objects include actors, constraints, articulations and aggregates.

This is a helper function to easily enumerate all objects managed by PxScene, but using it is not mandatory. Users can also manually add a subset of those objects to the collection.

Parameters:
[in] scene Scene to retrieve the objects from. See PxScene
[out] collection Collection to which objects will be added. See PxCollection
See also:
PxCollection

PX_C_EXPORT void PxCollectForExportSDK ( const physx::PxPhysics &  sdk,
physx::PxCollection &  collection 
)

Collects all PxPhysics-level objects for export.

This function adds all objects managed by the PxPhysics object to the input collection, which can then be serialized. Collected objects include materials, convex meshes, triangle meshes, and heightfields.

This is a helper function to easily enumerate all objects managed by PxPhysics, but using it is not mandatory. Users can also manually add a subset of those objects to the collection.

Parameters:
[in] sdk Physics SDK to retrieve the objects from. See PxPhysics
[out] collection Collection to which objects will be added. See PxCollection
See also:
PxCollection

PX_C_EXPORT physx::PxRigidDynamic* PX_CALL_CONV PxCreateDynamic ( physx::PxPhysics &  sdk,
const physx::PxTransform &  transform,
const physx::PxGeometry &  geometry,
physx::PxMaterial &  material,
physx::PxReal  density,
const physx::PxTransform &  shapeOffset = physx::PxTransform::createIdentity() 
)

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

Parameters:
[in] sdk the PxPhysics object
[in] transform the global pose of the new object
[in] geometry the geometry of the new object's shape, which must be a sphere, capsule, box or convex
[in] material the material for the new object's shape
[in] density the density of the new object. Must be greater than zero.
[in] shapeOffset an optional offset for the new shape, defaults to identity
Returns:
a new dynamic actor with the PxRigidDynamicFlag, or NULL if it could not be constructed
See also:
PxRigidDynamic PxShapeFlag

PX_C_EXPORT physx::PxRigidDynamic* PX_CALL_CONV PxCreateKinematic ( physx::PxPhysics &  sdk,
const physx::PxTransform &  transform,
const physx::PxGeometry &  geometry,
physx::PxMaterial &  material,
physx::PxReal  density,
const physx::PxTransform &  shapeOffset = physx::PxTransform::createIdentity() 
)

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

Parameters:
[in] sdk the PxPhysics object
[in] transform the global pose of the new object
[in] geometry the geometry of the new object's shape
[in] material the material for the new object's shape
[in] density the density of the new object. Must be greater than zero if the object is to participate in simulation.
[in] shapeOffset an 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 PxRigidDynamicFlag::eKINEMATIC set, or NULL if it could not be constructed
See also:
PxRigidDynamic PxShapeFlag

PX_C_EXPORT physx::PxRigidStatic* PX_CALL_CONV PxCreatePlane ( physx::PxPhysics &  sdk,
const physx::PxPlane &  plane,
physx::PxMaterial &  material 
)

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

Parameters:
[in] sdk the PxPhysics object
[in] plane a plane of the form n.x + d = 0
[in] material the material for the new object's shape
Returns:
a new static actor, or NULL if it could not be constructed
See also:
PxRigidStatic

PX_C_EXPORT physx::PxRigidStatic* PX_CALL_CONV PxCreateStatic ( physx::PxPhysics &  sdk,
const physx::PxTransform &  transform,
const physx::PxGeometry &  geometry,
physx::PxMaterial &  material,
const physx::PxTransform &  shapeOffset = physx::PxTransform::createIdentity() 
)

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

Parameters:
[in] sdk the PxPhysics object
[in] transform the global pose of the new object
[in] geometry the geometry of the new object's shape
[in] material the material for the new object's shape
[in] shapeOffset an 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

PxD6Joint* PxD6JointCreate ( PxPhysics physics,
PxRigidActor actor0,
const PxTransform localFrame0,
PxRigidActor actor1,
const PxTransform localFrame1 
)

Create a D6 joint.

Parameters:
[in] physics the physics SDK
[in] actor0 an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in] localFrame0 the position and orientation of the joint relative to actor0
[in] actor1 an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in] localFrame1 the position and orientation of the joint relative to actor1
See also:
PxD6Joint

PxDefaultCpuDispatcher* PxDefaultCpuDispatcherCreate ( PxU32  numThreads,
PxU32 affinityMasks = NULL 
)

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

Parameters:
[in] numThreads Number of worker threads the dispatcher should use.
[in] affinityMasks Array with affinity mask for each thread. If not defined, default masks will be used.
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] physics the physics SDK
[in] actor0 an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in] localFrame0 the position and orientation of the joint relative to actor0
[in] actor1 an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in] localFrame1 the position and orientation of the joint relative to actor1
See also:
PxDistanceJoint

PX_C_EXPORT void PX_CALL_CONV PxDumpMetaData ( physx::PxOutputStream &  stream,
const physx::PxPhysics &  sdk 
)

Dumps the SDK's meta-data to a stream.

A meta-data file contains information about the SDK's internal classes. Such a file is needed to convert binary-serialized SDK files from one platform to another. The converter needs meta-data files for the source and target platforms to perform conversions.

PxFixedJoint* PxFixedJointCreate ( PxPhysics physics,
PxRigidActor actor0,
const PxTransform localFrame0,
PxRigidActor actor1,
const PxTransform localFrame1 
)

Create a fixed joint.

Parameters:
[in] physics the physics SDK
[in] actor0 an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in] localFrame0 the position and orientation of the joint relative to actor0
[in] actor1 an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in] localFrame1 the 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] op0 First filter operator.
[out] op1 Second filter operator.
[out] op2 Third filter operator.
Returns:
the filter operations requested
See also:
PxSetFilterOps PxSetFilterBool PxSetFilterConstants

PxU16 PxGetGroup ( const PxRigidActor actor  ) 

Retrieves the value set with PxSetGroup().

Note:
Collision group is an integer between 0 and 31.
Parameters:
[in] actor Rigid body 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] group1 First Group
[in] group2 Second Group
Returns:
True if the groups could collide
See also:
PxSetGroupCollisionFlag

PxGroupsMask PxGetGroupsMask ( const PxRigidActor actor  ) 

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

Parameters:
[in] actor Rigid body actor
Returns:
The group mask for the shape.
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:
physics a 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] physics the physics SDK
[in] actor0 an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in] localFrame0 the position and orientation of the joint relative to actor0
[in] actor1 an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in] localFrame1 the 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] physics the physics SDK
[in] actor0 an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in] localFrame0 the position and orientation of the joint relative to actor0
[in] actor1 an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in] localFrame1 the position and orientation of the joint relative to actor1
See also:
PxRevoluteJoint

PX_C_EXPORT void PX_CALL_CONV PxScaleRigidActor ( physx::PxRigidActor &  actor,
physx::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] actor a rigid actor
[in] scale the scale by which to multiply the actor
[in] scaleMassProps whether to scale the mass properties

void PxSetFilterBool ( const bool  enable  ) 

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

Parameters:
[in] enable Boolean 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] c0 The new group mask. See PxGroupsMask.
[in] c1 The 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] op0 Filter op 0.
[in] op1 Filter op 1.
[in] op2 Filter op 2.
See also:
PxSetFilterBool PxSetFilterConstants

void PxSetGroup ( const PxRigidActor 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] actor Rigid body actor
[in] collisionGroup Collision 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 shape groups.

Note:
Collision group is an integer between 0 and 31.
Parameters:
[in] group1 First Group
[in] group2 Second Group
[in] enable True to enable collision between the groups
See also:
PxGetGroupCollisionFlag

void PxSetGroupsMask ( const PxRigidActor actor,
const PxGroupsMask mask 
)

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

Parameters:
[in] actor Rigid body actor
[in] mask The group mask to set for the shape.
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] wsAnchor Global frame anchor point. Range: position vector
[in] wsAxis Global frame axis. Range: direction vector
[in,out] joint Joint 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] physics the physics SDK
[in] actor0 an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in] localFrame0 the position and orientation of the joint relative to actor0
[in] actor1 an actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
[in] localFrame1 the position and orientation of the joint relative to actor1
See also:
PxSphericalJoint



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