PxSolveConstraints#
Defined in include/PxImmediateMode.h
- void PxSolveConstraints(
- const PxConstraintBatchHeader *batchHeaders,
- PxU32 nbBatchHeaders,
- const PxSolverConstraintDesc *solverConstraintDescs,
- const PxSolverBody *solverBodies,
- PxVec3 *linearMotionVelocity,
- PxVec3 *angularMotionVelocity,
- PxU32 nbSolverBodies,
- PxU32 nbPositionIterations,
- PxU32 nbVelocityIterations,
- float dt = 0.0f,
- float invDt = 0.0f,
- PxU32 nbSolverArticulations = 0,
- PxArticulationHandle *solverArticulations = NULL,
- PxSpatialVector *Z = NULL,
- PxSpatialVector *deltaV = 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:
batchHeaders – [in] The set of batch headers to be solved
nbBatchHeaders – [in] The total number of batch headers to be solved
solverConstraintDescs – [in] The reordererd set of solver constraint descs referenced by the batch headers
solverBodies – [inout] The set of solver bodies the bodies reference
linearMotionVelocity – [out] The resulting linear motion velocity
angularMotionVelocity – [out] The resulting angular motion velocity.
nbSolverBodies – [in] The total number of solver bodies
nbPositionIterations – [in] The number of position iterations to run
nbVelocityIterations – [in] The number of velocity iterations to run
dt – [in] Timestep. Only needed if articulations are sent to the function.
invDt – [in] Inverse timestep. Only needed if articulations are sent to the function.
nbSolverArticulations – [in] Number of articulations to solve constraints for.
solverArticulations – [in] Array of articulations to solve constraints for.
Z – [out] Deprecated, no longer used. Any value (including NULL) can be passed.
deltaV – [out] Temporary buffer for velocity change