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 PxArticulationCache * | PxCreateArticulationCache (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... | |
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.
[in] | articulation | Articulation handle |
[in] | data | Link data |
[in] | isLastLink | Hint 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. |
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.
[in] | articulation | articulation handle. |
[in] | cache | Articulation data. |
[in] | flag | Defines which values in the cache will be applied to the articulation |
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.
[in] | solverConstraintDescs | The set of solver constraint descs to batch |
[in] | nbConstraints | The number of constraints to batch |
[in,out] | solverBodies | The array of solver bodies that the constraints reference. Some fields in these structures are written to as scratch memory for the batching. |
[in] | nbBodies | The number of bodies |
[out] | outBatchHeaders | The batch headers produced by this batching process. This array must have at least 1 entry per input constraint |
[out] | outOrderedConstraintDescs | A 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] | articulations | The array of articulations that the constraints reference. Some fields in these structures are written to as scratch memory for the batching. |
[in] | nbArticulations | The number of articulations |
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.
[in] | solverConstraintDescs | The set of solver constraint descs to batch |
[in] | nbConstraints | The number of constraints to batch |
[in,out] | solverBodies | The array of solver bodies that the constraints reference. Some fields in these structures are written to as scratch memory for the batching. |
[in] | nbBodies | The number of bodies |
[out] | outBatchHeaders | The batch headers produced by this batching process. This array must have at least 1 entry per input constraint |
[out] | outOrderedConstraintDescs | A 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] | articulations | The array of articulations that the constraints reference. Some fields in these structures are written to as scratch memory for the batching. |
[in] | nbArticulations | The number of articulations |
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.
[in] | articulation | Articulation handle |
[in] | gravity | Gravity vector |
[in] | dt | Timestep |
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.
[in] | articulation | Articulation handle |
[in] | gravity | Gravity vector |
[in] | dt | Timestep/numPosIterations |
[in] | totalDt | Timestep |
[in] | invDt | 1/(Timestep/numPosIterations) |
[in] | invTotalDt | 1/Timestep |
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.
[in] | inRigidData | The array rigid body properties |
[out] | outSolverBodyData | The array of solverBodyData produced to repreent these bodies |
[in] | nbBodies | The total number of solver bodies to create |
[in] | gravity | The gravity vector |
[in] | dt | The timestep |
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.
[in] | inRigidData | The array rigid body properties |
[out] | outSolverBodyVel | The array of PxTGSSolverBodyVel structures produced to represent these bodies |
[out] | outSolverBodyTxInertia | The array of PxTGSSolverBodyTxInertia produced to represent these bodies |
[out] | outSolverBodyData | The array of PxTGSolverBodyData produced to repreent these bodies |
[in] | nbBodies | The total number of solver bodies to create |
[in] | gravity | The gravity vector |
[in] | dt | The timestep |
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.
[in] | globalPose | The pose of this static actor |
[out] | solverBodyData | The solver body representation of this static actor |
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.
[in] | globalPose | The pose of this static actor |
[out] | solverBodyVel | The velocity component of this body (will be zero) |
[out] | solverBodyTxInertia | The intertia and transform delta component of this body (will be zero) |
[out] | solverBodyData | The solver body representation of this static actor |
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.
[in] | articulation | articulation handle. |
[in] | cache | Articulation data |
[in] | flag | Indicates which values of the articulation system are copied to the cache |
PX_C_EXPORT PX_PHYSX_CORE_API PxArticulationCache* PxCreateArticulationCache | ( | Dy::ArticulationV * | articulation | ) |
Creates an articulation cache.
[in] | articulation | Articulation handle |
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.
[in] | batchHeaders | Array of batch headers to process |
[in] | nbHeaders | The total number of headers |
[in] | contactDescs | An array of contact descs defining the pair and contact properties of each respective contacting pair |
[in] | allocator | An allocator callback to allocate constraint and friction memory |
[in] | invDt | The inverse timestep |
[in] | bounceThreshold | The 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] | frictionOffsetThreshold | The friction offset threshold. Contacts whose separations are below this threshold can generate friction constraints. |
[in] | correlationDistance | The correlation distance used by friction correlation to identify whether a friction patch is broken on the grounds of relation separation. |
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.
[in] | batchHeaders | Array of batch headers to process |
[in] | nbHeaders | The total number of headers |
[in] | contactDescs | An array of contact descs defining the pair and contact properties of each respective contacting pair |
[in] | allocator | An allocator callback to allocate constraint and friction memory |
[in] | invDt | The inverse timestep/nbPositionIterations |
[in] | invTotalDt | The inverse time-step |
[in] | bounceThreshold | The 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] | frictionOffsetThreshold | The friction offset threshold. Contacts whose separations are below this threshold can generate friction constraints. |
[in] | correlationDistance | The correlation distance used by friction correlation to identify whether a friction patch is broken on the grounds of relation separation. |
PX_C_EXPORT PX_PHYSX_CORE_API Dy::ArticulationV* PxCreateFeatherstoneArticulation | ( | const PxFeatherstoneArticulationData & | data | ) |
Creates an immediate-mode reduced-coordinate articulation.
[in] | data | Articulation data |
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.
[in] | batchHeaders | The array of batch headers to be processed |
[in] | nbHeaders | The total number of batch headers to process |
[in] | jointDescs | An array of constraint prep descs defining the properties of the constraints being created |
[in] | allocator | An allocator callback to allocate constraint data |
[in] | dt | The timestep |
[in] | invDt | The inverse timestep |
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.
[in] | batchHeaders | The array of batch headers to be processed |
[in] | nbHeaders | The total number of batch headers to process |
[in] | jointDescs | An array of constraint prep descs defining the properties of the constraints being created |
[in] | allocator | An allocator callback to allocate constraint data |
[in] | dt | The total time-step/nbPositionIterations |
[in] | totalDt | The total time-step |
[in] | invDt | The inverse (timestep/nbPositionIterations) |
[in] | invTotalDt | The inverse total time-step |
[in] | lengthScale | PxToleranceScale::length, i.e. a meter in simulation units |
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.
[in] | batchHeaders | The set of batchHeaders to be processed |
[in] | nbBatchHeaders | The number of batch headers to process. |
[in] | constraints | The set of constraints to be used to produce constraint rows |
[in,out] | jointDescs | An array of constraint prep descs defining the properties of the constraints being created |
[in] | allocator | An allocator callback to allocate constraint data |
[in] | dt | The timestep |
[in] | invDt | The inverse timestep |
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.
[in] | batchHeaders | The set of batchHeaders to be processed |
[in] | nbBatchHeaders | The number of batch headers to process. |
[in] | constraints | The set of constraints to be used to produce constraint rows |
[in,out] | jointDescs | An array of constraint prep descs defining the properties of the constraints being created |
[in] | allocator | An allocator callback to allocate constraint data |
[in] | dt | The total time-step/nbPositionIterations |
[in] | totalDt | The total time-step |
[in] | invDt | The inverse (timestep/nbPositionIterations) |
[in] | invTotalDt | The inverse total time-step |
[in] | lengthScale | PxToleranceScale::length, i.e. a meter in simulation units |
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.
[in] | batchHeaders | The set of batchHeaders to be processed |
[in] | nbBatchHeaders | The number of batch headers to process. |
[in] | constraints | The set of constraints to be used to produce constraint rows |
[in,out] | jointDescs | An array of constraint prep descs defining the properties of the constraints being created |
[in] | allocator | An allocator callback to allocate constraint data |
[in] | dt | The timestep |
[in] | invDt | The inverse timestep |
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.
[in] | batchHeaders | The set of batchHeaders to be processed |
[in] | nbBatchHeaders | The number of batch headers to process. |
[in] | constraints | The set of constraints to be used to produce constraint rows |
[in,out] | jointDescs | An array of constraint prep descs defining the properties of the constraints being created |
[in] | allocator | An allocator callback to allocate constraint data |
[in] | dt | The total time-step/nbPositionIterations |
[in] | totalDt | The total time-step |
[in] | invDt | The inverse (timestep/nbPositionIterations) |
[in] | invTotalDt | The inverse total time-step |
[in] | lengthScale | PxToleranceScale::length, i.e. a meter in simulation units |
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.
[in] | geom0 | Array of geometries to perform collision detection on. |
[in] | geom1 | Array of geometries to perform collision detection on |
[in] | pose0 | Array of poses associated with the corresponding entry in the geom0 array |
[in] | pose1 | Array of poses associated with the corresponding entry in the geom1 array |
[in,out] | contactCache | Array of contact caches associated with each pair geom0[i] + geom1[i] |
[in] | nbPairs | The total number of pairs to process |
[in] | contactRecorder | A callback that is called to record contacts for each pair that detects contacts |
[in] | contactDistance | The distance at which contacts begin to be generated between the pairs |
[in] | meshContactMargin | The mesh contact margin. |
[in] | toleranceLength | The toleranceLength. Used for scaling distance-based thresholds internally to produce appropriate results given simulations in different units |
[in] | allocator | A callback to allocate memory for the contact cache |
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.
[in] | articulation | Articulation handle |
[out] | data | Link data for N links, or NULL to just retrieve the number of links. |
PX_C_EXPORT PX_PHYSX_CORE_API bool PxGetJointData | ( | const Dy::ArticulationLinkHandle | link, |
PxFeatherstoneArticulationJointData & | data | ||
) |
Retrieves joint data from a link handle.
[in] | link | Link handle |
[out] | data | Joint data for this link |
PX_C_EXPORT PX_PHYSX_CORE_API Dy::ArticulationV* PxGetLinkArticulation | ( | const Dy::ArticulationLinkHandle | link | ) |
Retrieves owner/parent articulation handle from a link handle.
[in] | link | Link handle |
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.
[in] | link | Link handle |
[out] | data | Link data |
PX_C_EXPORT PX_PHYSX_CORE_API PxU32 PxGetLinkIndex | ( | const Dy::ArticulationLinkHandle | link | ) |
Retrieves link index from a link handle.
[in] | link | Link handle |
PX_C_EXPORT PX_PHYSX_CORE_API bool PxGetMutableLinkData | ( | const Dy::ArticulationLinkHandle | link, |
PxMutableLinkData & | data | ||
) |
Retrieves mutable link data from a link handle.
[in] | link | Link handle |
[out] | data | Data for this link |
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.
[in,out] | solverBodyData | The array of solver body data to be integrated |
[in] | solverBody | The bodies' linear and angular velocities |
[in] | linearMotionVelocity | The bodies' linear motion velocity array |
[in] | angularMotionState | The bodies' angular motion velocity array |
[in] | nbBodiesToIntegrate | The total number of bodies to integrate |
[in] | dt | The timestep |
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.
[in,out] | solverBody | The array of solver bodies to be integrated |
[in] | txInertia | The delta pose and inertia terms |
[in,out] | poses | The original poses of the bodies. Updated to be the new poses of the bodies |
[in] | nbBodiesToIntegrate | The total number of bodies to integrate |
[in] | dt | The timestep |
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.
PX_C_EXPORT PX_PHYSX_CORE_API void PxReleaseArticulation | ( | Dy::ArticulationV * | articulation | ) |
Releases an immediate-mode reduced-coordinate articulation.
[in] | articulation | Articulation handle |
PX_C_EXPORT PX_PHYSX_CORE_API void PxReleaseArticulationCache | ( | PxArticulationCache & | cache | ) |
Release an articulation cache.
[in] | cache | The cache to release |
PX_C_EXPORT PX_PHYSX_CORE_API bool PxSetJointData | ( | Dy::ArticulationLinkHandle | link, |
const PxFeatherstoneArticulationJointData & | data | ||
) |
Sets joint data for given link.
[in] | link | Link handle |
[in] | data | Joint data for this link |
PX_C_EXPORT PX_PHYSX_CORE_API bool PxSetMutableLinkData | ( | Dy::ArticulationLinkHandle | link, |
const PxMutableLinkData & | data | ||
) |
Sets mutable link data for given link.
[in] | link | Link handle |
[in] | data | Data for this link |
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.
[in] | batchHeaders | The set of batch headers to be solved |
[in] | nbBatchHeaders | The total number of batch headers to be solved |
[in] | solverConstraintDescs | The reordererd set of solver constraint descs referenced by the batch headers |
[in,out] | solverBodies | The set of solver bodies the bodies reference |
[out] | linearMotionVelocity | The resulting linear motion velocity |
[out] | angularMotionVelocity | The resulting angular motion velocity. |
[in] | nbSolverBodies | The total number of solver bodies |
[in] | nbPositionIterations | The number of position iterations to run |
[in] | nbVelocityIterations | The number of velocity iterations to run |
[in] | dt | Timestep. Only needed if articulations are sent to the function. |
[in] | invDt | Inverse timestep. Only needed if articulations are sent to the function. |
[in] | nbSolverArticulations | Number of articulations to solve constraints for. |
[in] | solverArticulations | Array of articulations to solve constraints for. |
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.
[in] | batchHeaders | The set of batch headers to be solved |
[in] | nbBatchHeaders | The total number of batch headers to be solved |
[in] | solverConstraintDescs | The reordererd set of solver constraint descs referenced by the batch headers |
[in,out] | solverBodies | The set of solver bodies the bodies reference |
[in,out] | txInertias | The set of solver body TxInertias the bodies reference |
[in] | nbSolverBodies | The total number of solver bodies |
[in] | nbPositionIterations | The number of position iterations to run |
[in] | nbVelocityIterations | The number of velocity iterations to run |
[in] | dt | time-step/nbPositionIterations |
[in] | invDt | 1/(time-step/nbPositionIterations) |
[in] | nbSolverArticulations | Number of articulations to solve constraints for. |
[in] | solverArticulations | Array of articulations to solve constraints for. |
PX_C_EXPORT PX_PHYSX_CORE_API void PxUpdateArticulationBodies | ( | Dy::ArticulationV * | articulation, |
const PxReal | dt | ||
) |
Updates bodies for a given articulation.
[in] | articulation | Articulation handle |
[in] | dt | Timestep |
PX_C_EXPORT PX_PHYSX_CORE_API void PxUpdateArticulationBodiesTGS | ( | Dy::ArticulationV * | articulation, |
const PxReal | dt | ||
) |
Updates bodies for a given articulation.
[in] | articulation | Articulation handle |
[in] | dt | Timestep |