PxSolveConstraintsTGS

Defined in include/PxImmediateMode.h

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

  • txInertias[inout] The set of solver body TxInertias the bodies reference

  • 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] time-step/nbPositionIterations

  • invDt[in] 1/(time-step/nbPositionIterations)

  • nbSolverArticulations[in] Number of articulations to solve constraints for.

  • solverArticulations[in] Array of articulations to solve constraints for.

  • Z[out] Temporary buffer for impulse propagation (only if articulations are used, size should be at least as large as the maximum number of links in any articulations being simulated)

  • deltaV[out] Temporary buffer for velocity change (only if articulations are used, size should be at least as large as the maximum number of links in any articulations being simulated)