Immediatemode

Classes

struct  PxRigidBodyData
 Structure to store rigid body properties. More...
 
class  PxContactRecorder
 Callback class to record contact points produced by immediate::PxGenerateContacts. More...
 
struct  PxImmediateConstraint
 
struct  PxArticulationJointData
 
struct  PxFeatherstoneArticulationJointData
 
struct  PxFeatherstoneArticulationData
 
struct  PxMutableLinkData
 
struct  PxLinkData
 
struct  PxFeatherstoneArticulationLinkData
 

Functions

PX_C_EXPORT PX_PHYSX_CORE_API void PxConstructSolverBodies (const PxRigidBodyData *inRigidData, PxSolverBodyData *outSolverBodyData, const PxU32 nbBodies, const PxVec3 &gravity, const PxReal dt)
 Constructs a PxSolverBodyData structure based on rigid body properties. Applies gravity, damping and clamps maximum velocity. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API void PxConstructStaticSolverBody (const PxTransform &globalPose, PxSolverBodyData &solverBodyData)
 Constructs a PxSolverBodyData structure for a static body at a given pose. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API PxU32 PxBatchConstraints (const PxSolverConstraintDesc *solverConstraintDescs, const PxU32 nbConstraints, PxSolverBody *solverBodies, const PxU32 nbBodies, PxConstraintBatchHeader *outBatchHeaders, PxSolverConstraintDesc *outOrderedConstraintDescs, Dy::ArticulationV **articulations=NULL, const PxU32 nbArticulations=0)
 Groups together sets of independent PxSolverConstraintDesc objects to be solved using SIMD SOA approach. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API bool PxCreateContactConstraints (PxConstraintBatchHeader *batchHeaders, const PxU32 nbHeaders, PxSolverContactDesc *contactDescs, PxConstraintAllocator &allocator, const PxReal invDt, const PxReal bounceThreshold, const PxReal frictionOffsetThreshold, const PxReal correlationDistance)
 Creates a set of contact constraint blocks. Note that, depending the results of PxBatchConstraints, each batchHeader may refer to up to 4 solverConstraintDescs. This function will allocate both constraint and friction patch data via the PxConstraintAllocator provided. Constraint data is only valid until PxSolveConstraints has completed. Friction data is to be retained and provided by the application for friction correlation. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API bool PxCreateJointConstraints (PxConstraintBatchHeader *batchHeaders, const PxU32 nbHeaders, PxSolverConstraintPrepDesc *jointDescs, PxConstraintAllocator &allocator, const PxReal dt, const PxReal invDt)
 Creates a set of joint constraint blocks. Note that, depending the results of PxBatchConstraints, the batchHeader may refer to up to 4 solverConstraintDescs. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API bool PxCreateJointConstraintsWithShaders (PxConstraintBatchHeader *batchHeaders, const PxU32 nbBatchHeaders, PxConstraint **constraints, PxSolverConstraintPrepDesc *jointDescs, PxConstraintAllocator &allocator, const PxReal dt, const PxReal invDt)
 Creates a set of joint constraint blocks. This function runs joint shaders defined inside PxConstraint** param, fills in joint row information in jointDescs and then calls PxCreateJointConstraints. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API bool PxCreateJointConstraintsWithImmediateShaders (PxConstraintBatchHeader *batchHeaders, const PxU32 nbBatchHeaders, PxImmediateConstraint *constraints, PxSolverConstraintPrepDesc *jointDescs, PxConstraintAllocator &allocator, const PxReal dt, const PxReal invDt)
 Creates a set of joint constraint blocks. This function runs joint shaders defined inside PxImmediateConstraint* param, fills in joint row information in jointDescs and then calls PxCreateJointConstraints. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API void PxSolveConstraints (const PxConstraintBatchHeader *batchHeaders, const PxU32 nbBatchHeaders, const PxSolverConstraintDesc *solverConstraintDescs, const PxSolverBody *solverBodies, PxVec3 *linearMotionVelocity, PxVec3 *angularMotionVelocity, const PxU32 nbSolverBodies, const PxU32 nbPositionIterations, const PxU32 nbVelocityIterations, const float dt=0.0f, const float invDt=0.0f, const PxU32 nbSolverArticulations=0, Dy::ArticulationV **solverArticulations=NULL)
 Iteratively solves the set of constraints defined by the provided PxConstraintBatchHeader and PxSolverConstraintDesc structures. Updates deltaVelocities inside the PxSolverBody structures. Produces resulting linear and angular motion velocities. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API void PxIntegrateSolverBodies (PxSolverBodyData *solverBodyData, PxSolverBody *solverBody, const PxVec3 *linearMotionVelocity, const PxVec3 *angularMotionState, const PxU32 nbBodiesToIntegrate, const PxReal dt)
 Integrates a rigid body, returning the new velocities and transforms. After this function has been called, solverBodyData stores all the body's velocity data. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API bool PxGenerateContacts (const PxGeometry *const *geom0, const PxGeometry *const *geom1, const PxTransform *pose0, const PxTransform *pose1, PxCache *contactCache, const PxU32 nbPairs, PxContactRecorder &contactRecorder, const PxReal contactDistance, const PxReal meshContactMargin, const PxReal toleranceLength, PxCacheAllocator &allocator)
 Performs contact generation for a given pair of geometries at the specified poses. Produced contacts are stored in the provided Gu::ContactBuffer. Information is cached in PxCache structure to accelerate future contact generation between pairs. This cache data is valid only as long as the memory provided by PxCacheAllocator has not been released/re-used. Recommendation is to retain that data for a single simulation frame, discarding cached data after 2 frames. If the cached memory has been released/re-used prior to the corresponding pair having contact generation performed again, it is the application's responsibility to reset the PxCache. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API void PxRegisterImmediateArticulations ()
 Register articulation-related solver functions. This is equivalent to PxRegisterArticulationsReducedCoordinate() for PxScene-level articulations. Call this first to enable reduced coordinates articulations in immediate mode. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API Dy::ArticulationV * PxCreateFeatherstoneArticulation (const PxFeatherstoneArticulationData &data)
 Creates an immediate-mode reduced-coordinate articulation. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API void PxReleaseArticulation (Dy::ArticulationV *articulation)
 Releases an immediate-mode reduced-coordinate articulation. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API PxArticulationCachePxCreateArticulationCache (Dy::ArticulationV *articulation)
 Creates an articulation cache. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API void PxCopyInternalStateToArticulationCache (Dy::ArticulationV *articulation, PxArticulationCache &cache, PxArticulationCacheFlags flag)
 Copy the internal data of the articulation to the cache. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API void PxApplyArticulationCache (Dy::ArticulationV *articulation, PxArticulationCache &cache, PxArticulationCacheFlags flag)
 Apply the user defined data in the cache to the articulation system. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API void PxReleaseArticulationCache (PxArticulationCache &cache)
 Release an articulation cache. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API Dy::ArticulationLinkHandle PxAddArticulationLink (Dy::ArticulationV *articulation, const PxFeatherstoneArticulationLinkData &data, bool isLastLink=false)
 Adds a link to an immediate-mode reduced-coordinate articulation. The articulation becomes the link's owner/parent. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API Dy::ArticulationV * PxGetLinkArticulation (const Dy::ArticulationLinkHandle link)
 Retrieves owner/parent articulation handle from a link handle. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API PxU32 PxGetLinkIndex (const Dy::ArticulationLinkHandle link)
 Retrieves link index from a link handle. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API bool PxGetLinkData (const Dy::ArticulationLinkHandle link, PxLinkData &data)
 Retrieves non-mutable link data from a link handle. The data here is computed by the articulation code but cannot be directly changed by users. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API PxU32 PxGetAllLinkData (const Dy::ArticulationV *articulation, PxLinkData *data)
 Retrieves non-mutable link data from an articulation handle (all links). The data here is computed by the articulation code but cannot be directly changed by users. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API bool PxGetMutableLinkData (const Dy::ArticulationLinkHandle link, PxMutableLinkData &data)
 Retrieves mutable link data from a link handle. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API bool PxSetMutableLinkData (Dy::ArticulationLinkHandle link, const PxMutableLinkData &data)
 Sets mutable link data for given link. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API bool PxGetJointData (const Dy::ArticulationLinkHandle link, PxFeatherstoneArticulationJointData &data)
 Retrieves joint data from a link handle. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API bool PxSetJointData (Dy::ArticulationLinkHandle link, const PxFeatherstoneArticulationJointData &data)
 Sets joint data for given link. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API void PxComputeUnconstrainedVelocities (Dy::ArticulationV *articulation, const PxVec3 &gravity, const PxReal dt)
 Computes unconstrained velocities for a given articulation. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API void PxUpdateArticulationBodies (Dy::ArticulationV *articulation, const PxReal dt)
 Updates bodies for a given articulation. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API void PxComputeUnconstrainedVelocitiesTGS (Dy::ArticulationV *articulation, const PxVec3 &gravity, const PxReal dt, const PxReal totalDt, const PxReal invDt, const PxReal invTotalDt)
 Computes unconstrained velocities for a given articulation. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API void PxUpdateArticulationBodiesTGS (Dy::ArticulationV *articulation, const PxReal dt)
 Updates bodies for a given articulation. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API void PxConstructSolverBodiesTGS (const PxRigidBodyData *inRigidData, PxTGSSolverBodyVel *outSolverBodyVel, PxTGSSolverBodyTxInertia *outSolverBodyTxInertia, PxTGSSolverBodyData *outSolverBodyData, const PxU32 nbBodies, const PxVec3 &gravity, const PxReal dt)
 Constructs a PxSolverBodyData structure based on rigid body properties. Applies gravity, damping and clamps maximum velocity. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API void PxConstructStaticSolverBodyTGS (const PxTransform &globalPose, PxTGSSolverBodyVel &solverBodyVel, PxTGSSolverBodyTxInertia &solverBodyTxInertia, PxTGSSolverBodyData &solverBodyData)
 Constructs a PxSolverBodyData structure for a static body at a given pose. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API PxU32 PxBatchConstraintsTGS (const PxSolverConstraintDesc *solverConstraintDescs, const PxU32 nbConstraints, PxTGSSolverBodyVel *solverBodies, const PxU32 nbBodies, PxConstraintBatchHeader *outBatchHeaders, PxSolverConstraintDesc *outOrderedConstraintDescs, Dy::ArticulationV **articulations=NULL, const PxU32 nbArticulations=0)
 Groups together sets of independent PxSolverConstraintDesc objects to be solved using SIMD SOA approach. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API bool PxCreateContactConstraintsTGS (PxConstraintBatchHeader *batchHeaders, const PxU32 nbHeaders, PxTGSSolverContactDesc *contactDescs, PxConstraintAllocator &allocator, const PxReal invDt, const PxReal invTotalDt, const PxReal bounceThreshold, const PxReal frictionOffsetThreshold, const PxReal correlationDistance)
 Creates a set of contact constraint blocks. Note that, depending the results of PxBatchConstraints, each batchHeader may refer to up to 4 solverConstraintDescs. This function will allocate both constraint and friction patch data via the PxConstraintAllocator provided. Constraint data is only valid until PxSolveConstraints has completed. Friction data is to be retained and provided by the application for friction correlation. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API bool PxCreateJointConstraintsTGS (PxConstraintBatchHeader *batchHeaders, const PxU32 nbHeaders, PxTGSSolverConstraintPrepDesc *jointDescs, PxConstraintAllocator &allocator, const PxReal dt, const PxReal totalDt, const PxReal invDt, const PxReal invTotalDt, const PxReal lengthScale)
 Creates a set of joint constraint blocks. Note that, depending the results of PxBatchConstraints, the batchHeader may refer to up to 4 solverConstraintDescs. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API bool PxCreateJointConstraintsWithShadersTGS (PxConstraintBatchHeader *batchHeaders, const PxU32 nbBatchHeaders, PxConstraint **constraints, PxTGSSolverConstraintPrepDesc *jointDescs, PxConstraintAllocator &allocator, const PxReal dt, const PxReal totalDt, const PxReal invDt, const PxReal invTotalDt, const PxReal lengthScale)
 Creates a set of joint constraint blocks. This function runs joint shaders defined inside PxConstraint** param, fills in joint row information in jointDescs and then calls PxCreateJointConstraints. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API bool PxCreateJointConstraintsWithImmediateShadersTGS (PxConstraintBatchHeader *batchHeaders, const PxU32 nbBatchHeaders, PxImmediateConstraint *constraints, PxTGSSolverConstraintPrepDesc *jointDescs, PxConstraintAllocator &allocator, const PxReal dt, const PxReal totalDt, const PxReal invDt, const PxReal invTotalDt, const PxReal lengthScale)
 Creates a set of joint constraint blocks. This function runs joint shaders defined inside PxImmediateConstraint* param, fills in joint row information in jointDescs and then calls PxCreateJointConstraints. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API void PxSolveConstraintsTGS (const PxConstraintBatchHeader *batchHeaders, const PxU32 nbBatchHeaders, const PxSolverConstraintDesc *solverConstraintDescs, PxTGSSolverBodyVel *solverBodies, PxTGSSolverBodyTxInertia *txInertias, const PxU32 nbSolverBodies, const PxU32 nbPositionIterations, const PxU32 nbVelocityIterations, const float dt, const float invDt, const PxU32 nbSolverArticulations, Dy::ArticulationV **solverArticulations)
 Iteratively solves the set of constraints defined by the provided PxConstraintBatchHeader and PxSolverConstraintDesc structures. Updates deltaVelocities inside the PxSolverBody structures. Produces resulting linear and angular motion velocities. More...
 
PX_C_EXPORT PX_PHYSX_CORE_API void PxIntegrateSolverBodiesTGS (PxTGSSolverBodyVel *solverBody, PxTGSSolverBodyTxInertia *txInertia, PxTransform *poses, const PxU32 nbBodiesToIntegrate, const PxReal dt)
 Integrates a rigid body, returning the new velocities and transforms. After this function has been called, solverBody stores all the body's velocity data. More...
 

Detailed Description

Function Documentation

◆ PxAddArticulationLink()

PX_C_EXPORT PX_PHYSX_CORE_API Dy::ArticulationLinkHandle PxAddArticulationLink ( Dy::ArticulationV *  articulation,
const PxFeatherstoneArticulationLinkData data,
bool  isLastLink = false 
)

Adds a link to an immediate-mode reduced-coordinate articulation. The articulation becomes the link's owner/parent.

Parameters
[in]articulationArticulation handle
[in]dataLink data
[in]isLastLinkHint to tell the system whether the added link is the last one or not. This is a minor optimization, it is also ok to always use either true or false here.
Returns
Articulation link handle

◆ PxApplyArticulationCache()

PX_C_EXPORT PX_PHYSX_CORE_API void PxApplyArticulationCache ( Dy::ArticulationV *  articulation,
PxArticulationCache cache,
PxArticulationCacheFlags  flag 
)

Apply the user defined data in the cache to the articulation system.

Parameters
[in]articulationarticulation handle.
[in]cacheArticulation data.
[in]flagDefines which values in the cache will be applied to the articulation
See also
createCache PxCopyInternalStateToArticulationCache

◆ PxBatchConstraints()

PX_C_EXPORT PX_PHYSX_CORE_API PxU32 PxBatchConstraints ( const PxSolverConstraintDesc solverConstraintDescs,
const PxU32  nbConstraints,
PxSolverBody solverBodies,
const PxU32  nbBodies,
PxConstraintBatchHeader outBatchHeaders,
PxSolverConstraintDesc outOrderedConstraintDescs,
Dy::ArticulationV **  articulations = NULL,
const PxU32  nbArticulations = 0 
)

Groups together sets of independent PxSolverConstraintDesc objects to be solved using SIMD SOA approach.

Parameters
[in]solverConstraintDescsThe set of solver constraint descs to batch
[in]nbConstraintsThe number of constraints to batch
[in,out]solverBodiesThe array of solver bodies that the constraints reference. Some fields in these structures are written to as scratch memory for the batching.
[in]nbBodiesThe number of bodies
[out]outBatchHeadersThe batch headers produced by this batching process. This array must have at least 1 entry per input constraint
[out]outOrderedConstraintDescsA reordered copy of the constraint descs. This array is referenced by the constraint batches. This array must have at least 1 entry per input constraint.
[in,out]articulationsThe array of articulations that the constraints reference. Some fields in these structures are written to as scratch memory for the batching.
[in]nbArticulationsThe number of articulations
Returns
The total number of batches produced. This should be less than or equal to nbConstraints.
Note
This method considers all bodies within the range [0, nbBodies-1] to be valid dynamic bodies. A given dynamic body can only be referenced in a batch once. Static or kinematic bodies can be referenced multiple times within a batch safely because constraints do not affect their velocities. The batching will implicitly consider any bodies outside of the range [0, nbBodies-1] to be infinite mass (static or kinematic). This means that either appending static/kinematic to the end of the array of bodies or placing static/kinematic bodies at before the start body pointer will ensure that the minimum number of batches are produced.

◆ PxBatchConstraintsTGS()

PX_C_EXPORT PX_PHYSX_CORE_API PxU32 PxBatchConstraintsTGS ( const PxSolverConstraintDesc solverConstraintDescs,
const PxU32  nbConstraints,
PxTGSSolverBodyVel solverBodies,
const PxU32  nbBodies,
PxConstraintBatchHeader outBatchHeaders,
PxSolverConstraintDesc outOrderedConstraintDescs,
Dy::ArticulationV **  articulations = NULL,
const PxU32  nbArticulations = 0 
)

Groups together sets of independent PxSolverConstraintDesc objects to be solved using SIMD SOA approach.

Parameters
[in]solverConstraintDescsThe set of solver constraint descs to batch
[in]nbConstraintsThe number of constraints to batch
[in,out]solverBodiesThe array of solver bodies that the constraints reference. Some fields in these structures are written to as scratch memory for the batching.
[in]nbBodiesThe number of bodies
[out]outBatchHeadersThe batch headers produced by this batching process. This array must have at least 1 entry per input constraint
[out]outOrderedConstraintDescsA reordered copy of the constraint descs. This array is referenced by the constraint batches. This array must have at least 1 entry per input constraint.
[in,out]articulationsThe array of articulations that the constraints reference. Some fields in these structures are written to as scratch memory for the batching.
[in]nbArticulationsThe number of articulations
Returns
The total number of batches produced. This should be less than or equal to nbConstraints.
Note
This method considers all bodies within the range [0, nbBodies-1] to be valid dynamic bodies. A given dynamic body can only be referenced in a batch once. Static or kinematic bodies can be referenced multiple times within a batch safely because constraints do not affect their velocities. The batching will implicitly consider any bodies outside of the range [0, nbBodies-1] to be infinite mass (static or kinematic). This means that either appending static/kinematic to the end of the array of bodies or placing static/kinematic bodies at before the start body pointer will ensure that the minimum number of batches are produced.

◆ PxComputeUnconstrainedVelocities()

PX_C_EXPORT PX_PHYSX_CORE_API void PxComputeUnconstrainedVelocities ( Dy::ArticulationV *  articulation,
const PxVec3 gravity,
const PxReal  dt 
)

Computes unconstrained velocities for a given articulation.

Parameters
[in]articulationArticulation handle
[in]gravityGravity vector
[in]dtTimestep

◆ PxComputeUnconstrainedVelocitiesTGS()

PX_C_EXPORT PX_PHYSX_CORE_API void PxComputeUnconstrainedVelocitiesTGS ( Dy::ArticulationV *  articulation,
const PxVec3 gravity,
const PxReal  dt,
const PxReal  totalDt,
const PxReal  invDt,
const PxReal  invTotalDt 
)

Computes unconstrained velocities for a given articulation.

Parameters
[in]articulationArticulation handle
[in]gravityGravity vector
[in]dtTimestep/numPosIterations
[in]totalDtTimestep
[in]invDt1/(Timestep/numPosIterations)
[in]invTotalDt1/Timestep

◆ PxConstructSolverBodies()

PX_C_EXPORT PX_PHYSX_CORE_API void PxConstructSolverBodies ( const PxRigidBodyData inRigidData,
PxSolverBodyData outSolverBodyData,
const PxU32  nbBodies,
const PxVec3 gravity,
const PxReal  dt 
)

Constructs a PxSolverBodyData structure based on rigid body properties. Applies gravity, damping and clamps maximum velocity.

Parameters
[in]inRigidDataThe array rigid body properties
[out]outSolverBodyDataThe array of solverBodyData produced to repreent these bodies
[in]nbBodiesThe total number of solver bodies to create
[in]gravityThe gravity vector
[in]dtThe timestep

◆ PxConstructSolverBodiesTGS()

PX_C_EXPORT PX_PHYSX_CORE_API void PxConstructSolverBodiesTGS ( const PxRigidBodyData inRigidData,
PxTGSSolverBodyVel outSolverBodyVel,
PxTGSSolverBodyTxInertia outSolverBodyTxInertia,
PxTGSSolverBodyData outSolverBodyData,
const PxU32  nbBodies,
const PxVec3 gravity,
const PxReal  dt 
)

Constructs a PxSolverBodyData structure based on rigid body properties. Applies gravity, damping and clamps maximum velocity.

Parameters
[in]inRigidDataThe array rigid body properties
[out]outSolverBodyVelThe array of PxTGSSolverBodyVel structures produced to represent these bodies
[out]outSolverBodyTxInertiaThe array of PxTGSSolverBodyTxInertia produced to represent these bodies
[out]outSolverBodyDataThe array of PxTGSolverBodyData produced to repreent these bodies
[in]nbBodiesThe total number of solver bodies to create
[in]gravityThe gravity vector
[in]dtThe timestep

◆ PxConstructStaticSolverBody()

PX_C_EXPORT PX_PHYSX_CORE_API void PxConstructStaticSolverBody ( const PxTransform globalPose,
PxSolverBodyData solverBodyData 
)

Constructs a PxSolverBodyData structure for a static body at a given pose.

Parameters
[in]globalPoseThe pose of this static actor
[out]solverBodyDataThe solver body representation of this static actor

◆ PxConstructStaticSolverBodyTGS()

PX_C_EXPORT PX_PHYSX_CORE_API void PxConstructStaticSolverBodyTGS ( const PxTransform globalPose,
PxTGSSolverBodyVel solverBodyVel,
PxTGSSolverBodyTxInertia solverBodyTxInertia,
PxTGSSolverBodyData solverBodyData 
)

Constructs a PxSolverBodyData structure for a static body at a given pose.

Parameters
[in]globalPoseThe pose of this static actor
[out]solverBodyVelThe velocity component of this body (will be zero)
[out]solverBodyTxInertiaThe intertia and transform delta component of this body (will be zero)
[out]solverBodyDataThe solver body representation of this static actor

◆ PxCopyInternalStateToArticulationCache()

PX_C_EXPORT PX_PHYSX_CORE_API void PxCopyInternalStateToArticulationCache ( Dy::ArticulationV *  articulation,
PxArticulationCache cache,
PxArticulationCacheFlags  flag 
)

Copy the internal data of the articulation to the cache.

Parameters
[in]articulationarticulation handle.
[in]cacheArticulation data
[in]flagIndicates which values of the articulation system are copied to the cache
See also
createCache PxApplyArticulationCache

◆ PxCreateArticulationCache()

PX_C_EXPORT PX_PHYSX_CORE_API PxArticulationCache* PxCreateArticulationCache ( Dy::ArticulationV *  articulation)

Creates an articulation cache.

Parameters
[in]articulationArticulation handle
Returns
Articulation cache
See also
PxReleaseArticulationCache

◆ PxCreateContactConstraints()

PX_C_EXPORT PX_PHYSX_CORE_API bool PxCreateContactConstraints ( PxConstraintBatchHeader batchHeaders,
const PxU32  nbHeaders,
PxSolverContactDesc contactDescs,
PxConstraintAllocator allocator,
const PxReal  invDt,
const PxReal  bounceThreshold,
const PxReal  frictionOffsetThreshold,
const PxReal  correlationDistance 
)

Creates a set of contact constraint blocks. Note that, depending the results of PxBatchConstraints, each batchHeader may refer to up to 4 solverConstraintDescs. This function will allocate both constraint and friction patch data via the PxConstraintAllocator provided. Constraint data is only valid until PxSolveConstraints has completed. Friction data is to be retained and provided by the application for friction correlation.

Parameters
[in]batchHeadersArray of batch headers to process
[in]nbHeadersThe total number of headers
[in]contactDescsAn array of contact descs defining the pair and contact properties of each respective contacting pair
[in]allocatorAn allocator callback to allocate constraint and friction memory
[in]invDtThe inverse timestep
[in]bounceThresholdThe bounce threshold. Relative velocities below this will be solved by bias only. Relative velocities above this will be solved by restitution. If restitution is zero then these pairs will always be solved by bias.
[in]frictionOffsetThresholdThe friction offset threshold. Contacts whose separations are below this threshold can generate friction constraints.
[in]correlationDistanceThe correlation distance used by friction correlation to identify whether a friction patch is broken on the grounds of relation separation.
Returns
a boolean to define if this method was successful or not.

◆ PxCreateContactConstraintsTGS()

PX_C_EXPORT PX_PHYSX_CORE_API bool PxCreateContactConstraintsTGS ( PxConstraintBatchHeader batchHeaders,
const PxU32  nbHeaders,
PxTGSSolverContactDesc contactDescs,
PxConstraintAllocator allocator,
const PxReal  invDt,
const PxReal  invTotalDt,
const PxReal  bounceThreshold,
const PxReal  frictionOffsetThreshold,
const PxReal  correlationDistance 
)

Creates a set of contact constraint blocks. Note that, depending the results of PxBatchConstraints, each batchHeader may refer to up to 4 solverConstraintDescs. This function will allocate both constraint and friction patch data via the PxConstraintAllocator provided. Constraint data is only valid until PxSolveConstraints has completed. Friction data is to be retained and provided by the application for friction correlation.

Parameters
[in]batchHeadersArray of batch headers to process
[in]nbHeadersThe total number of headers
[in]contactDescsAn array of contact descs defining the pair and contact properties of each respective contacting pair
[in]allocatorAn allocator callback to allocate constraint and friction memory
[in]invDtThe inverse timestep/nbPositionIterations
[in]invTotalDtThe inverse time-step
[in]bounceThresholdThe bounce threshold. Relative velocities below this will be solved by bias only. Relative velocities above this will be solved by restitution. If restitution is zero then these pairs will always be solved by bias.
[in]frictionOffsetThresholdThe friction offset threshold. Contacts whose separations are below this threshold can generate friction constraints.
[in]correlationDistanceThe correlation distance used by friction correlation to identify whether a friction patch is broken on the grounds of relation separation.
Returns
a boolean to define if this method was successful or not.

◆ PxCreateFeatherstoneArticulation()

PX_C_EXPORT PX_PHYSX_CORE_API Dy::ArticulationV* PxCreateFeatherstoneArticulation ( const PxFeatherstoneArticulationData data)

Creates an immediate-mode reduced-coordinate articulation.

Parameters
[in]dataArticulation data
Returns
Articulation handle
See also
PxReleaseArticulation

◆ PxCreateJointConstraints()

PX_C_EXPORT PX_PHYSX_CORE_API bool PxCreateJointConstraints ( PxConstraintBatchHeader batchHeaders,
const PxU32  nbHeaders,
PxSolverConstraintPrepDesc jointDescs,
PxConstraintAllocator allocator,
const PxReal  dt,
const PxReal  invDt 
)

Creates a set of joint constraint blocks. Note that, depending the results of PxBatchConstraints, the batchHeader may refer to up to 4 solverConstraintDescs.

Parameters
[in]batchHeadersThe array of batch headers to be processed
[in]nbHeadersThe total number of batch headers to process
[in]jointDescsAn array of constraint prep descs defining the properties of the constraints being created
[in]allocatorAn allocator callback to allocate constraint data
[in]dtThe timestep
[in]invDtThe inverse timestep
Returns
a boolean indicating if this method was successful or not.

◆ PxCreateJointConstraintsTGS()

PX_C_EXPORT PX_PHYSX_CORE_API bool PxCreateJointConstraintsTGS ( PxConstraintBatchHeader batchHeaders,
const PxU32  nbHeaders,
PxTGSSolverConstraintPrepDesc jointDescs,
PxConstraintAllocator allocator,
const PxReal  dt,
const PxReal  totalDt,
const PxReal  invDt,
const PxReal  invTotalDt,
const PxReal  lengthScale 
)

Creates a set of joint constraint blocks. Note that, depending the results of PxBatchConstraints, the batchHeader may refer to up to 4 solverConstraintDescs.

Parameters
[in]batchHeadersThe array of batch headers to be processed
[in]nbHeadersThe total number of batch headers to process
[in]jointDescsAn array of constraint prep descs defining the properties of the constraints being created
[in]allocatorAn allocator callback to allocate constraint data
[in]dtThe total time-step/nbPositionIterations
[in]totalDtThe total time-step
[in]invDtThe inverse (timestep/nbPositionIterations)
[in]invTotalDtThe inverse total time-step
[in]lengthScalePxToleranceScale::length, i.e. a meter in simulation units
Returns
a boolean indicating if this method was successful or not.

◆ PxCreateJointConstraintsWithImmediateShaders()

PX_C_EXPORT PX_PHYSX_CORE_API bool PxCreateJointConstraintsWithImmediateShaders ( PxConstraintBatchHeader batchHeaders,
const PxU32  nbBatchHeaders,
PxImmediateConstraint constraints,
PxSolverConstraintPrepDesc jointDescs,
PxConstraintAllocator allocator,
const PxReal  dt,
const PxReal  invDt 
)

Creates a set of joint constraint blocks. This function runs joint shaders defined inside PxImmediateConstraint* param, fills in joint row information in jointDescs and then calls PxCreateJointConstraints.

Parameters
[in]batchHeadersThe set of batchHeaders to be processed
[in]nbBatchHeadersThe number of batch headers to process.
[in]constraintsThe set of constraints to be used to produce constraint rows
[in,out]jointDescsAn array of constraint prep descs defining the properties of the constraints being created
[in]allocatorAn allocator callback to allocate constraint data
[in]dtThe timestep
[in]invDtThe inverse timestep
Returns
a boolean indicating if this method was successful or not.
See also
PxCreateJointConstraints

◆ PxCreateJointConstraintsWithImmediateShadersTGS()

PX_C_EXPORT PX_PHYSX_CORE_API bool PxCreateJointConstraintsWithImmediateShadersTGS ( PxConstraintBatchHeader batchHeaders,
const PxU32  nbBatchHeaders,
PxImmediateConstraint constraints,
PxTGSSolverConstraintPrepDesc jointDescs,
PxConstraintAllocator allocator,
const PxReal  dt,
const PxReal  totalDt,
const PxReal  invDt,
const PxReal  invTotalDt,
const PxReal  lengthScale 
)

Creates a set of joint constraint blocks. This function runs joint shaders defined inside PxImmediateConstraint* param, fills in joint row information in jointDescs and then calls PxCreateJointConstraints.

Parameters
[in]batchHeadersThe set of batchHeaders to be processed
[in]nbBatchHeadersThe number of batch headers to process.
[in]constraintsThe set of constraints to be used to produce constraint rows
[in,out]jointDescsAn array of constraint prep descs defining the properties of the constraints being created
[in]allocatorAn allocator callback to allocate constraint data
[in]dtThe total time-step/nbPositionIterations
[in]totalDtThe total time-step
[in]invDtThe inverse (timestep/nbPositionIterations)
[in]invTotalDtThe inverse total time-step
[in]lengthScalePxToleranceScale::length, i.e. a meter in simulation units
Returns
a boolean indicating if this method was successful or not.
See also
PxCreateJointConstraints

◆ PxCreateJointConstraintsWithShaders()

PX_C_EXPORT PX_PHYSX_CORE_API bool PxCreateJointConstraintsWithShaders ( PxConstraintBatchHeader batchHeaders,
const PxU32  nbBatchHeaders,
PxConstraint **  constraints,
PxSolverConstraintPrepDesc jointDescs,
PxConstraintAllocator allocator,
const PxReal  dt,
const PxReal  invDt 
)

Creates a set of joint constraint blocks. This function runs joint shaders defined inside PxConstraint** param, fills in joint row information in jointDescs and then calls PxCreateJointConstraints.

Parameters
[in]batchHeadersThe set of batchHeaders to be processed
[in]nbBatchHeadersThe number of batch headers to process.
[in]constraintsThe set of constraints to be used to produce constraint rows
[in,out]jointDescsAn array of constraint prep descs defining the properties of the constraints being created
[in]allocatorAn allocator callback to allocate constraint data
[in]dtThe timestep
[in]invDtThe inverse timestep
Returns
a boolean indicating if this method was successful or not.
See also
PxCreateJointConstraints

◆ PxCreateJointConstraintsWithShadersTGS()

PX_C_EXPORT PX_PHYSX_CORE_API bool PxCreateJointConstraintsWithShadersTGS ( PxConstraintBatchHeader batchHeaders,
const PxU32  nbBatchHeaders,
PxConstraint **  constraints,
PxTGSSolverConstraintPrepDesc jointDescs,
PxConstraintAllocator allocator,
const PxReal  dt,
const PxReal  totalDt,
const PxReal  invDt,
const PxReal  invTotalDt,
const PxReal  lengthScale 
)

Creates a set of joint constraint blocks. This function runs joint shaders defined inside PxConstraint** param, fills in joint row information in jointDescs and then calls PxCreateJointConstraints.

Parameters
[in]batchHeadersThe set of batchHeaders to be processed
[in]nbBatchHeadersThe number of batch headers to process.
[in]constraintsThe set of constraints to be used to produce constraint rows
[in,out]jointDescsAn array of constraint prep descs defining the properties of the constraints being created
[in]allocatorAn allocator callback to allocate constraint data
[in]dtThe total time-step/nbPositionIterations
[in]totalDtThe total time-step
[in]invDtThe inverse (timestep/nbPositionIterations)
[in]invTotalDtThe inverse total time-step
[in]lengthScalePxToleranceScale::length, i.e. a meter in simulation units
Returns
a boolean indicating if this method was successful or not.
See also
PxCreateJointConstraints

◆ PxGenerateContacts()

PX_C_EXPORT PX_PHYSX_CORE_API bool PxGenerateContacts ( const PxGeometry *const *  geom0,
const PxGeometry *const *  geom1,
const PxTransform pose0,
const PxTransform pose1,
PxCache contactCache,
const PxU32  nbPairs,
PxContactRecorder contactRecorder,
const PxReal  contactDistance,
const PxReal  meshContactMargin,
const PxReal  toleranceLength,
PxCacheAllocator allocator 
)

Performs contact generation for a given pair of geometries at the specified poses. Produced contacts are stored in the provided Gu::ContactBuffer. Information is cached in PxCache structure to accelerate future contact generation between pairs. This cache data is valid only as long as the memory provided by PxCacheAllocator has not been released/re-used. Recommendation is to retain that data for a single simulation frame, discarding cached data after 2 frames. If the cached memory has been released/re-used prior to the corresponding pair having contact generation performed again, it is the application's responsibility to reset the PxCache.

Parameters
[in]geom0Array of geometries to perform collision detection on.
[in]geom1Array of geometries to perform collision detection on
[in]pose0Array of poses associated with the corresponding entry in the geom0 array
[in]pose1Array of poses associated with the corresponding entry in the geom1 array
[in,out]contactCacheArray of contact caches associated with each pair geom0[i] + geom1[i]
[in]nbPairsThe total number of pairs to process
[in]contactRecorderA callback that is called to record contacts for each pair that detects contacts
[in]contactDistanceThe distance at which contacts begin to be generated between the pairs
[in]meshContactMarginThe mesh contact margin.
[in]toleranceLengthThe toleranceLength. Used for scaling distance-based thresholds internally to produce appropriate results given simulations in different units
[in]allocatorA callback to allocate memory for the contact cache
Returns
a boolean indicating if the function was successful or not.

◆ PxGetAllLinkData()

PX_C_EXPORT PX_PHYSX_CORE_API PxU32 PxGetAllLinkData ( const Dy::ArticulationV *  articulation,
PxLinkData data 
)

Retrieves non-mutable link data from an articulation handle (all links). The data here is computed by the articulation code but cannot be directly changed by users.

Parameters
[in]articulationArticulation handle
[out]dataLink data for N links, or NULL to just retrieve the number of links.
Returns
Number of links in the articulation = number of link data structure written to the data array.
See also
PxGetLinkData

◆ PxGetJointData()

Retrieves joint data from a link handle.

Parameters
[in]linkLink handle
[out]dataJoint data for this link
Returns
True if success
See also
PxSetJointData

◆ PxGetLinkArticulation()

PX_C_EXPORT PX_PHYSX_CORE_API Dy::ArticulationV* PxGetLinkArticulation ( const Dy::ArticulationLinkHandle  link)

Retrieves owner/parent articulation handle from a link handle.

Parameters
[in]linkLink handle
Returns
Articulation handle

◆ PxGetLinkData()

PX_C_EXPORT PX_PHYSX_CORE_API bool PxGetLinkData ( const Dy::ArticulationLinkHandle  link,
PxLinkData data 
)

Retrieves non-mutable link data from a link handle. The data here is computed by the articulation code but cannot be directly changed by users.

Parameters
[in]linkLink handle
[out]dataLink data
Returns
True if success
See also
PxGetAllLinkData

◆ PxGetLinkIndex()

Retrieves link index from a link handle.

Parameters
[in]linkLink handle
Returns
Link index

◆ PxGetMutableLinkData()

PX_C_EXPORT PX_PHYSX_CORE_API bool PxGetMutableLinkData ( const Dy::ArticulationLinkHandle  link,
PxMutableLinkData data 
)

Retrieves mutable link data from a link handle.

Parameters
[in]linkLink handle
[out]dataData for this link
Returns
True if success
See also
PxSetMutableLinkData

◆ PxIntegrateSolverBodies()

PX_C_EXPORT PX_PHYSX_CORE_API void PxIntegrateSolverBodies ( PxSolverBodyData solverBodyData,
PxSolverBody solverBody,
const PxVec3 linearMotionVelocity,
const PxVec3 angularMotionState,
const PxU32  nbBodiesToIntegrate,
const PxReal  dt 
)

Integrates a rigid body, returning the new velocities and transforms. After this function has been called, solverBodyData stores all the body's velocity data.

Parameters
[in,out]solverBodyDataThe array of solver body data to be integrated
[in]solverBodyThe bodies' linear and angular velocities
[in]linearMotionVelocityThe bodies' linear motion velocity array
[in]angularMotionStateThe bodies' angular motion velocity array
[in]nbBodiesToIntegrateThe total number of bodies to integrate
[in]dtThe timestep

◆ PxIntegrateSolverBodiesTGS()

PX_C_EXPORT PX_PHYSX_CORE_API void PxIntegrateSolverBodiesTGS ( PxTGSSolverBodyVel solverBody,
PxTGSSolverBodyTxInertia txInertia,
PxTransform poses,
const PxU32  nbBodiesToIntegrate,
const PxReal  dt 
)

Integrates a rigid body, returning the new velocities and transforms. After this function has been called, solverBody stores all the body's velocity data.

Parameters
[in,out]solverBodyThe array of solver bodies to be integrated
[in]txInertiaThe delta pose and inertia terms
[in,out]posesThe original poses of the bodies. Updated to be the new poses of the bodies
[in]nbBodiesToIntegrateThe total number of bodies to integrate
[in]dtThe timestep

◆ PxRegisterImmediateArticulations()

PX_C_EXPORT PX_PHYSX_CORE_API void PxRegisterImmediateArticulations ( )

Register articulation-related solver functions. This is equivalent to PxRegisterArticulationsReducedCoordinate() for PxScene-level articulations. Call this first to enable reduced coordinates articulations in immediate mode.

See also
PxRegisterArticulationsReducedCoordinate

◆ PxReleaseArticulation()

PX_C_EXPORT PX_PHYSX_CORE_API void PxReleaseArticulation ( Dy::ArticulationV *  articulation)

Releases an immediate-mode reduced-coordinate articulation.

Parameters
[in]articulationArticulation handle
See also
PxCreateFeatherstoneArticulation

◆ PxReleaseArticulationCache()

PX_C_EXPORT PX_PHYSX_CORE_API void PxReleaseArticulationCache ( PxArticulationCache cache)

Release an articulation cache.

Parameters
[in]cacheThe cache to release
See also
PxCreateArticulationCache PxCopyInternalStateToArticulationCache PxCopyInternalStateToArticulationCache

◆ PxSetJointData()

Sets joint data for given link.

Parameters
[in]linkLink handle
[in]dataJoint data for this link
Returns
True if success
See also
PxGetJointData

◆ PxSetMutableLinkData()

PX_C_EXPORT PX_PHYSX_CORE_API bool PxSetMutableLinkData ( Dy::ArticulationLinkHandle  link,
const PxMutableLinkData data 
)

Sets mutable link data for given link.

Parameters
[in]linkLink handle
[in]dataData for this link
Returns
True if success
See also
PxGetMutableLinkData

◆ PxSolveConstraints()

PX_C_EXPORT PX_PHYSX_CORE_API void PxSolveConstraints ( const PxConstraintBatchHeader batchHeaders,
const PxU32  nbBatchHeaders,
const PxSolverConstraintDesc solverConstraintDescs,
const PxSolverBody solverBodies,
PxVec3 linearMotionVelocity,
PxVec3 angularMotionVelocity,
const PxU32  nbSolverBodies,
const PxU32  nbPositionIterations,
const PxU32  nbVelocityIterations,
const float  dt = 0.0f,
const float  invDt = 0.0f,
const PxU32  nbSolverArticulations = 0,
Dy::ArticulationV **  solverArticulations = NULL 
)

Iteratively solves the set of constraints defined by the provided PxConstraintBatchHeader and PxSolverConstraintDesc structures. Updates deltaVelocities inside the PxSolverBody structures. Produces resulting linear and angular motion velocities.

Parameters
[in]batchHeadersThe set of batch headers to be solved
[in]nbBatchHeadersThe total number of batch headers to be solved
[in]solverConstraintDescsThe reordererd set of solver constraint descs referenced by the batch headers
[in,out]solverBodiesThe set of solver bodies the bodies reference
[out]linearMotionVelocityThe resulting linear motion velocity
[out]angularMotionVelocityThe resulting angular motion velocity.
[in]nbSolverBodiesThe total number of solver bodies
[in]nbPositionIterationsThe number of position iterations to run
[in]nbVelocityIterationsThe number of velocity iterations to run
[in]dtTimestep. Only needed if articulations are sent to the function.
[in]invDtInverse timestep. Only needed if articulations are sent to the function.
[in]nbSolverArticulationsNumber of articulations to solve constraints for.
[in]solverArticulationsArray of articulations to solve constraints for.

◆ PxSolveConstraintsTGS()

PX_C_EXPORT PX_PHYSX_CORE_API void PxSolveConstraintsTGS ( const PxConstraintBatchHeader batchHeaders,
const PxU32  nbBatchHeaders,
const PxSolverConstraintDesc solverConstraintDescs,
PxTGSSolverBodyVel solverBodies,
PxTGSSolverBodyTxInertia txInertias,
const PxU32  nbSolverBodies,
const PxU32  nbPositionIterations,
const PxU32  nbVelocityIterations,
const float  dt,
const float  invDt,
const PxU32  nbSolverArticulations,
Dy::ArticulationV **  solverArticulations 
)

Iteratively solves the set of constraints defined by the provided PxConstraintBatchHeader and PxSolverConstraintDesc structures. Updates deltaVelocities inside the PxSolverBody structures. Produces resulting linear and angular motion velocities.

Parameters
[in]batchHeadersThe set of batch headers to be solved
[in]nbBatchHeadersThe total number of batch headers to be solved
[in]solverConstraintDescsThe reordererd set of solver constraint descs referenced by the batch headers
[in,out]solverBodiesThe set of solver bodies the bodies reference
[in,out]txInertiasThe set of solver body TxInertias the bodies reference
[in]nbSolverBodiesThe total number of solver bodies
[in]nbPositionIterationsThe number of position iterations to run
[in]nbVelocityIterationsThe number of velocity iterations to run
[in]dttime-step/nbPositionIterations
[in]invDt1/(time-step/nbPositionIterations)
[in]nbSolverArticulationsNumber of articulations to solve constraints for.
[in]solverArticulationsArray of articulations to solve constraints for.

◆ PxUpdateArticulationBodies()

PX_C_EXPORT PX_PHYSX_CORE_API void PxUpdateArticulationBodies ( Dy::ArticulationV *  articulation,
const PxReal  dt 
)

Updates bodies for a given articulation.

Parameters
[in]articulationArticulation handle
[in]dtTimestep

◆ PxUpdateArticulationBodiesTGS()

PX_C_EXPORT PX_PHYSX_CORE_API void PxUpdateArticulationBodiesTGS ( Dy::ArticulationV *  articulation,
const PxReal  dt 
)

Updates bodies for a given articulation.

Parameters
[in]articulationArticulation handle
[in]dtTimestep