#include <PxClothTetherCooker.h>
Public Member Functions | |
PxClothSimpleTetherCooker (const PxClothMeshDesc &desc) | |
Compute tether data from PxClothMeshDesc with simple distance measure. | |
~PxClothSimpleTetherCooker () | |
void | getTetherData (PxU32 *userTetherAnchors, PxReal *userTetherLengths) const |
Returns computed tether data. | |
Private Attributes | |
PxClothSimpleTetherCookerImpl * | mImpl |
PxClothSimpleTetherCooker::PxClothSimpleTetherCooker | ( | const PxClothMeshDesc & | desc | ) |
Compute tether data from PxClothMeshDesc with simple distance measure.
The tether constraint in PxCloth requires rest distance and anchor index to be precomputed during cooking time. This cooker computes a simple Euclidean distance to closest anchor point. The Euclidean distance measure works reasonably for flat cloth and flags and computation time is very fast. With this cooker, there is only one tether anchor point per particle.
desc | The cloth mesh descriptor prepared for cooking |
PxClothSimpleTetherCooker::~PxClothSimpleTetherCooker | ( | ) |
void PxClothSimpleTetherCooker::getTetherData | ( | PxU32 * | userTetherAnchors, | |
PxReal * | userTetherLengths | |||
) | const |
Returns computed tether data.
This function returns anchor indices for each particle as well as desired distance between the tether anchor and the particle. The user buffers should be at least as large as number of particles.
PxClothSimpleTetherCookerImpl* PxClothSimpleTetherCooker::mImpl [private] |