Public Member Functions
nvidia::apex::ClothingTriangleMesh Class Reference

Triangle mesh collision of a clothing actor. More...

#include <ClothingCollision.h>

Inheritance diagram for nvidia::apex::ClothingTriangleMesh:

List of all members.

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]idUser provided triangle id that allows identifing and removing the triangle.
[in]v0First vertex of triangle
[in]v1Second vertex of triangle
[in]v2Third 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]idsUser provided triangle indices that allows identifing and removing the triangle. Needs to contain numTriangles indices.
[in]triangleVerticesTriangle vertices to add. Needs to contain 3*numTriangles vertex positions
[in]numTrianglesNumber 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]idsPointer to the triangle ids. Not written if NULL is provided.
[out]trianglesPointer 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]idspointer to the triangle ids. not written if NULL is provided.
[out]trianglespointer 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]idid 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]idsids of the triangles to be removed. Needs to contain numTriangle indices.
[in]numTrianglesNumber of triangles to remove

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

Generated on Sat Dec 1 2018 15:51:51

Copyright © 2012-2018 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.