Triangle mesh collision of a clothing actor. More...
#include <ClothingCollision.h>
Public Member Functions | |
virtual uint32_t | lockTriangles (const uint32_t **ids, const PxVec3 **triangles)=0 |
Read access to the current triangles of the mesh. unlockTriangles needs to be called when done reading. | |
virtual uint32_t | lockTrianglesWrite (const uint32_t **ids, PxVec3 **triangles)=0 |
Write access to the current triangles of the mesh. Changing Ids is not allowed. unlockTriangles needs to be called when done editing. | |
virtual void | unlockTriangles ()=0 |
Unlock the mesh data after editing or reading. | |
virtual void | addTriangle (uint32_t id, const PxVec3 &v0, const PxVec3 &v1, const PxVec3 &v2)=0 |
Adds a triangle to the mesh. Clockwise winding. If a triangle with a given id already exists, it will update that triangle with the new values. Ids for triangle removal and adding are accumulated and processed during simulate. That means a triangle will not be added if the same id is removed in the same frame, independent of the order of the remove and add calls. | |
virtual void | addTriangles (const uint32_t *ids, const PxVec3 *triangleVertices, uint32_t numTriangles)=0 |
Adds a list of triangles to the mesh. Clockwise winding. If a triangle with a given id already exists, it will update that triangle with the new values. Ids for triangle removal and adding are accumulated and processed during simulate. That means a triangle will not be added if the same id is removed in the same frame, independent of the order of the remove and add calls. | |
virtual void | removeTriangle (uint32_t id)=0 |
Removes triangle with given id. Ids for triangle removal and adding are accumulated and processed during simulate. That means a triangle will not be added if the same id is removed in the same frame, independent of the order of the remove and add calls. | |
virtual void | removeTriangles (const uint32_t *ids, uint32_t numTriangles)=0 |
Removes triangles. Ids for triangle removal and adding are accumulated and processed during simulate. That means a triangle will not be added if the same id is removed in the same frame, independent of the order of the remove and add calls. | |
virtual void | clearTriangles ()=0 |
Clear all triangles to start with an empty mesh. | |
virtual void | setPose (PxMat44 pose)=0 |
Sets the global pose of the mesh. | |
virtual const PxMat44 & | getPose () const =0 |
Returns the global pose of the mesh. |
Detailed Description
Triangle mesh collision of a clothing actor.
Member Function Documentation
virtual void nvidia::apex::ClothingTriangleMesh::addTriangle | ( | uint32_t | id, |
const PxVec3 & | v0, | ||
const PxVec3 & | v1, | ||
const PxVec3 & | v2 | ||
) | [pure virtual] |
Adds a triangle to the mesh. Clockwise winding. If a triangle with a given id already exists, it will update that triangle with the new values. Ids for triangle removal and adding are accumulated and processed during simulate. That means a triangle will not be added if the same id is removed in the same frame, independent of the order of the remove and add calls.
- Parameters:
-
[in] id User provided triangle id that allows identifing and removing the triangle. [in] v0 First vertex of triangle [in] v1 Second vertex of triangle [in] v2 Third vertex of triangle
virtual void nvidia::apex::ClothingTriangleMesh::addTriangles | ( | const uint32_t * | ids, |
const PxVec3 * | triangleVertices, | ||
uint32_t | numTriangles | ||
) | [pure virtual] |
Adds a list of triangles to the mesh. Clockwise winding. If a triangle with a given id already exists, it will update that triangle with the new values. Ids for triangle removal and adding are accumulated and processed during simulate. That means a triangle will not be added if the same id is removed in the same frame, independent of the order of the remove and add calls.
- Parameters:
-
[in] ids User provided triangle indices that allows identifing and removing the triangle. Needs to contain numTriangles indices. [in] triangleVertices Triangle vertices to add. Needs to contain 3*numTriangles vertex positions [in] numTriangles Number of triangles to add
virtual uint32_t nvidia::apex::ClothingTriangleMesh::lockTriangles | ( | const uint32_t ** | ids, |
const PxVec3 ** | triangles | ||
) | [pure virtual] |
Read access to the current triangles of the mesh. unlockTriangles needs to be called when done reading.
- Parameters:
-
[out] ids Pointer to the triangle ids. Not written if NULL is provided. [out] triangles Pointer to the triangles. Contains (3*number of triangles) vertex positions. Not written if NULL is provided.
- Returns:
- Current number of triangles
virtual uint32_t nvidia::apex::ClothingTriangleMesh::lockTrianglesWrite | ( | const uint32_t ** | ids, |
PxVec3 ** | triangles | ||
) | [pure virtual] |
Write access to the current triangles of the mesh. Changing Ids is not allowed. unlockTriangles needs to be called when done editing.
- Parameters:
-
[out] ids pointer to the triangle ids. not written if NULL is provided. [out] triangles pointer to the triangles. Contains (3*number of triangles) vertex positions. Not written if NULL is provided.
- Returns:
- Current number of triangles
virtual void nvidia::apex::ClothingTriangleMesh::removeTriangle | ( | uint32_t | id | ) | [pure virtual] |
Removes triangle with given id. Ids for triangle removal and adding are accumulated and processed during simulate. That means a triangle will not be added if the same id is removed in the same frame, independent of the order of the remove and add calls.
- Parameters:
-
[in] id id of the triangle to be removed
virtual void nvidia::apex::ClothingTriangleMesh::removeTriangles | ( | const uint32_t * | ids, |
uint32_t | numTriangles | ||
) | [pure virtual] |
Removes triangles. Ids for triangle removal and adding are accumulated and processed during simulate. That means a triangle will not be added if the same id is removed in the same frame, independent of the order of the remove and add calls.
- Parameters:
-
[in] ids ids of the triangles to be removed. Needs to contain numTriangle indices. [in] numTriangles Number of triangles to remove
The documentation for this class was generated from the following file:
Generated on Fri Dec 15 2017 13:58:20
Copyright © 2012-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.