java.lang.Object
physx.NativeObject
physx.geometry.PxTetrahedronMeshExt
utility functions for use with PxTetrahedronMesh and subclasses
-
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 PxTetrahedronMeshExtarrayGet(long baseAddress, int index) static voidcreatePointsToTetrahedronMap(PxArray_PxVec3 tetMeshVertices, PxArray_PxU32 tetMeshIndices, PxArray_PxVec3 pointsToEmbed, PxArray_PxVec4 barycentricCoordinates, PxArray_PxU32 tetLinks) Associates points with closest tetrahedra from input tetrahedral mesh.static voidextractTetMeshSurface(PxTetrahedronMesh mesh, PxArray_PxU32 surfaceTriangles) Extracts the surface triangles of a tetmeshstatic voidextractTetMeshSurface(PxTetrahedronMesh mesh, PxArray_PxU32 surfaceTriangles, PxArray_PxU32 surfaceTriangleToTet) Extracts the surface triangles of a tetmeshstatic voidextractTetMeshSurface(PxTetrahedronMesh mesh, PxArray_PxU32 surfaceTriangles, PxArray_PxU32 surfaceTriangleToTet, boolean flipTriangleOrientation) Extracts the surface triangles of a tetmeshstatic intfindTetrahedronClosestToPoint(PxTetrahedronMesh mesh, PxVec3 point, PxVec4 bary) Returns the index of the tetrahedron closest to a pointstatic intfindTetrahedronContainingPoint(PxTetrahedronMesh mesh, PxVec3 point, PxVec4 bary, float tolerance) Returns the index of the tetrahedron that contains a pointstatic PxTetrahedronMeshExtwrapPointer(long address) Methods 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
-
PxTetrahedronMeshExt
protected PxTetrahedronMeshExt() -
PxTetrahedronMeshExt
protected PxTetrahedronMeshExt(long address)
-
-
Method Details
-
wrapPointer
-
arrayGet
-
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 tetmeshpoint- The point to find the enclosing tetrahedron forbary- The barycentric coordinates of the point inside the enclosing tetrahedrontolerance- Tolerance value used classify points as inside if they lie exactly a tetrahedron's surface- Returns:
- The index of the tetrahedron containing the point, -1 if not tetrahedron contains the opoint
-
findTetrahedronClosestToPoint
Returns the index of the tetrahedron closest to a point- Parameters:
mesh- The tetmeshpoint- The point to find the closest tetrahedron forbary- The barycentric coordinates of the point in the tetrahedron- Returns:
- The index of the tetrahedron 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 verticestetMeshIndices- The tetraheral mesh indicespointsToEmbed- The points for which the embedding should be createdbarycentricCoordinates- The output barycentric coordinates for each input point relative to its closest tetrahedrontetLinks- The output indices of the closest tetrahedron for each input point
-
extractTetMeshSurface
Extracts the surface triangles of a tetmeshThe extracted triangle's vertex indices point to the vertex buffer of the tetmesh.
- Parameters:
mesh- The mesh from which the surface shall be computedsurfaceTriangles- The resulting surface triangles
-
extractTetMeshSurface
public static void extractTetMeshSurface(PxTetrahedronMesh mesh, PxArray_PxU32 surfaceTriangles, PxArray_PxU32 surfaceTriangleToTet) Extracts the surface triangles of a tetmeshThe extracted triangle's vertex indices point to the vertex buffer of the tetmesh.
- Parameters:
mesh- The mesh from which the surface shall be computedsurfaceTriangles- The resulting surface trianglessurfaceTriangleToTet- 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 tetmeshThe extracted triangle's vertex indices point to the vertex buffer of the tetmesh.
- Parameters:
mesh- The mesh from which the surface shall be computedsurfaceTriangles- The resulting surface trianglessurfaceTriangleToTet- Optional array to get the index of a tetrahedron that is adjacent to the surface triangle with the corresponding indexflipTriangleOrientation- Reverses the orientation of the ouput triangles
-