Defined in include/PxImmediateMode.h

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.

  • batchHeaders[in] Array of batch headers to process

  • nbHeaders[in] The total number of headers

  • contactDescs[in] An array of contact descs defining the pair and contact properties of each respective contacting pair

  • allocator[in] An allocator callback to allocate constraint and friction memory

  • invDt[in] The inverse timestep/nbPositionIterations

  • invTotalDt[in] The inverse time-step

  • bounceThreshold[in] 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.

  • frictionOffsetThreshold[in] The friction offset threshold. Contacts whose separations are below this threshold can generate friction constraints.

  • correlationDistance[in] The correlation distance used by friction correlation to identify whether a friction patch is broken on the grounds of relation separation.


a boolean to define if this method was successful or not.