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.
Creation
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.
Visualizations:
\li #PxVisualizationParameter::eCOLLISION_AABBS \li #PxVisualizationParameter::eCOLLISION_SHAPES \li #PxVisualizationParameter::eCOLLISION_AXES \li #PxVisualizationParameter::eCOLLISION_FNORMALS \li #PxVisualizationParameter::eCOLLISION_EDGES-
Nested Class Summary
Nested classes/interfaces inherited from class physx.NativeObject
NativeObject.Allocator<T> -
Field Summary
FieldsFields inherited from class physx.NativeObject
address, isExternallyAllocated, SIZEOF_BYTE, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_POINTER, SIZEOF_SHORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PxTetrahedronMesharrayGet(long baseAddress, int index) Returns the local-space (vertex space) AABB from the tetrahedron mesh.intReturns the number of tetrahedrons.intReturns the number of vertices.Returns the tetrahedra remapping table.Reads the PxTetrahedronMesh flags.Returns the tetrahedron indices.Returns the verticesstatic PxTetrahedronMeshwrapPointer(long address) Methods inherited from class physx.common.PxRefCounted
acquireReference, getReferenceCountMethods inherited from class physx.common.PxBase
getBaseFlags, getConcreteType, getConcreteTypeName, isReleasable, release, setBaseFlag, setBaseFlagsMethods inherited from class physx.NativeObject
checkNotNull, equals, getAddress, hashCode
-
Field Details
-
SIZEOF
public static final int SIZEOF -
ALIGNOF
public static final int ALIGNOF- See Also:
-
-
Constructor Details
-
PxTetrahedronMesh
protected PxTetrahedronMesh() -
PxTetrahedronMesh
protected PxTetrahedronMesh(long address)
-
-
Method Details
-
wrapPointer
-
arrayGet
-
getNbVertices
public int getNbVertices()Returns the number of vertices.- Returns:
- number of vertices
- See Also:
-
getVertices
Returns the vertices- Returns:
- array of vertices
- See Also:
-
getNbTetrahedrons
public int getNbTetrahedrons()Returns the number of tetrahedrons.- Returns:
- number of tetrahedrons
- See Also:
-
getTetrahedrons
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.
- Returns:
- array of tetrahedrons
- See Also:
-
getTetrahedronMeshFlags
Reads the PxTetrahedronMesh flags.See the list of flags #PxTetrahedronMeshFlags
- Returns:
- The values of the PxTetrahedronMesh flags.
-
getTetrahedraRemap
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
- Returns:
- the remapping table (or NULL if 'PxCookingParams::suppressTriangleMeshRemapTable' has been used)
- See Also:
-
getLocalBounds
Returns the local-space (vertex space) AABB from the tetrahedron mesh.- Returns:
- local-space bounds
-