Public Member Functions
physx::apex::NxClothingPhysicalMesh Class Reference

Holder for a physical mesh, this can be generated through various ways (see single- and multi-layered clothing) or hand crafted. More...

#include <NxClothingPhysicalMesh.h>

List of all members.

Public Member Functions

virtual physx::PxU32 getNumVertices () const =0
 returns the number of vertices
virtual physx::PxU32 getNumIndices () const =0
 returns the number of incides
virtual void getIndices (void *indexDestination, physx::PxU32 byteStride, physx::PxU32 numIndices) const =0
 writes the indices to a destination buffer
virtual bool isTetrahedralMesh () const =0
 returns whether the mesh is built out of tetrahedra or triangles
virtual void simplify (physx::PxU32 subdivisions, physx::PxI32 maxSteps, physx::PxF32 maxError, IProgressListener *progress)=0
 This will simplify the current mesh.
virtual void setGeometry (bool tetraMesh, physx::PxU32 numVertices, physx::PxU32 vertexByteStride, const void *vertices, physx::PxU32 numIndices, physx::PxU32 indexByteStride, const void *indices)=0
 Create a physical mesh from scratch.
virtual bool getIndices (physx::PxU32 *indices, physx::PxU32 byteStride) const =0
 writes the indices into a user specified buffer.
virtual bool getVertices (physx::PxVec3 *vertices, physx::PxU32 byteStride) const =0
 Writes the vertex positions into a user specified buffer.
virtual bool getNormals (physx::PxVec3 *normals, physx::PxU32 byteStride) const =0
 Writes the normals into a user specified buffer.
virtual physx::PxU32 getNumBonesPerVertex () const =0
 Returns the number of bones per vertex.
virtual bool getBoneIndices (physx::PxU16 *boneIndices, physx::PxU32 byteStride) const =0
 Writes the bone indices into a user specified buffer.
virtual bool getBoneWeights (physx::PxF32 *boneWeights, physx::PxU32 byteStride) const =0
 Writes the bone weights into a user specified buffer.
virtual bool getConstrainCoefficients (NxClothingConstrainCoefficients *coeffs, physx::PxU32 byteStride) const =0
 Writes the cloth constrain coefficients into a user specified buffer.
virtual void getStats (NxClothingPhysicalMeshStats &stats) const =0
 Returns stats (sizes, counts) for the asset. See NxClothingPhysicalMeshStats.

Detailed Description

Holder for a physical mesh, this can be generated through various ways (see single- and multi-layered clothing) or hand crafted.


Member Function Documentation

virtual bool physx::apex::NxClothingPhysicalMesh::getBoneIndices ( physx::PxU16 *  boneIndices,
physx::PxU32  byteStride 
) const [pure virtual]

Writes the bone indices into a user specified buffer.

Returns false if the buffer doesn't exist. The buffer must be bigger than sizeof(physx::PxU16) * getNumVertices() * getNumBonesPerVertex(). (numBonesPerVertex is the same as in the graphical mesh for LOD 0)

The bytestride is applied only after writing numBonesPerVertex and thus must be >= sizoef(physx::PxU16) * numBonesPerVertex

virtual bool physx::apex::NxClothingPhysicalMesh::getBoneWeights ( physx::PxF32 *  boneWeights,
physx::PxU32  byteStride 
) const [pure virtual]

Writes the bone weights into a user specified buffer.

Returns false if the buffer doesn't exist. The buffer must be bigger than sizeof(physx::PxF32) * getNumVertices() * getNumBonesPerVertex(). (numBonesPerVertex is the same as in the graphical mesh for LOD 0) The bytestride is applied only after writing numBonesPerVertex and thus must be >= sizoef(physx::PxF32) * numBonesPerVertex

virtual bool physx::apex::NxClothingPhysicalMesh::getConstrainCoefficients ( NxClothingConstrainCoefficients coeffs,
physx::PxU32  byteStride 
) const [pure virtual]

Writes the cloth constrain coefficients into a user specified buffer.

Returns false if the buffer doesn't exist. The buffer must be bigger than sizeof(ClothingConstrainCoefficients) * getNumVertices().

virtual void physx::apex::NxClothingPhysicalMesh::getIndices ( void *  indexDestination,
physx::PxU32  byteStride,
physx::PxU32  numIndices 
) const [pure virtual]

writes the indices to a destination buffer

Parameters:
[out]indexDestinationdestination buffer where to write the indices
[in]byteStridestride of the destination buffer
[in]numIndicesnumber of indices the buffer can hold. This can be smaller than getNumIndices()
virtual bool physx::apex::NxClothingPhysicalMesh::getIndices ( physx::PxU32 *  indices,
physx::PxU32  byteStride 
) const [pure virtual]

writes the indices into a user specified buffer.

Returns false if the buffer doesn't exist. The buffer must be bigger than sizeof(physx::PxU32) * getNumIndices()

virtual bool physx::apex::NxClothingPhysicalMesh::getNormals ( physx::PxVec3 *  normals,
physx::PxU32  byteStride 
) const [pure virtual]

Writes the normals into a user specified buffer.

Returns false if the buffer doesn't exist. The buffer must be bigger than sizeof(physx::PxVec3) * getNumVertices()

virtual bool physx::apex::NxClothingPhysicalMesh::getVertices ( physx::PxVec3 *  vertices,
physx::PxU32  byteStride 
) const [pure virtual]

Writes the vertex positions into a user specified buffer.

Returns false if the buffer doesn't exist. The buffer must be bigger than sizeof(physx::PxVec3) * getNumVertices()

virtual void physx::apex::NxClothingPhysicalMesh::setGeometry ( bool  tetraMesh,
physx::PxU32  numVertices,
physx::PxU32  vertexByteStride,
const void *  vertices,
physx::PxU32  numIndices,
physx::PxU32  indexByteStride,
const void *  indices 
) [pure virtual]

Create a physical mesh from scratch.

Overwrites all vertices/indices, and invalidates all misc vertex buffers. vertices must be physx::PxVec3 and indices physx::PxU32.

virtual void physx::apex::NxClothingPhysicalMesh::simplify ( physx::PxU32  subdivisions,
physx::PxI32  maxSteps,
physx::PxF32  maxError,
IProgressListener *  progress 
) [pure virtual]

This will simplify the current mesh.

Parameters:
[in]subdivisionsused to derive the maximal length a new edge can get.
Divide the bounding box diagonal by this value to get the maximal edge length for newly created edges
Use 0 to not restrict the maximal edge length
[in]maxStepsThe maximum number of edges to be considered for simplification.
Use 0 to turn off
[in]maxErrorThe maximal quadric error an edge can cause to be considered simplifyable.
Use any value < 0 to turn off
[in]progressCallback class that will be fired every now and then to update a progress bar in the gui.
Returns:
The number of edges collapsed

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

Generated on Mon Apr 28 2014 08:01:17

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