PxClothGeodesicTetherCooker Class Reference
#include <PxClothTetherCooker.h>
Public Member Functions | |
PxClothGeodesicTetherCooker (const PxClothMeshDesc &desc) | |
Compute tether data from PxClothMeshDesc using geodesic distance. | |
~PxClothGeodesicTetherCooker () | |
PxU32 | getCookerStatus () const |
Returns cooker status. | |
PxU32 | getNbTethersPerParticle () const |
Returns number of tether anchors per particle. | |
void | getTetherData (PxU32 *userTetherAnchors, PxReal *userTetherLengths) const |
Returns computed tether data. | |
Private Attributes | |
PxClothGeodesicTetherCookerImpl * | mImpl |
Detailed Description
- Deprecated:
- The PhysX cloth feature has been deprecated in PhysX version 3.4.1
Constructor & Destructor Documentation
PxClothGeodesicTetherCooker::PxClothGeodesicTetherCooker | ( | const PxClothMeshDesc & | desc | ) |
Compute tether data from PxClothMeshDesc using geodesic distance.
The tether constraint in PxCloth requires rest distance and anchor index to be precomputed during cooking time. The provided tether cooker computes optimal tether distance with geodesic distance computation. For curved and complex meshes, geodesic distance provides the best behavior for tether constraints. But the cooking time is slower than the simple cooker.
- See also:
- PxClothSimpleTetherCooker
- Parameters:
-
desc The cloth mesh descriptor prepared for cooking
- Note:
- The geodesic distance is optimized to work for intended use in tether constraint. This is by no means a general purpose geodesic computation code for arbitrary meshes.
The geodesic cooker does not work with non-manifold input such as edges having more than two incident triangles, or adjacent triangles following inconsitent winding order (e.g. clockwise vs counter-clockwise).
PxClothGeodesicTetherCooker::~PxClothGeodesicTetherCooker | ( | ) |
Member Function Documentation
PxU32 PxClothGeodesicTetherCooker::getCookerStatus | ( | ) | const |
Returns cooker status.
This function returns cooker status after cooker computation is done. A non-zero return value indicates a failure, 1 for non-manifold and 2 for inconsistent winding.
PxU32 PxClothGeodesicTetherCooker::getNbTethersPerParticle | ( | ) | const |
Returns number of tether anchors per particle.
- Note:
- Returned number indicates the maximum anchors. If some particles are assigned fewer anchors, the anchor indices will be PxU32(-1)
If there is no attached point in the input mesh descriptor, this will return 0 and no tether data will be generated.
void PxClothGeodesicTetherCooker::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 * number of tethers per particle.
- See also:
- getNbTethersPerParticle()
Member Data Documentation
PxClothGeodesicTetherCookerImpl* PxClothGeodesicTetherCooker::mImpl [private] |
The documentation for this class was generated from the following file:
Copyright © 2008-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com