PxSolveConstraintsTGS#

Defined in include/PxImmediateMode.h

void PxSolveConstraintsTGS(
const PxConstraintBatchHeader *batchHeaders,
PxU32 nbBatchHeaders,
const PxSolverConstraintDesc *solverConstraintDescs,
PxTGSSolverBodyVel *solverBodies,
PxTGSSolverBodyTxInertia *txInertias,
PxU32 nbSolverBodies,
PxU32 nbPositionIterations,
PxU32 nbVelocityIterations,
float dt,
float invDt,
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] Deprecated, no longer used. Any value (including NULL) can be passed.

  • 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)