PxImmediateMode.h File Reference

Go to the source code of this file.

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...