Public Member Functions | Private Attributes | List of all members
PxClothSimpleTetherCooker Class Reference

#include <PxClothTetherCooker.h>

Public Member Functions

 PxClothSimpleTetherCooker (const PxClothMeshDesc &desc)
 Compute tether data from PxClothMeshDesc with simple distance measure. More...
 
 ~PxClothSimpleTetherCooker ()
 
PxU32 getCookerStatus () const
 Returns cooker status. More...
 
void getTetherData (PxU32 *userTetherAnchors, PxReal *userTetherLengths) const
 Returns computed tether data. More...
 

Private Attributes

PxClothSimpleTetherCookerImpl * mImpl
 

Constructor & Destructor Documentation

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.

See Also
PxClothTetherGeodesicCooker for more accurate distance estimation.
Parameters
descThe cloth mesh descriptor prepared for cooking
PxClothSimpleTetherCooker::~PxClothSimpleTetherCooker ( )

Member Function Documentation

PxU32 PxClothSimpleTetherCooker::getCookerStatus ( ) const

Returns cooker status.

This function returns cooker status after cooker computation is done. A non-zero return value indicates a failure.

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.

Member Data Documentation

PxClothSimpleTetherCookerImpl* PxClothSimpleTetherCooker::mImpl
private

The documentation for this class was generated from the following file:


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com