Defined in include/geometry/PxTetrahedronMesh.h

Inheritance Relationships

Base Type

class PxTetrahedronMesh : public PxRefCounted

A tetramedron mesh, also called a ‘tetrahedron soup’.

It is represented as an indexed tetrahedron list. There are no restrictions on the tetrahedron data.

To avoid duplicating data when you have several instances of a particular mesh positioned differently, you do not use this class to represent a mesh object directly. Instead, you create an instance of this mesh via the PxTetrahedronMeshGeometry and PxShape classes.


To create an instance of this class call PxPhysics::createTetrahedronMesh(), and release() to delete it. This is only possible once you have released all of its PxShape instances.


Public Functions

virtual PxU32 getNbVertices() const = 0

Returns the number of vertices.

See also



number of vertices

virtual const PxVec3 *getVertices() const = 0

Returns the vertices.

See also



array of vertices

virtual PxU32 getNbTetrahedrons() const = 0

Returns the number of tetrahedrons.


number of tetrahedrons

virtual const void *getTetrahedrons() const = 0

Returns the tetrahedron indices.

The indices can be 16 or 32bit depending on the number of tetrahedrons in the mesh. Call getTetrahedronMeshFlags() to know if the indices are 16 or 32 bits.

The number of indices is the number of tetrahedrons * 4.

See also

getNbTetrahedron() getTetrahedronMeshFlags() getTetrahedraRemap()


array of tetrahedrons

virtual PxTetrahedronMeshFlags getTetrahedronMeshFlags() const = 0

Reads the PxTetrahedronMesh flags.

See the list of flags PxTetrahedronMeshFlags


The values of the PxTetrahedronMesh flags.

virtual const PxU32 *getTetrahedraRemap() const = 0

Returns the tetrahedra remapping table.

The tetrahedra are internally sorted according to various criteria. Hence the internal tetrahedron order does not always match the original (user-defined) order. The remapping table helps finding the old indices knowing the new ones:

remapTable[ internalTetrahedronIndex ] = originalTetrahedronIndex


the remapping table (or NULL if ‘PxCookingParams::suppressTriangleMeshRemapTable’ has been used)

virtual PxBounds3 getLocalBounds() const = 0

Returns the local-space (vertex space) AABB from the tetrahedron mesh.


local-space bounds

virtual void release() = 0

Decrements the reference count of a tetrahedron mesh and releases it if the new reference count is zero.

virtual PxU32 getReferenceCount() const = 0

Returns the reference count of the object.

At creation, the reference count of the object is 1. Every other object referencing this object increments the count by 1. When the reference count reaches 0, and only then, the object gets destroyed automatically.


the current reference count.

virtual void acquireReference() = 0

Acquires a counted reference to this object.

This method increases the reference count of the object by 1. Decrement the reference count by calling release()

virtual const char *getConcreteTypeName() const = 0

Returns string name of dynamic type.


Class name of most derived type of this object.

template<class T>
inline T *is()
template<class T>
inline const T *is() const
inline PxType getConcreteType() const

Returns concrete type of object.

See also



PxConcreteType::Enum of serialized object

inline void setBaseFlag(PxBaseFlag::Enum flag, bool value)

Set PxBaseFlag

  • flag[in] The flag to be set

  • value[in] The flags new value

inline void setBaseFlags(PxBaseFlags inFlags)

Set PxBaseFlags

See also



inFlags[in] The flags to be set

inline PxBaseFlags getBaseFlags() const

Returns PxBaseFlags.

See also




inline virtual bool isReleasable() const

Whether the object is subordinate.

A class is subordinate, if it can only be instantiated in the context of another class.


Whether the class is subordinate

Protected Functions

inline PxTetrahedronMesh(PxType concreteType, PxBaseFlags baseFlags)
inline PxTetrahedronMesh(PxBaseFlags baseFlags)
inline virtual ~PxTetrahedronMesh()
inline virtual bool isKindOf(const char *name) const

Returns whether a given type name matches with the type of this instance.

inline virtual void onRefCountZero()
template<class T>
inline bool typeMatch() const

Protected Attributes

PxType mConcreteType
PxBaseFlags mBaseFlags
PxU32 mBuiltInRefCount