Physics


Classes

struct  PxActorFlag
 Flags which control the behavior of an actor. More...
struct  PxActorType
 Identifies each type of actor. More...
class  PxActor
 PxActor is the base class for the main simulation objects in the physics SDK. More...
class  PxAggregate
 Class to aggregate actors into a single broad-phase entry. More...
class  PxArticulationDriveCache
 Articulation drive cache. More...
class  PxArticulation
 a tree structure of bodies connected by joints that is treated as a unit by the dynamics solver More...
struct  PxArticulationJointDriveType
 The type of joint drive to use for the articulation joint. More...
class  PxArticulationJoint
 a joint between two links in an articulation. More...
class  PxArticulationLink
 a component of an articulation that represents a rigid body More...
struct  PxBatchQueryStatus
 Batched query status. More...
struct  PxBatchQueryResult< HitType >
 Generic struct for receiving results of single query in a batch. Gets templated on hit type PxRaycastHit, PxSweepHit or PxOverlapHit. More...
struct  PxBatchQueryMemory
 Struct for PxBatchQuery memory pointers. More...
class  PxBatchQueryDesc
 Descriptor class for PxBatchQuery. More...
struct  PxBroadPhaseType
 Broad phase algorithm used in the simulation. More...
class  PxBroadPhaseCallback
 Broad-phase callback to receive broad-phase related events. More...
struct  PxBroadPhaseRegion
 "Region of interest" for the broad-phase. More...
struct  PxBroadPhaseRegionInfo
 Information & stats structure for a region. More...
struct  PxBroadPhaseCaps
 Caps class for broad phase. More...
struct  PxConstraintFlag
 a table of function pointers for a constraint More...
struct  PxConstraintShaderTable
class  PxConstraint
 A plugin class for implementing constraints. More...
struct  Px1DConstraintFlag
 constraint row flags More...
struct  PxConstraintSolveHint
 constraint type hints which the solver uses to optimize constraint handling More...
struct  Px1DConstraint
 A constraint. More...
struct  PxConstraintVisualizationFlag
 Flags for determining which components of the constraint should be visualized. More...
struct  PxConstraintInvMassScale
class  PxConstraintVisualizer
struct  PxPvdUpdateType
class  PxConstraintConnector
 This class connects a custom constraint to the SDK. More...
class  PxContactSet
 An array of contact points, as passed to contact modification. More...
class  PxContactModifyPair
 An array of instances of this class is passed to PxContactModifyCallback::onContactModify(). More...
class  PxContactModifyCallback
 An interface class that the user can implement in order to modify contact constraints. More...
class  PxCCDContactModifyCallback
 An interface class that the user can implement in order to modify CCD contact constraints. More...
struct  PxDeletionEventFlag
 Flags specifying deletion event types. More...
class  PxDeletionListener
 interface to get notification on object deletion More...
struct  PxPairFlag
 Collection of flags describing the actions to take for a collision pair. More...
struct  PxFilterFlag
 Collection of flags describing the filter actions to take for a collision pair. More...
struct  PxFilterData
 PxFilterData is user-definable data which gets passed into the collision filtering shader and/or callback. More...
struct  PxFilterObjectType
 Identifies each type of filter object. More...
struct  PxFilterObjectFlag
class  PxSimulationFilterCallback
 Filter callback to specify handling of collision pairs. More...
struct  PxFilterInfo
struct  PxPairFilteringMode
struct  PxForceMode
 Parameter to addForce() and addTorque() calls, determines the exact operation that is carried out. More...
struct  PxDataAccessFlag
class  PxLockedData
 Parent class for bulk data that is shared between the SDK and the application. More...
struct  PxMaterialFlag
 Flags which control the behavior of a material. More...
struct  PxCombineMode
 enumeration that determines the way in which two material properties will be combined to yield a friction or restitution coefficient for a collision. More...
class  PxMaterial
 Material class to represent a set of surface properties. More...
class  PxPhysics
 Abstract singleton factory class used for instancing objects in the Physics SDK. More...
class  PxPruningStructure
 A precomputed pruning structure to accelerate scene queries against newly added actors. More...
class  PxRigidActor
 PxRigidActor represents a base class shared between dynamic and static rigid bodies in the physics SDK. More...
struct  PxRigidBodyFlag
 Collection of flags describing the behavior of a rigid body. More...
class  PxRigidBody
 PxRigidBody is a base class shared between dynamic rigid body objects. More...
struct  PxRigidDynamicLockFlag
 Collection of flags providing a mechanism to lock motion along/around a specific axis. More...
class  PxRigidDynamic
 PxRigidDynamic represents a dynamic rigid simulation object in the physics SDK. More...
class  PxRigidStatic
 PxRigidStatic represents a static rigid body simulation object in the physics SDK. More...
struct  PxActiveTransform
 Data struct for use with Active Transform Notification. Used with PxScene::getActiveTransforms(). More...
struct  PxDominanceGroupPair
 Expresses the dominance relationship of a contact. For the time being only three settings are permitted:. More...
struct  PxActorTypeFlag
 Identifies each type of actor for retrieving actors from a scene. More...
struct  PxQueryCache
 single hit cache for scene queries. More...
class  PxScene
 A scene is a collection of bodies, particle systems and constraints which can interact. More...
struct  PxPruningStructureType
 Pruning structure used to accelerate scene queries. More...
struct  PxSceneQueryUpdateMode
 Scene query update mode. More...
struct  PxFrictionType
 Enum for selecting the friction algorithm used for simulation. More...
struct  PxSceneFlag
 flags for configuring properties of the scene More...
class  PxSceneLimits
 Class used to retrieve limits(e.g. maximum number of bodies) for a scene. The limits are used as a hint to the size of the scene, not as a hard limit (i.e. it will be possible to create more objects than specified in the scene limits). More...
struct  PxgDynamicsMemoryConfig
 Sizes of pre-allocated buffers use for GPU dynamics. More...
class  PxSceneDesc
 Descriptor class for scenes. See PxScene. More...
class  PxSceneReadLock
 RAII wrapper for the PxScene read lock. More...
class  PxSceneWriteLock
 RAII wrapper for the PxScene write lock. More...
struct  PxShapeFlag
 Flags which affect the behavior of PxShapes. More...
class  PxShape
 Abstract class for collision shapes. More...
struct  PxContactPairExtraDataType
 Extra data item types for contact pairs. More...
struct  PxContactPairExtraDataItem
 Base class for items in the extra data stream of contact pairs. More...
struct  PxContactPairVelocity
 Velocities of the contact pair rigid bodies. More...
struct  PxContactPairPose
 World space actor poses of the contact pair rigid bodies. More...
struct  PxContactPairIndex
 Marker for the beginning of a new item set in the extra data stream. More...
struct  PxContactPairExtraDataIterator
 A class to iterate over a contact pair extra data stream. More...
struct  PxContactPairHeaderFlag
 Collection of flags providing information on contact report pairs. More...
struct  PxContactPairHeader
 An Instance of this class is passed to PxSimulationEventCallback.onContact(). More...
struct  PxContactPairFlag
 Collection of flags providing information on contact report pairs. More...
struct  PxContactPairPoint
 A contact point as used by contact notification. More...
struct  PxContactPair
 Contact report pair information. More...
struct  PxTriggerPairFlag
 Collection of flags providing information on trigger report pairs. More...
struct  PxTriggerPair
 Descriptor for a trigger pair. More...
struct  PxConstraintInfo
 Descriptor for a broken constraint. More...
class  PxSimulationEventCallback
 An interface class that the user can implement in order to receive simulation events. More...
class  PxSimulationStatistics
 Class used to retrieve statistics for a simulation step. More...
class  PxSpatialIndexItem
struct  PxSpatialOverlapCallback
 Callback class for overlap queries against PxSpatialIndex. More...
struct  PxSpatialLocationCallback
 Callback class for raycast and sweep queries against PxSpatialIndex. More...
class  PxSpatialIndex
 provides direct access to PhysX' Spatial Query engine More...
struct  PxVisualizationParameter
 Debug visualization parameters. More...
class  PxVolumeCache
 Volumetric cache for local collision geometry. More...
struct  PxMetaDataEntry
 Struct to store meta data definitions. More...
class  PxStringTable
 a table to manage strings. Strings allocated through this object are expected to be owned by this object. More...

Defines

#define PX_USE_PARTICLE_SYSTEM_API   1
#define PX_USE_CLOTH_API   1
#define PX_STORE_METADATA(stream, metaData)   stream.write(&metaData, sizeof(PxMetaDataEntry))
#define PX_SIZE_OF(Class, Member)   sizeof((reinterpret_cast<Class*>(0))->Member)
#define PX_DEF_BIN_METADATA_ITEM(stream, Class, type, name, flags)
 specifies a binary metadata entry for a member variable of a class
#define PX_DEF_BIN_METADATA_ITEMS(stream, Class, type, name, flags, count)
 specifies a binary metadata entry for a member array variable of a class
#define PX_DEF_BIN_METADATA_ITEMS_AUTO(stream, Class, type, name, flags)
 specifies a binary metadata entry for a member array variable of a class
#define PX_DEF_BIN_METADATA_CLASS(stream, Class)
 specifies a binary metadata entry for a class
#define PX_DEF_BIN_METADATA_VCLASS(stream, Class)
 specifies a binary metadata entry for a virtual class
#define PX_DEF_BIN_METADATA_TYPEDEF(stream, newType, oldType)
 specifies a binary metadata entry for a typedef
#define PX_DEF_BIN_METADATA_BASE_CLASS(stream, Class, BaseClass)
 specifies a binary metadata entry for declaring a base class
#define PX_DEF_BIN_METADATA_UNION(stream, Class, name)
 specifies a binary metadata entry for a union
#define PX_DEF_BIN_METADATA_UNION_TYPE(stream, Class, type, enumValue)
 specifies a binary metadata entry for a particular member type of a union
#define PX_DEF_BIN_METADATA_EXTRA_ITEM(stream, Class, type, control, align)
 specifies a binary metadata entry for extra data
#define PX_DEF_BIN_METADATA_EXTRA_ITEMS(stream, Class, type, control, count, flags, align)
 specifies a binary metadata entry for an array of extra data
#define PX_DEF_BIN_METADATA_EXTRA_ITEMS_MASKED_CONTROL(stream, Class, type, control, controlMask,count, flags, align)
 specifies a binary metadata entry for an array of extra data additional to PX_DEF_BIN_METADATA_EXTRA_ITEMS a mask can be specified to interpret the control value
#define PX_DEF_BIN_METADATA_EXTRA_ARRAY(stream, Class, type, dyn_count, align, flags)
 specifies a binary metadata entry for an array of extra data
#define PX_DEF_BIN_METADATA_EXTRA_NAME(stream, Class, control, align)
 specifies a binary metadata entry for an string of extra data
#define PX_DEF_BIN_METADATA_EXTRA_ALIGN(stream, Class, align)
 specifies a binary metadata entry declaring an extra data alignment for a class

Typedefs

typedef PxU8 PxDominanceGroup
typedef PxFlags
< PxActorFlag::Enum, PxU8 > 
PxActorFlags
 collection of set bits defined in PxActorFlag.
typedef PX_DEPRECATED
PxBatchQueryResult
< PxRaycastHit
PxRaycastQueryResult
 Convenience typedef for the result of a batched raycast query.
typedef PX_DEPRECATED
PxBatchQueryResult< PxSweepHit
PxSweepQueryResult
 Convenience typedef for the result of a batched sweep query.
typedef PX_DEPRECATED
PxBatchQueryResult
< PxOverlapHit
PxOverlapQueryResult
 Convenience typedef for the result of a batched overlap query.
typedef PxFlags
< PxConstraintFlag::Enum,
PxU16 > 
PxConstraintFlags
 constraint flags
typedef PxFlags
< Px1DConstraintFlag::Type,
PxU16 > 
Px1DConstraintFlags
typedef PxU32(* PxConstraintSolverPrep )(Px1DConstraint *constraints, PxVec3 &bodyAWorldOffset, PxU32 maxConstraints, PxConstraintInvMassScale &invMassScale, const void *constantBlock, const PxTransform &bodyAToWorld, const PxTransform &bodyBToWorld)
typedef void(* PxConstraintProject )(const void *constantBlock, PxTransform &bodyAToWorld, PxTransform &bodyBToWorld, bool projectToA)
typedef void(* PxConstraintVisualize )(PxConstraintVisualizer &visualizer, const void *constantBlock, const PxTransform &body0Transform, const PxTransform &body1Transform, PxU32 flags)
typedef PxFlags
< PxDeletionEventFlag::Enum,
PxU8 > 
PxDeletionEventFlags
 Collection of set bits defined in PxDeletionEventFlag.
typedef PxFlags
< PxPairFlag::Enum, PxU16 > 
PxPairFlags
 Bitfield that contains a set of raised flags defined in PxPairFlag.
typedef PxFlags
< PxFilterFlag::Enum, PxU16 > 
PxFilterFlags
 Bitfield that contains a set of raised flags defined in PxFilterFlag.
typedef PxU32 PxFilterObjectAttributes
 Structure which gets passed into the collision filtering shader and/or callback providing additional information on objects of a collision pair.
typedef PxFilterFlags(* PxSimulationFilterShader )(PxFilterObjectAttributes attributes0, PxFilterData filterData0, PxFilterObjectAttributes attributes1, PxFilterData filterData1, PxPairFlags &pairFlags, const void *constantBlock, PxU32 constantBlockSize)
 Filter shader to specify handling of collision pairs.
typedef PxFlags
< PxDataAccessFlag::Enum, PxU8 > 
PxDataAccessFlags
 collection of set bits defined in PxDataAccessFlag.
typedef PxFlags
< PxMaterialFlag::Enum, PxU16 > 
PxMaterialFlags
 collection of set bits defined in PxMaterialFlag.
typedef PxFlags
< PxRigidBodyFlag::Enum, PxU8 > 
PxRigidBodyFlags
 collection of set bits defined in PxRigidBodyFlag.
typedef PxFlags
< PxRigidDynamicLockFlag::Enum,
PxU16 > 
PxRigidDynamicLockFlags
typedef PxU8 PxDominanceGroup
typedef PxFlags
< PxActorTypeFlag::Enum, PxU16 > 
PxActorTypeFlags
 Collection of set bits defined in PxActorTypeFlag.
typedef PxFlags
< PxSceneFlag::Enum, PxU32
PxSceneFlags
 collection of set bits defined in PxSceneFlag.
typedef PxFlags
< PxShapeFlag::Enum, PxU8 > 
PxShapeFlags
 collection of set bits defined in PxShapeFlag.
typedef PxFlags
< PxContactPairHeaderFlag::Enum,
PxU16 > 
PxContactPairHeaderFlags
 Bitfield that contains a set of raised flags defined in PxContactPairHeaderFlag.
typedef PxFlags
< PxContactPairFlag::Enum,
PxU16 > 
PxContactPairFlags
 Bitfield that contains a set of raised flags defined in PxContactPairFlag.
typedef PxFlags
< PxTriggerPairFlag::Enum,
PxU8 > 
PxTriggerPairFlags
 Bitfield that contains a set of raised flags defined in PxTriggerPairFlag.
typedef PxU32 PxSpatialIndexItemId

Functions

PX_INLINE PxFilterObjectType::Enum PxGetFilterObjectType (PxFilterObjectAttributes attr)
 Extract filter object type from the filter attributes of a collision pair object.
PX_INLINE bool PxFilterObjectIsKinematic (PxFilterObjectAttributes attr)
 Specifies whether the collision object belongs to a kinematic rigid body.
PX_INLINE bool PxFilterObjectIsTrigger (PxFilterObjectAttributes attr)
 Specifies whether the collision object is a trigger shape.
PX_C_EXPORT PX_PHYSX_CORE_API
void PX_CALL_CONV 
PxRegisterArticulations (physx::PxPhysics &physics)
 Enables the usage of the articulations feature. This function is called automatically inside PxCreatePhysics(). On resource constrained platforms, it is possible to call PxCreateBasePhysics() and then NOT call this function to save on code memory if your application does not use articulations. In this case the linker should strip out the relevant implementation code from the library. If you need to use articulations but not some other optional component, you shoud call PxCreateBasePhysics() followed by this call.
PX_C_EXPORT PX_PHYSX_CORE_API
void PX_CALL_CONV 
PxRegisterHeightFields (physx::PxPhysics &physics)
 Enables the usage of the heightfield feature.
PX_DEPRECATED PX_C_EXPORT
PX_PHYSX_CORE_API void
PX_CALL_CONV 
PxRegisterLegacyHeightFields (physx::PxPhysics &physics)
 Enables the usage of the legacy heightfield feature.
PX_DEPRECATED PX_INLINE void
PX_CALL_CONV 
PxRegisterUnifiedHeightFields (physx::PxPhysics &physics)
 Enables the usage of the unified heightfield feature.
PX_DEPRECATED PX_C_EXPORT
PX_PHYSX_CORE_API void
PX_CALL_CONV 
PxRegisterCloth (physx::PxPhysics &physics)
 Enables the usage of the cloth feature. This function is called automatically inside PxCreatePhysics(). On resource constrained platforms, it is possible to call PxCreateBasePhysics() and then NOT call this function to save on code memory if your application does not use cloth. In this case the linker should strip out the relevant implementation code from the library. If you need to use cloth but not some other optional component, you shoud call PxCreateBasePhysics() followed by this call.
PX_DEPRECATED PX_C_EXPORT
PX_PHYSX_CORE_API void
PX_CALL_CONV 
PxRegisterParticles (physx::PxPhysics &physics)
 Enables the usage of the particles feature. This function is called automatically inside PxCreatePhysics(). (deprecated) On resource constrained platforms, it is possible to call PxCreateBasePhysics() and then NOT call this function to save on code memory if your application does not use particles. In this case the linker should strip out the relevant implementation code from the library. If you need to use particles but not some other optional component, you shoud call PxCreateBasePhysics() followed by this call.
PX_C_EXPORT PX_PHYSX_CORE_API
physx::PxPhysics *PX_CALL_CONV 
PxCreateBasePhysics (physx::PxU32 version, physx::PxFoundation &foundation, const physx::PxTolerancesScale &scale, bool trackOutstandingAllocations=false, physx::PxPvd *pvd=NULL)
 Creates an instance of the physics SDK with minimal additional components registered.
PX_INLINE physx::PxPhysics * PxCreatePhysics (physx::PxU32 version, physx::PxFoundation &foundation, const physx::PxTolerancesScale &scale, bool trackOutstandingAllocations=false, physx::PxPvd *pvd=NULL)
 Creates an instance of the physics SDK.
PX_C_EXPORT PX_PHYSX_CORE_API
physx::PxPhysics &PX_CALL_CONV 
PxGetPhysics ()
 Retrieves the Physics SDK after it has been created.
PX_DEPRECATED
PX_PHYSX_CORE_API
PxSpatialIndex
PxCreateSpatialIndex ()
 Creates a spatial index.
PX_INLINE PxBatchQueryDesc::PxBatchQueryDesc (PxU32 maxRaycastsPerExecute, PxU32 maxSweepsPerExecute, PxU32 maxOverlapsPerExecute)
 Construct a batch query with specified maximum number of queries per batch.
PX_INLINE bool PxBatchQueryDesc::isValid () const
PX_INLINE PxSceneLimits::PxSceneLimits ()
 constructor sets to default
PX_INLINE void PxSceneLimits::setToDefault ()
 (re)sets the structure to the default
PX_INLINE bool PxSceneLimits::isValid () const
 Returns true if the descriptor is valid.
PX_INLINE PxSceneDesc::PxSceneDesc (const PxTolerancesScale &scale)
 constructor sets to default.
PX_INLINE void PxSceneDesc::setToDefault (const PxTolerancesScale &scale)
 (re)sets the structure to the default.
PX_INLINE bool PxSceneDesc::isValid () const
 Returns true if the descriptor is valid.
PX_INLINE PxU32 PxContactPair::extractContacts (PxContactPairPoint *userBuffer, PxU32 bufferSize) const
 Extracts the contact points from the stream and stores them in a convenient format.
PX_INLINE void PxContactPair::bufferContacts (PxContactPair *newPair, PxU8 *bufferMemory) const
 Helper method to clone the contact pair and copy the contact data stream into a user buffer.
PX_INLINE const PxU32PxContactPair::getInternalFaceIndices () const

Variables

struct Px1DConstraint PX_ALIGN_SUFFIX
 A constraint.
static const PxU32 INVALID_FILTER_PAIR_INDEX = 0xffffffff
static const PxSpatialIndexItemId PX_SPATIAL_INDEX_INVALID_ITEM_ID = 0xffffffff

Detailed Description

Configuration include file for PhysX SDK

Define Documentation

#define PX_DEF_BIN_METADATA_BASE_CLASS ( stream,
Class,
BaseClass   ) 

Value:

{ \
        Class* myClass = reinterpret_cast<Class*>(42);                                                          \
        BaseClass* s = static_cast<BaseClass*>(myClass);                                                        \
        const PxU32 offset = PxU32(size_t(s) - size_t(myClass));                                                \
        PxMetaDataEntry tmp = { #Class, #BaseClass, offset, sizeof(Class), 0, 0, PxMetaDataFlag::eCLASS, 0 };   \
        PX_STORE_METADATA(stream, tmp);                                                                         \
    }
specifies a binary metadata entry for declaring a base class

#define PX_DEF_BIN_METADATA_CLASS ( stream,
Class   ) 

Value:

{ \
        PxMetaDataEntry tmp = { #Class, 0, 0, sizeof(Class), 0, 0, PxMetaDataFlag::eCLASS, 0 }; \
        PX_STORE_METADATA(stream, tmp); \
    }
specifies a binary metadata entry for a class

#define PX_DEF_BIN_METADATA_EXTRA_ALIGN ( stream,
Class,
align   ) 

Value:

{ \
        PxMetaDataEntry tmp = { "PxU8", "Alignment", 0, 0, 0, 0, PxMetaDataFlag::eEXTRA_DATA|PxMetaDataFlag::eALIGNMENT, align}; \
        PX_STORE_METADATA(stream, tmp); \
    }
specifies a binary metadata entry declaring an extra data alignment for a class

#define PX_DEF_BIN_METADATA_EXTRA_ARRAY ( stream,
Class,
type,
dyn_count,
align,
flags   ) 

Value:

{ \
        PxMetaDataEntry tmp = { #type, 0, PxU32(PX_OFFSET_OF_RT(Class, dyn_count)), PX_SIZE_OF(Class, dyn_count), align, 0, \
                            PxMetaDataFlag::eEXTRA_DATA|flags, align }; \
        PX_STORE_METADATA(stream, tmp); \
    }
specifies a binary metadata entry for an array of extra data

similar to PX_DEF_BIN_METADATA_EXTRA_ITEMS, but supporting no control - PxMetaDataFlag::ePTR is also not supported

#define PX_DEF_BIN_METADATA_EXTRA_ITEM ( stream,
Class,
type,
control,
align   ) 

Value:

{ \
        PxMetaDataEntry tmp = { #type, 0, PxU32(PX_OFFSET_OF_RT(Class, control)), sizeof(type), 0, PxU32(PX_SIZE_OF(Class, control)), \
                            PxMetaDataFlag::eEXTRA_DATA|PxMetaDataFlag::eEXTRA_ITEM, align }; \
        PX_STORE_METADATA(stream, tmp); \
    }
specifies a binary metadata entry for extra data

#define PX_DEF_BIN_METADATA_EXTRA_ITEMS ( stream,
Class,
type,
control,
count,
flags,
align   ) 

Value:

{ \
        PxMetaDataEntry tmp = { #type, 0, PxU32(PX_OFFSET_OF_RT(Class, control)), PxU32(PX_SIZE_OF(Class, control)), \
                            PxU32(PX_OFFSET_OF_RT(Class, count)), PxU32(PX_SIZE_OF(Class, count)), \
                            PxMetaDataFlag::eEXTRA_DATA|PxMetaDataFlag::eEXTRA_ITEMS|flags, align }; \
        PX_STORE_METADATA(stream, tmp); \
    }
specifies a binary metadata entry for an array of extra data

#define PX_DEF_BIN_METADATA_EXTRA_ITEMS_MASKED_CONTROL ( stream,
Class,
type,
control,
controlMask,
count,
flags,
align   ) 

Value:

{ \
        PxMetaDataEntry tmp = { #type, 0, PxU32(PX_OFFSET_OF_RT(Class, control)), PxU32(PX_SIZE_OF(Class, control)), \
                            PxU32(PX_OFFSET_OF_RT(Class, count)), PxU32(PX_SIZE_OF(Class, count)), \
                            PxMetaDataFlag::eCONTROL_MASK|PxMetaDataFlag::eEXTRA_DATA|PxMetaDataFlag::eEXTRA_ITEMS|flags|(controlMask & PxMetaDataFlag::eCONTROL_MASK_RANGE) << 16, \
                            align}; \
        PX_STORE_METADATA(stream, tmp); \
    }
specifies a binary metadata entry for an array of extra data additional to PX_DEF_BIN_METADATA_EXTRA_ITEMS a mask can be specified to interpret the control value

See also:
PxMetaDataFlag::eCONTROL_MASK

#define PX_DEF_BIN_METADATA_EXTRA_NAME ( stream,
Class,
control,
align   ) 

Value:

{ \
        PxMetaDataEntry tmp = { "char", "string", 0, 0, 0, 0, PxMetaDataFlag::eEXTRA_DATA|PxMetaDataFlag::eEXTRA_NAME, align }; \
        PX_STORE_METADATA(stream, tmp); \
    }
specifies a binary metadata entry for an string of extra data

#define PX_DEF_BIN_METADATA_ITEM ( stream,
Class,
type,
name,
flags   ) 

Value:

{ \
        PxMetaDataEntry tmp = { #type, #name, PxU32(PX_OFFSET_OF_RT(Class, name)), PX_SIZE_OF(Class, name), \
                                1, 0, flags, 0}; \
        PX_STORE_METADATA(stream, tmp); \
    }
specifies a binary metadata entry for a member variable of a class

#define PX_DEF_BIN_METADATA_ITEMS ( stream,
Class,
type,
name,
flags,
count   ) 

Value:

{ \
        PxMetaDataEntry tmp = { #type, #name, PxU32(PX_OFFSET_OF_RT(Class, name)), PX_SIZE_OF(Class, name), \
                            count, 0, flags, 0}; \
        PX_STORE_METADATA(stream, tmp); \
    }
specifies a binary metadata entry for a member array variable of a class

similar to PX_DEF_BIN_METADATA_ITEMS_AUTO but for cases with mismatch between specified type and array type

#define PX_DEF_BIN_METADATA_ITEMS_AUTO ( stream,
Class,
type,
name,
flags   ) 

Value:

{ \
        PxMetaDataEntry tmp = { #type, #name, PxU32(PX_OFFSET_OF_RT(Class, name)), PX_SIZE_OF(Class, name), \
                            sizeof((reinterpret_cast<Class*>(0))->name)/sizeof(type), 0, flags, 0}; \
                            PX_STORE_METADATA(stream, tmp); \
    }
specifies a binary metadata entry for a member array variable of a class

similar to PX_DEF_BIN_METADATA_ITEMS but automatically detects the array length, which only works when the specified type matches the type of the array - does not support PxMetaDataFlag::ePTR

#define PX_DEF_BIN_METADATA_TYPEDEF ( stream,
newType,
oldType   ) 

Value:

{ \
        PxMetaDataEntry tmp = { #newType, #oldType, 0, 0, 0, 0, PxMetaDataFlag::eTYPEDEF, 0 }; \
        PX_STORE_METADATA(stream, tmp); \
    }
specifies a binary metadata entry for a typedef

#define PX_DEF_BIN_METADATA_UNION ( stream,
Class,
name   ) 

Value:

{ \
        PxMetaDataEntry tmp = { #Class, 0, PxU32(PX_OFFSET_OF_RT(Class, name)), PX_SIZE_OF(Class, name), \
                            1, 0, PxMetaDataFlag::eUNION, 0 }; \
        PX_STORE_METADATA(stream, tmp); \
    }
specifies a binary metadata entry for a union

#define PX_DEF_BIN_METADATA_UNION_TYPE ( stream,
Class,
type,
enumValue   ) 

Value:

{ \
        PxMetaDataEntry tmp = { #Class, #type, enumValue, 0, 0, 0, PxMetaDataFlag::eUNION, 0 }; \
        PX_STORE_METADATA(stream, tmp); \
    }
specifies a binary metadata entry for a particular member type of a union

#define PX_DEF_BIN_METADATA_VCLASS ( stream,
Class   ) 

Value:

{ \
        PxMetaDataEntry tmp = { #Class, 0, 0, sizeof(Class), 0, 0, PxMetaDataFlag::eCLASS|PxMetaDataFlag::eVIRTUAL, 0}; \
        PX_STORE_METADATA(stream, tmp); \
    }
specifies a binary metadata entry for a virtual class

#define PX_SIZE_OF ( Class,
Member   )     sizeof((reinterpret_cast<Class*>(0))->Member)

#define PX_STORE_METADATA ( stream,
metaData   )     stream.write(&metaData, sizeof(PxMetaDataEntry))

#define PX_USE_CLOTH_API   1

#define PX_USE_PARTICLE_SYSTEM_API   1


Typedef Documentation

collection of set bits defined in PxActorFlag.

See also:
PxActorFlag

Collection of set bits defined in PxActorTypeFlag.

See also:
PxActorTypeFlag

constraint flags

See also:
PxConstraintFlag

typedef void(* PxConstraintProject)(const void *constantBlock, PxTransform &bodyAToWorld, PxTransform &bodyBToWorld, bool projectToA)

solver constraint projection shader

This function is called by the constraint post-solver framework. The function must be reentrant, since it may be called simultaneously from multiple threads and should access only the arguments passed into it.

Parameters:
[in] constantBlock the constant data block
[out] bodyAToWorld The center of mass frame of the first constrained body (the identity if the actor is static or a NULL pointer was provided for it)
[out] bodyBToWorld The center of mass frame of the second constrained body (the identity if the actor is static or a NULL pointer was provided for it)
[in] projectToA true if the constraint should be projected by moving the second body towards the first, false if the converse

typedef PxU32(* PxConstraintSolverPrep)(Px1DConstraint *constraints, PxVec3 &bodyAWorldOffset, PxU32 maxConstraints, PxConstraintInvMassScale &invMassScale, const void *constantBlock, const PxTransform &bodyAToWorld, const PxTransform &bodyBToWorld)

solver constraint generation shader

This function is called by the constraint solver framework. The function must be reentrant, since it may be called simultaneously from multiple threads, and should access only the arguments passed into it.

Developers writing custom constraints are encouraged to read the documentation in the user guide and the implementation code in PhysXExtensions.

Parameters:
[out] constraints an array of solver constraint rows to be filled in
[out] bodyAWorldOffset the origin point (offset from the position vector of bodyA's center of mass) at which the constraint is resolved. This value does not affect how constraints are solved, only the constraint force reported.
[in] maxConstraints the size of the constraint buffer. At most this many constraints rows may be written
[out] invMassScale the inverse mass and inertia scales for the constraint
[in] constantBlock the constant data block
[in] bodyAToWorld The center of mass frame of the first constrained body (the identity transform if the first actor is static, or if a NULL actor pointer was provided for it)
[in] bodyBToWorld The center of mass frame of the second constrained body (the identity transform if the second actor is static, or if a NULL actor pointer was provided for it)
Returns:
the number of constraint rows written.

typedef void(* PxConstraintVisualize)(PxConstraintVisualizer &visualizer, const void *constantBlock, const PxTransform &body0Transform, const PxTransform &body1Transform, PxU32 flags)

solver constraint visualization function

This function is called by the constraint post-solver framework to visualize the constraint

Parameters:
[out] visualizer The render buffer to render to
[in] constantBlock The constant data block
[in] body0Transform The center of mass frame of the first constrained body (the identity if the actor is static, or a NULL pointer was provided for it)
[in] body1Transform The center of mass frame of the second constrained body (the identity if the actor is static, or a NULL pointer was provided for it)
[in] flags The visualization flags (PxConstraintVisualizationFlag)
See also:
PxRenderBuffer

Bitfield that contains a set of raised flags defined in PxContactPairFlag.

See also:
PxContactPairFlag

Bitfield that contains a set of raised flags defined in PxContactPairHeaderFlag.

See also:
PxContactPairHeaderFlag

collection of set bits defined in PxDataAccessFlag.

See also:
PxDataAccessFlag

Collection of set bits defined in PxDeletionEventFlag.

See also:
PxDeletionEventFlag

typedef PxU8 PxDominanceGroup

typedef PxU8 PxDominanceGroup

Group index which allows to specify 1- or 2-way interaction

Bitfield that contains a set of raised flags defined in PxFilterFlag.

See also:
PxFilterFlag

Structure which gets passed into the collision filtering shader and/or callback providing additional information on objects of a collision pair.

See also:
PxSimulationFilterShader PxSimulationFilterCallback getActorType() PxFilterObjectIsKinematic() PxFilterObjectIsTrigger()

collection of set bits defined in PxMaterialFlag.

See also:
PxMaterialFlag

Convenience typedef for the result of a batched overlap query.

Bitfield that contains a set of raised flags defined in PxPairFlag.

See also:
PxPairFlag

Convenience typedef for the result of a batched raycast query.

collection of set bits defined in PxRigidBodyFlag.

See also:
PxRigidBodyFlag

collection of set bits defined in PxSceneFlag.

See also:
PxSceneFlag

collection of set bits defined in PxShapeFlag.

See also:
PxShapeFlag

typedef PxFilterFlags(* PxSimulationFilterShader)(PxFilterObjectAttributes attributes0, PxFilterData filterData0, PxFilterObjectAttributes attributes1, PxFilterData filterData1, PxPairFlags &pairFlags, const void *constantBlock, PxU32 constantBlockSize)

Filter shader to specify handling of collision pairs.

Collision filtering is a mechanism to specify how a pair of potentially colliding objects should be processed by the simulation. A pair of objects is potentially colliding if the bounding volumes of the two objects overlap. In short, a collision filter decides whether a collision pair should get processed, temporarily ignored or discarded. If a collision pair should get processed, the filter can additionally specify how it should get processed, for instance, whether contacts should get resolved, which callbacks should get invoked or which reports should be sent etc.

Note:
A default implementation of a filter shader is provided in the PhysX extensions library, see PxDefaultSimulationFilterShader.
See also:
PxSceneDesc.filterShader PxSimulationFilterCallback Filter method to specify how a pair of potentially colliding objects should be processed.Return the PxFilterFlag flags and set the PxPairFlag flags to define what the simulation should do with the given collision pair.
This methods gets called when:
  • The bounding volumes of two objects start to overlap.
  • The bounding volumes of two objects overlap and the filter data or filter attributes of one of the objects changed
  • A re-filtering was forced through resetFiltering() (see PxScene::resetFiltering())
  • Filtering is requested in scene queries
Note:
Certain pairs of objects are always ignored and this method does not get called. This is the case for the following pairs:
  • Pair of static rigid actors
  • A static rigid actor and a kinematic actor (unless one is a trigger or if explicitly enabled through PxSceneFlag::eENABLE_KINEMATIC_STATIC_PAIRS)
  • Two kinematic actors (unless one is a trigger or if explicitly enabled through PxSceneFlag::eENABLE_KINEMATIC_PAIRS)
  • Pair of particle systems
  • Two jointed rigid bodies and the joint was defined to disable collision
  • Two articulation links if connected through an articulation joint
  • Cloth objects and rigid body actors
Note:
This is a performance critical method and should be stateless. You should neither access external objects from within this method nor should you call external methods that are not inlined. If you need a more complex logic to filter a collision pair then use the filter callback mechanism for this pair (see PxSimulationFilterCallback, PxFilterFlag::eCALLBACK, PxFilterFlag::eNOTIFY).
Parameters:
[in] attributes0 The filter attribute of the first object
[in] filterData0 The custom filter data of the first object
[in] attributes1 The filter attribute of the second object
[in] filterData1 The custom filter data of the second object
[out] pairFlags Flags giving additional information on how an accepted pair should get processed
[in] constantBlock The constant global filter data (see PxSceneDesc.filterShaderData)
[in] constantBlockSize Size of the global filter data (see PxSceneDesc.filterShaderDataSize)
Returns:
Filter flags defining whether the pair should be discarded, temporarily ignored, processed and whether the filter callback should get invoked for this pair.
See also:
PxSimulationFilterCallback PxFilterData PxFilterObjectAttributes PxFilterFlag PxFilterFlags PxPairFlag PxPairFlags

Convenience typedef for the result of a batched sweep query.

Bitfield that contains a set of raised flags defined in PxTriggerPairFlag.

See also:
PxTriggerPairFlag


Function Documentation

PX_INLINE void PxContactPair::bufferContacts ( PxContactPair newPair,
PxU8 *  bufferMemory 
) const [inherited]

Helper method to clone the contact pair and copy the contact data stream into a user buffer.

The contact data stream is only accessible during the contact report callback. This helper function provides copy functionality to buffer the contact stream information such that it can get accessed at a later stage.

Parameters:
[out] newPair The contact pair info will get copied to this instance. The contact data stream pointer of the copy will be redirected to the provided user buffer. Use NULL to skip the contact pair copy operation.
[out] bufferMemory Memory block to store the contact data stream to. At most requiredBufferSize bytes will get written to the buffer.

References PxContactPair::contactCount, PxContactPair::contactImpulses, PxContactPair::contactPatches, PxContactPair::contactPoints, PxContactPair::contactStreamSize, PxContactPair::patchCount, and PxMemCopy().

PX_INLINE PxU32 PxContactPair::extractContacts ( PxContactPairPoint userBuffer,
PxU32  bufferSize 
) const [inherited]

PX_INLINE const PxU32 * PxContactPair::getInternalFaceIndices (  )  const [inherited]

PX_INLINE bool PxSceneDesc::isValid (  )  const [inherited]

PX_INLINE bool PxSceneLimits::isValid (  )  const [inherited]

Returns true if the descriptor is valid.

Returns:
true if the current settings are valid.

References PxSceneLimits::maxNbRegions.

Referenced by PxSceneDesc::isValid().

PX_INLINE bool PxBatchQueryDesc::isValid (  )  const [inherited]

PX_INLINE PxBatchQueryDesc::PxBatchQueryDesc ( PxU32  maxRaycastsPerExecute,
PxU32  maxSweepsPerExecute,
PxU32  maxOverlapsPerExecute 
) [inherited]

Construct a batch query with specified maximum number of queries per batch.

If the number of raycasts/sweeps/overlaps per execute exceeds the limit, the query will be discarded with a warning.

Parameters:
maxRaycastsPerExecute Maximum number of raycast() calls allowed before execute() call. This has to match the amount of memory allocated for PxBatchQueryMemory::userRaycastResultBuffer.
maxSweepsPerExecute Maximum number of sweep() calls allowed before execute() call. This has to match the amount of memory allocated for PxBatchQueryMemory::userSweepResultBuffer.
maxOverlapsPerExecute Maximum number of overlap() calls allowed before execute() call. This has to match the amount of memory allocated for PxBatchQueryMemory::userOverlapResultBuffer.

PX_C_EXPORT PX_PHYSX_CORE_API physx::PxPhysics* PX_CALL_CONV PxCreateBasePhysics ( physx::PxU32  version,
physx::PxFoundation &  foundation,
const physx::PxTolerancesScale &  scale,
bool  trackOutstandingAllocations = false,
physx::PxPvd *  pvd = NULL 
)

Creates an instance of the physics SDK with minimal additional components registered.

Creates an instance of this class. May not be a class member to avoid name mangling. Pass the constant PX_PHYSICS_VERSION as the argument. There may be only one instance of this class per process. Calling this method after an instance has been created already will result in an error message and NULL will be returned.

Parameters:
version Version number we are expecting(should be PX_PHYSICS_VERSION)
foundation Foundation instance (see PxFoundation)
scale values used to determine default tolerances for objects at creation time
trackOutstandingAllocations true if you want to track memory allocations so a debugger connection partway through your physics simulation will get an accurate map of everything that has been allocated so far. This could have a memory and performance impact on your simulation hence it defaults to off.
pvd When pvd points to a valid PxPvd instance (PhysX Visual Debugger), a connection to the specified PxPvd instance is created. If pvd is NULL no connection will be attempted.
Returns:
PxPhysics instance on success, NULL if operation failed
See also:
PxPhysics, PxFoundation, PxTolerancesScale, PxProfileZoneManager, PxPvd

Referenced by PxCreatePhysics().

PX_INLINE physx::PxPhysics* PxCreatePhysics ( physx::PxU32  version,
physx::PxFoundation &  foundation,
const physx::PxTolerancesScale &  scale,
bool  trackOutstandingAllocations = false,
physx::PxPvd *  pvd = NULL 
)

Creates an instance of the physics SDK.

Creates an instance of this class. May not be a class member to avoid name mangling. Pass the constant PX_PHYSICS_VERSION as the argument. There may be only one instance of this class per process. Calling this method after an instance has been created already will result in an error message and NULL will be returned.

Calling this will register all optional code modules (Articulations, HeightFields, Cloth and Particles), preparing them for use. If you do not need some of these modules, consider calling PxCreateBasePhysics() instead and registering needed modules manually. If you would like to use the unified heightfield collision code instead, it is permitted to follow this call with a call to PxRegisterUnifiedHeightFields().

Parameters:
version Version number we are expecting(should be PX_PHYSICS_VERSION)
foundation Foundation instance (see PxFoundation)
scale values used to determine default tolerances for objects at creation time
trackOutstandingAllocations true if you want to track memory allocations so a debugger connection partway through your physics simulation will get an accurate map of everything that has been allocated so far. This could have a memory and performance impact on your simulation hence it defaults to off.
pvd When pvd points to a valid PxPvd instance (PhysX Visual Debugger), a connection to the specified PxPvd instance is created. If pvd is NULL no connection will be attempted.
Returns:
PxPhysics instance on success, NULL if operation failed
See also:
PxPhysics, PxCreateBasePhysics, PxRegisterArticulations, PxRegisterHeightFields, PxRegisterCloth, PxRegisterParticles

References PxCreateBasePhysics(), PxRegisterArticulations(), PxRegisterCloth(), PxRegisterHeightFields(), and PxRegisterParticles().

PX_DEPRECATED PX_PHYSX_CORE_API PxSpatialIndex* PxCreateSpatialIndex (  ) 

Creates a spatial index.

Deprecated:
Spatial index feature has been deprecated in PhysX version 3.4
See also:
PxSpatialIndex

PX_INLINE bool PxFilterObjectIsKinematic ( PxFilterObjectAttributes  attr  ) 

Specifies whether the collision object belongs to a kinematic rigid body.

Parameters:
[in] attr The filter attribute of a collision pair object
Returns:
True if the object belongs to a kinematic rigid body, else false
See also:
PxRigidBodyFlag::eKINEMATIC

References PxFilterObjectFlag::eKINEMATIC.

PX_INLINE bool PxFilterObjectIsTrigger ( PxFilterObjectAttributes  attr  ) 

Specifies whether the collision object is a trigger shape.

Parameters:
[in] attr The filter attribute of a collision pair object
Returns:
True if the object is a trigger shape, else false
See also:
PxShapeFlag::eTRIGGER_SHAPE

References PxFilterObjectFlag::eTRIGGER.

PX_INLINE PxFilterObjectType::Enum PxGetFilterObjectType ( PxFilterObjectAttributes  attr  ) 

Extract filter object type from the filter attributes of a collision pair object.

Parameters:
[in] attr The filter attribute of a collision pair object
Returns:
The type of the collision pair object.
See also:
PxFilterObjectType

References PxFilterObjectType::eMAX_TYPE_COUNT.

PX_C_EXPORT PX_PHYSX_CORE_API physx::PxPhysics& PX_CALL_CONV PxGetPhysics (  ) 

Retrieves the Physics SDK after it has been created.

Before using this function the user must call PxCreatePhysics().

Note:
The behavior of this method is undefined if the Physics SDK instance has not been created already.

Referenced by PxRigidActorExt::createExclusiveShape().

PX_C_EXPORT PX_PHYSX_CORE_API void PX_CALL_CONV PxRegisterArticulations ( physx::PxPhysics &  physics  ) 

Enables the usage of the articulations feature. This function is called automatically inside PxCreatePhysics(). On resource constrained platforms, it is possible to call PxCreateBasePhysics() and then NOT call this function to save on code memory if your application does not use articulations. In this case the linker should strip out the relevant implementation code from the library. If you need to use articulations but not some other optional component, you shoud call PxCreateBasePhysics() followed by this call.

Referenced by PxCreatePhysics().

PX_DEPRECATED PX_C_EXPORT PX_PHYSX_CORE_API void PX_CALL_CONV PxRegisterCloth ( physx::PxPhysics &  physics  ) 

Enables the usage of the cloth feature. This function is called automatically inside PxCreatePhysics(). On resource constrained platforms, it is possible to call PxCreateBasePhysics() and then NOT call this function to save on code memory if your application does not use cloth. In this case the linker should strip out the relevant implementation code from the library. If you need to use cloth but not some other optional component, you shoud call PxCreateBasePhysics() followed by this call.

Deprecated:
The PhysX cloth feature has been deprecated in PhysX version 3.4.1

Referenced by PxCreatePhysics().

PX_C_EXPORT PX_PHYSX_CORE_API void PX_CALL_CONV PxRegisterHeightFields ( physx::PxPhysics &  physics  ) 

Enables the usage of the heightfield feature.

This call will link the default 'unified' implementation of heightfields which is identical to the narrow phase of triangle meshes. This function is called automatically inside PxCreatePhysics().

On resource constrained platforms, it is possible to call PxCreateBasePhysics() and then NOT call this function to save on code memory if your application does not use heightfields. In this case the linker should strip out the relevant implementation code from the library. If you need to use heightfield but not some other optional component, you shoud call PxCreateBasePhysics() followed by this call.

You must call this function at a time where no PxScene instance exists, typically before calling PxPhysics::createScene(). This is to prevent a change to the heightfield implementation code at runtime which would have undefined results.

Calling PxCreateBasePhysics() and then attempting to create a heightfield shape without first calling PxRegisterHeightFields(), PxRegisterUnifiedHeightFields() or PxRegisterLegacyHeightFields() will result in an error.

Referenced by PxCreatePhysics(), and PxRegisterUnifiedHeightFields().

PX_DEPRECATED PX_C_EXPORT PX_PHYSX_CORE_API void PX_CALL_CONV PxRegisterLegacyHeightFields ( physx::PxPhysics &  physics  ) 

Enables the usage of the legacy heightfield feature.

This call will link the default 'legacy' implementation of heightfields which uses a special purpose collison code path distinct from triangle meshes.

You must call this function at a time where no PxScene instance exists, typically before calling PxPhysics::createScene(). This is to prevent a change to the heightfield implementation code at runtime which would have undefined results.

Calling PxCreateBasePhysics() and then attempting to create a heightfield shape without first calling PxRegisterHeightFields(), PxRegisterLegacyHeightFields() or PxRegisterUnifiedHeightFields() will result in an error.

PX_DEPRECATED PX_C_EXPORT PX_PHYSX_CORE_API void PX_CALL_CONV PxRegisterParticles ( physx::PxPhysics &  physics  ) 

Enables the usage of the particles feature. This function is called automatically inside PxCreatePhysics(). (deprecated) On resource constrained platforms, it is possible to call PxCreateBasePhysics() and then NOT call this function to save on code memory if your application does not use particles. In this case the linker should strip out the relevant implementation code from the library. If you need to use particles but not some other optional component, you shoud call PxCreateBasePhysics() followed by this call.

Deprecated:
The PhysX particle feature has been deprecated in PhysX version 3.4

Referenced by PxCreatePhysics().

PX_DEPRECATED PX_INLINE void PX_CALL_CONV PxRegisterUnifiedHeightFields ( physx::PxPhysics &  physics  ) 

Enables the usage of the unified heightfield feature.

This method is deprecated and provided only for compatibility with legacy applications. It will be removed in future releases. Call PxRegisterHeightFields instead, which also registers unified heightfields.

References PxRegisterHeightFields().

PX_INLINE PxSceneDesc::PxSceneDesc ( const PxTolerancesScale scale  )  [inherited]

constructor sets to default.

Parameters:
[in] scale scale values for the tolerances in the scene, these must be the same values passed into PxCreatePhysics(). The affected tolerances are bounceThresholdVelocity and frictionOffsetThreshold.
See also:
PxCreatePhysics() PxTolerancesScale bounceThresholdVelocity frictionOffsetThreshold

Referenced by PxSceneDesc::setToDefault().

PX_INLINE PxSceneLimits::PxSceneLimits (  )  [inherited]

constructor sets to default

Referenced by PxSceneLimits::setToDefault().

PX_INLINE void PxSceneDesc::setToDefault ( const PxTolerancesScale scale  )  [inherited]

(re)sets the structure to the default.

Parameters:
[in] scale scale values for the tolerances in the scene, these must be the same values passed into PxCreatePhysics(). The affected tolerances are bounceThresholdVelocity and frictionOffsetThreshold.
See also:
PxCreatePhysics() PxTolerancesScale bounceThresholdVelocity frictionOffsetThreshold

References PxSceneDesc::PxSceneDesc().

PX_INLINE void PxSceneLimits::setToDefault (  )  [inherited]

(re)sets the structure to the default

References PxSceneLimits::PxSceneLimits().


Variable Documentation

const PxU32 INVALID_FILTER_PAIR_INDEX = 0xffffffff [static]

A constraint.

A modifiable contact point. This has additional fields per-contact to permit modification by user.

Contact point data including face (feature) indices.

Header for contact patch where all points share same material and normal.

A constraint is expressed as a set of 1-dimensional constraint rows which define the required constraint on the objects' velocities.

Each constraint is either a hard constraint or a spring. We define the velocity at the constraint to be the quantity

v = body0vel.dot(lin0,ang0) - body1vel.dot(lin1, ang1)

For a hard constraint, the solver attempts to generate

1. a set of velocities for the objects which, when integrated, respect the constraint errors:

v + (geometricError / timestep) = velocityTarget

2. a set of velocities for the objects which respect the constraints:

v = velocityTarget

Hard constraints support restitution: if the impact velocity exceeds the bounce threshold, then the target velocity of the constraint will be set to restitution * -v

Alternatively, the solver can attempt to resolve the velocity constraint as an implicit spring:

F = stiffness * -geometricError + damping * (velocityTarget - v)

where F is the constraint force or acceleration. Springs are fully implicit: that is, the force or acceleration is a function of the position and velocity after the solve.

All constraints support limits on the minimum or maximum impulse applied.

Note:
Not all fields are currently exposed to the user.



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