Class PxTetrahedronMesh


public class PxTetrahedronMesh extends 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.

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
See Also:
  • 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

      public static PxTetrahedronMesh wrapPointer(long address)
    • arrayGet

      public static PxTetrahedronMesh arrayGet(long baseAddress, int index)
    • getNbVertices

      public int getNbVertices()
      Returns the number of vertices.
      Returns:
      number of vertices
      See Also:
    • getVertices

      public PxVec3 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

      public NativeObject 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

      public PxTetrahedronMeshFlags getTetrahedronMeshFlags()
      Reads the PxTetrahedronMesh flags.

      See the list of flags #PxTetrahedronMeshFlags

      Returns:
      The values of the PxTetrahedronMesh flags.
    • getTetrahedraRemap

      public PxU32ConstPtr 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

      public PxBounds3 getLocalBounds()
      Returns the local-space (vertex space) AABB from the tetrahedron mesh.
      Returns:
      local-space bounds