Class PxTetrahedronMeshExt

java.lang.Object
physx.NativeObject
physx.geometry.PxTetrahedronMeshExt

public class PxTetrahedronMeshExt extends NativeObject
utility functions for use with PxTetrahedronMesh and subclasses
  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxTetrahedronMeshExt

      protected PxTetrahedronMeshExt()
    • PxTetrahedronMeshExt

      protected PxTetrahedronMeshExt(long address)
  • Method Details

    • wrapPointer

      public static PxTetrahedronMeshExt wrapPointer(long address)
    • arrayGet

      public static PxTetrahedronMeshExt arrayGet(long baseAddress, int index)
    • findTetrahedronContainingPoint

      public static int findTetrahedronContainingPoint(PxTetrahedronMesh mesh, PxVec3 point, PxVec4 bary, float tolerance)
      Returns the index of the tetrahedron that contains a point
      Parameters:
      mesh - The tetmesh
      point - The point to find the enclosing tetrahedron for
      bary - The barycentric coordinates of the point inside the enclosing tetrahedron
      tolerance - Tolerance value used classify points as inside if they lie exactly a tetrahedron's surface
      Returns:
      The index of the tetrahedon containing the point, -1 if not tetrahedron contains the opoint
    • findTetrahedronClosestToPoint

      public static int findTetrahedronClosestToPoint(PxTetrahedronMesh mesh, PxVec3 point, PxVec4 bary)
      Returns the index of the tetrahedron closest to a point
      Parameters:
      mesh - The tetmesh
      point - The point to find the closest tetrahedron for
      bary - The barycentric coordinates of the point in the tetrahedron
      Returns:
      The index of the tetrahedon closest to the point
    • createPointsToTetrahedronMap

      public static void createPointsToTetrahedronMap(PxArray_PxVec3 tetMeshVertices, PxArray_PxU32 tetMeshIndices, PxArray_PxVec3 pointsToEmbed, PxArray_PxVec4 barycentricCoordinates, PxArray_PxU32 tetLinks)
      Associates points with closest tetrahedra from input tetrahedral mesh. If the tetmesh does not have any tetrahedra or points, a warning will be generated and the result arrays will be empty, even if there are query points passed into the method.
      Parameters:
      tetMeshVertices - The tetrahedral mesh vertices
      tetMeshIndices - The tetraheral mesh indices
      pointsToEmbed - The points for which the embedding should be created
      barycentricCoordinates - The output barycentric coordinates for each input point relative to its closest tetrahedron
      tetLinks - The output indices of the closest tetrahedron for each input point
    • extractTetMeshSurface

      public static void extractTetMeshSurface(PxTetrahedronMesh mesh, PxArray_PxU32 surfaceTriangles)
      Extracts the surface triangles of a tetmesh

      The extracted triangle's vertex indices point to the vertex buffer of the tetmesh.

      Parameters:
      mesh - The mesh from which the surface shall be computed
      surfaceTriangles - The resulting surface triangles
    • extractTetMeshSurface

      public static void extractTetMeshSurface(PxTetrahedronMesh mesh, PxArray_PxU32 surfaceTriangles, PxArray_PxU32 surfaceTriangleToTet)
      Extracts the surface triangles of a tetmesh

      The extracted triangle's vertex indices point to the vertex buffer of the tetmesh.

      Parameters:
      mesh - The mesh from which the surface shall be computed
      surfaceTriangles - The resulting surface triangles
      surfaceTriangleToTet - Optional array to get the index of a tetrahedron that is adjacent to the surface triangle with the corresponding index
    • extractTetMeshSurface

      public static void extractTetMeshSurface(PxTetrahedronMesh mesh, PxArray_PxU32 surfaceTriangles, PxArray_PxU32 surfaceTriangleToTet, boolean flipTriangleOrientation)
      Extracts the surface triangles of a tetmesh

      The extracted triangle's vertex indices point to the vertex buffer of the tetmesh.

      Parameters:
      mesh - The mesh from which the surface shall be computed
      surfaceTriangles - The resulting surface triangles
      surfaceTriangleToTet - Optional array to get the index of a tetrahedron that is adjacent to the surface triangle with the corresponding index
      flipTriangleOrientation - Reverses the orientation of the ouput triangles