java.lang.Object
physx.NativeObject
physx.geometry.PxTetMaker
Provides functionality to create a tetrahedral mesh from a triangle mesh.
-
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 PxTetMakerarrayGet(long baseAddress, int index) static booleancreateConformingTetrahedronMesh(PxSimpleTriangleMesh triangleMesh, PxArray_PxVec3 outVertices, PxArray_PxU32 outTetIndices, boolean validate, float volumeThreshold) Create conforming tetrahedron mesh using TetMakerstatic voidcreateRelaxedVoxelTetrahedralMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, int resolution) Creates a tetrahedral mesh by relaxing a voxel mesh around the input meshstatic voidcreateRelaxedVoxelTetrahedralMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, int resolution, int numRelaxationIterations) Creates a tetrahedral mesh by relaxing a voxel mesh around the input meshstatic voidcreateRelaxedVoxelTetrahedralMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, int resolution, int numRelaxationIterations, float relMinTetVolume) Creates a tetrahedral mesh by relaxing a voxel mesh around the input meshstatic voidcreateTreeBasedTetrahedralMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, boolean useTreeNodes, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, float volumeThreshold) Creates a tetrahedral mesh using an octree.static booleancreateVoxelTetrahedronMesh(PxTetrahedronMeshDesc tetMesh, int numVoxelsAlongLongestBoundingBoxAxis, PxArray_PxVec3 outVertices, PxArray_PxU32 outTetIndices) Create voxel-based tetrahedron mesh using TetMakerstatic booleancreateVoxelTetrahedronMeshFromEdgeLength(PxTetrahedronMeshDesc tetMesh, float voxelEdgeLength, PxArray_PxVec3 outVertices, PxArray_PxU32 outTetIndices) Create voxel-based tetrahedron mesh using TetMakerstatic voiddetectTriangleIslands(PxI32ConstPtr triangles, int numTriangles, PxArray_PxU32 islandIndexPerTriangle) Creates a tetrahedral mesh by relaxing a voxel mesh around the input meshstatic intfindLargestIslandId(PxU32ConstPtr islandIndexPerTriangle, int numTriangles) Creates a tetrahedral mesh by relaxing a voxel mesh around the input meshstatic voidremeshTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int gridResolution, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices) Creates a new mesh from a given mesh.static voidremeshTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int gridResolution, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, PxArray_PxU32 vertexMap) Creates a new mesh from a given mesh.static voidsimplifyTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int targetTriangleCount, float maximalEdgeLength, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices) Simplifies (decimates) a triangle mesh using quadric simplification.static voidsimplifyTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int targetTriangleCount, float maximalEdgeLength, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, PxArray_PxU32 vertexMap) Simplifies (decimates) a triangle mesh using quadric simplification.static voidsimplifyTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int targetTriangleCount, float maximalEdgeLength, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, PxArray_PxU32 vertexMap, float edgeLengthCostWeight) Simplifies (decimates) a triangle mesh using quadric simplification.static voidsimplifyTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int targetTriangleCount, float maximalEdgeLength, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, PxArray_PxU32 vertexMap, float edgeLengthCostWeight, float flatnessDetectionThreshold) Simplifies (decimates) a triangle mesh using quadric simplification.static voidsimplifyTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int targetTriangleCount, float maximalEdgeLength, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, PxArray_PxU32 vertexMap, float edgeLengthCostWeight, float flatnessDetectionThreshold, boolean projectSimplifiedPointsOnInputMeshSurface) Simplifies (decimates) a triangle mesh using quadric simplification.static voidsimplifyTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int targetTriangleCount, float maximalEdgeLength, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, PxArray_PxU32 vertexMap, float edgeLengthCostWeight, float flatnessDetectionThreshold, boolean projectSimplifiedPointsOnInputMeshSurface, PxArray_PxU32 outputVertexToInputTriangle) Simplifies (decimates) a triangle mesh using quadric simplification.static voidsimplifyTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int targetTriangleCount, float maximalEdgeLength, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, PxArray_PxU32 vertexMap, float edgeLengthCostWeight, float flatnessDetectionThreshold, boolean projectSimplifiedPointsOnInputMeshSurface, PxArray_PxU32 outputVertexToInputTriangle, boolean removeDisconnectedPatches) Simplifies (decimates) a triangle mesh using quadric simplification.validateTetrahedronMesh(PxBoundedData points, PxBoundedData tetrahedra, float minTetVolumeThreshold) Analyzes the tetrahedron mesh to get a report about deficiencies.validateTriangleMesh(PxSimpleTriangleMesh triangleMesh, float minVolumeThreshold, float minTriangleAngleRadians) Analyzes the triangle mesh to get a report about deficiencies.static PxTetMakerwrapPointer(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
-
PxTetMaker
protected PxTetMaker() -
PxTetMaker
protected PxTetMaker(long address)
-
-
Method Details
-
wrapPointer
-
arrayGet
-
createConformingTetrahedronMesh
public static boolean createConformingTetrahedronMesh(PxSimpleTriangleMesh triangleMesh, PxArray_PxVec3 outVertices, PxArray_PxU32 outTetIndices, boolean validate, float volumeThreshold) Create conforming tetrahedron mesh using TetMaker- Parameters:
triangleMesh- The description of the triangle mesh including vertices and indicesoutVertices- The vertices to store the conforming tetrahedral meshoutTetIndices- The indices to store the conforming tetrahedral meshvalidate- If set to true the input triangle mesh will get analyzed to find possible deficienciesvolumeThreshold- Tetrahedra with a volume smaller than the specified threshold will be removed from the mesh- Returns:
- True if success
-
createVoxelTetrahedronMesh
public static boolean createVoxelTetrahedronMesh(PxTetrahedronMeshDesc tetMesh, int numVoxelsAlongLongestBoundingBoxAxis, PxArray_PxVec3 outVertices, PxArray_PxU32 outTetIndices) Create voxel-based tetrahedron mesh using TetMaker- Parameters:
tetMesh- The description of the tetrahedral mesh including vertices and indicesnumVoxelsAlongLongestBoundingBoxAxis- The number of voxels along the longest bounding box axisoutVertices- The vertices to store the voxel-based tetrahedral meshoutTetIndices- The indices to store the voxel-based tetrahedral mesh- Returns:
- True if success
-
createVoxelTetrahedronMeshFromEdgeLength
public static boolean createVoxelTetrahedronMeshFromEdgeLength(PxTetrahedronMeshDesc tetMesh, float voxelEdgeLength, PxArray_PxVec3 outVertices, PxArray_PxU32 outTetIndices) Create voxel-based tetrahedron mesh using TetMaker- Parameters:
tetMesh- The description of the tetrahedral mesh including vertices and indicesvoxelEdgeLength- The edge length of a voxel.Can be adjusted slightly such that a multiple of it matches the input points' bounding box sizeoutVertices- The vertices to store the voxel-based tetrahedral meshoutTetIndices- The indices to store the voxel-based tetrahedral mesh- Returns:
- True if success
-
validateTriangleMesh
public static PxTriangleMeshAnalysisResults validateTriangleMesh(PxSimpleTriangleMesh triangleMesh, float minVolumeThreshold, float minTriangleAngleRadians) Analyzes the triangle mesh to get a report about deficiencies. Some deficiencies can be handled by the tetmesher, others cannot.- Parameters:
triangleMesh- The description of the triangle mesh including vertices and indicesminVolumeThreshold- Minimum volume the mesh must have such that no volume warning is generatedminTriangleAngleRadians- Minimum angle allowed for triangles such that no angle warning is generated- Returns:
- Flags that describe the triangle mesh's deficiencies
-
validateTetrahedronMesh
public static PxTetrahedronMeshAnalysisResults validateTetrahedronMesh(PxBoundedData points, PxBoundedData tetrahedra, float minTetVolumeThreshold) Analyzes the tetrahedron mesh to get a report about deficiencies. Some deficiencies can be handled by the deformable volume cooker, others cannot.- Parameters:
points- The mesh's pointstetrahedra- The mesh's tetrahedra (index buffer)minTetVolumeThreshold- Minimum volume every tetrahedron in the mesh must have such that no volume warning is generated- Returns:
- Flags that describe the tetrahedron mesh's deficiencies
-
simplifyTriangleMesh
public static void simplifyTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int targetTriangleCount, float maximalEdgeLength, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices) Simplifies (decimates) a triangle mesh using quadric simplification.- Parameters:
inputVertices- The vertices of the input triangle meshinputIndices- The indices of the input triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..targetTriangleCount- Desired number of triangles in the output meshmaximalEdgeLength- Edges below this length will not be collapsed. A value of zero means there is no limit.outputVertices- The vertices of the output (decimated) triangle meshoutputIndices- The indices of the output (decimated) triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..
-
simplifyTriangleMesh
public static void simplifyTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int targetTriangleCount, float maximalEdgeLength, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, PxArray_PxU32 vertexMap) Simplifies (decimates) a triangle mesh using quadric simplification.- Parameters:
inputVertices- The vertices of the input triangle meshinputIndices- The indices of the input triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..targetTriangleCount- Desired number of triangles in the output meshmaximalEdgeLength- Edges below this length will not be collapsed. A value of zero means there is no limit.outputVertices- The vertices of the output (decimated) triangle meshoutputIndices- The indices of the output (decimated) triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..vertexMap- Optional parameter which returns the mapping from input to output vertices. Note that multiple input vertices are typically collapsed into the same output vertex.
-
simplifyTriangleMesh
public static void simplifyTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int targetTriangleCount, float maximalEdgeLength, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, PxArray_PxU32 vertexMap, float edgeLengthCostWeight) Simplifies (decimates) a triangle mesh using quadric simplification.- Parameters:
inputVertices- The vertices of the input triangle meshinputIndices- The indices of the input triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..targetTriangleCount- Desired number of triangles in the output meshmaximalEdgeLength- Edges below this length will not be collapsed. A value of zero means there is no limit.outputVertices- The vertices of the output (decimated) triangle meshoutputIndices- The indices of the output (decimated) triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..vertexMap- Optional parameter which returns the mapping from input to output vertices. Note that multiple input vertices are typically collapsed into the same output vertex.edgeLengthCostWeight- Factor to scale influence of edge length when prioritizing edge collapses. Has no effect if set to zero.
-
simplifyTriangleMesh
public static void simplifyTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int targetTriangleCount, float maximalEdgeLength, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, PxArray_PxU32 vertexMap, float edgeLengthCostWeight, float flatnessDetectionThreshold) Simplifies (decimates) a triangle mesh using quadric simplification.- Parameters:
inputVertices- The vertices of the input triangle meshinputIndices- The indices of the input triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..targetTriangleCount- Desired number of triangles in the output meshmaximalEdgeLength- Edges below this length will not be collapsed. A value of zero means there is no limit.outputVertices- The vertices of the output (decimated) triangle meshoutputIndices- The indices of the output (decimated) triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..vertexMap- Optional parameter which returns the mapping from input to output vertices. Note that multiple input vertices are typically collapsed into the same output vertex.edgeLengthCostWeight- Factor to scale influence of edge length when prioritizing edge collapses. Has no effect if set to zero.flatnessDetectionThreshold- Threshold used to detect edges in flat regions and to improve the placement of the collapsed point. If set to a large value it will have no effect.
-
simplifyTriangleMesh
public static void simplifyTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int targetTriangleCount, float maximalEdgeLength, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, PxArray_PxU32 vertexMap, float edgeLengthCostWeight, float flatnessDetectionThreshold, boolean projectSimplifiedPointsOnInputMeshSurface) Simplifies (decimates) a triangle mesh using quadric simplification.- Parameters:
inputVertices- The vertices of the input triangle meshinputIndices- The indices of the input triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..targetTriangleCount- Desired number of triangles in the output meshmaximalEdgeLength- Edges below this length will not be collapsed. A value of zero means there is no limit.outputVertices- The vertices of the output (decimated) triangle meshoutputIndices- The indices of the output (decimated) triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..vertexMap- Optional parameter which returns the mapping from input to output vertices. Note that multiple input vertices are typically collapsed into the same output vertex.edgeLengthCostWeight- Factor to scale influence of edge length when prioritizing edge collapses. Has no effect if set to zero.flatnessDetectionThreshold- Threshold used to detect edges in flat regions and to improve the placement of the collapsed point. If set to a large value it will have no effect.projectSimplifiedPointsOnInputMeshSurface- If set to true, the simplified points will lie exactly on the original surface.
-
simplifyTriangleMesh
public static void simplifyTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int targetTriangleCount, float maximalEdgeLength, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, PxArray_PxU32 vertexMap, float edgeLengthCostWeight, float flatnessDetectionThreshold, boolean projectSimplifiedPointsOnInputMeshSurface, PxArray_PxU32 outputVertexToInputTriangle) Simplifies (decimates) a triangle mesh using quadric simplification.- Parameters:
inputVertices- The vertices of the input triangle meshinputIndices- The indices of the input triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..targetTriangleCount- Desired number of triangles in the output meshmaximalEdgeLength- Edges below this length will not be collapsed. A value of zero means there is no limit.outputVertices- The vertices of the output (decimated) triangle meshoutputIndices- The indices of the output (decimated) triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..vertexMap- Optional parameter which returns the mapping from input to output vertices. Note that multiple input vertices are typically collapsed into the same output vertex.edgeLengthCostWeight- Factor to scale influence of edge length when prioritizing edge collapses. Has no effect if set to zero.flatnessDetectionThreshold- Threshold used to detect edges in flat regions and to improve the placement of the collapsed point. If set to a large value it will have no effect.projectSimplifiedPointsOnInputMeshSurface- If set to true, the simplified points will lie exactly on the original surface.outputVertexToInputTriangle- Optional indices providing the triangle index per resulting vertex. Only available when projectSimplifiedPointsOnInputMeshSurface is set to true
-
simplifyTriangleMesh
public static void simplifyTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int targetTriangleCount, float maximalEdgeLength, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, PxArray_PxU32 vertexMap, float edgeLengthCostWeight, float flatnessDetectionThreshold, boolean projectSimplifiedPointsOnInputMeshSurface, PxArray_PxU32 outputVertexToInputTriangle, boolean removeDisconnectedPatches) Simplifies (decimates) a triangle mesh using quadric simplification.- Parameters:
inputVertices- The vertices of the input triangle meshinputIndices- The indices of the input triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..targetTriangleCount- Desired number of triangles in the output meshmaximalEdgeLength- Edges below this length will not be collapsed. A value of zero means there is no limit.outputVertices- The vertices of the output (decimated) triangle meshoutputIndices- The indices of the output (decimated) triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..vertexMap- Optional parameter which returns the mapping from input to output vertices. Note that multiple input vertices are typically collapsed into the same output vertex.edgeLengthCostWeight- Factor to scale influence of edge length when prioritizing edge collapses. Has no effect if set to zero.flatnessDetectionThreshold- Threshold used to detect edges in flat regions and to improve the placement of the collapsed point. If set to a large value it will have no effect.projectSimplifiedPointsOnInputMeshSurface- If set to true, the simplified points will lie exactly on the original surface.outputVertexToInputTriangle- Optional indices providing the triangle index per resulting vertex. Only available when projectSimplifiedPointsOnInputMeshSurface is set to trueremoveDisconnectedPatches- Enables the optional removal of disconnected triangles in the mesh. Only the largest connected set/patch will be kept
-
remeshTriangleMesh
public static void remeshTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int gridResolution, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices) Creates a new mesh from a given mesh. The input mesh is first voxelized. The new surface is created from the voxel surface and subsequent projection to the original mesh.- Parameters:
inputVertices- The vertices of the input triangle meshinputIndices- The indices of the input triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..gridResolution- Size of the voxel grid (number of voxels along the longest dimension)outputVertices- The vertices of the output (decimated) triangle meshoutputIndices- The indices of the output (decimated) triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..
-
remeshTriangleMesh
public static void remeshTriangleMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, int gridResolution, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, PxArray_PxU32 vertexMap) Creates a new mesh from a given mesh. The input mesh is first voxelized. The new surface is created from the voxel surface and subsequent projection to the original mesh.- Parameters:
inputVertices- The vertices of the input triangle meshinputIndices- The indices of the input triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..gridResolution- Size of the voxel grid (number of voxels along the longest dimension)outputVertices- The vertices of the output (decimated) triangle meshoutputIndices- The indices of the output (decimated) triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..vertexMap- Optional parameter which returns a mapping from input to output vertices. Since the meshes are independent, the mapping returns an output vertex that is topologically close to the input vertex.
-
createTreeBasedTetrahedralMesh
public static void createTreeBasedTetrahedralMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, boolean useTreeNodes, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, float volumeThreshold) Creates a tetrahedral mesh using an octree.- Parameters:
inputVertices- The vertices of the input triangle meshinputIndices- The indices of the input triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..useTreeNodes- Using the nodes of the octree as tetrahedral verticesoutputVertices- The vertices of the output tetrahedral meshoutputIndices- The indices of the output tetrahedral mesh of the form (id0, id1, id2, id3), (id0, id1, id2, id3), ..volumeThreshold- Tetrahedra with a volume smaller than the specified threshold will be removed from the mesh
-
createRelaxedVoxelTetrahedralMesh
public static void createRelaxedVoxelTetrahedralMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, int resolution) Creates a tetrahedral mesh by relaxing a voxel mesh around the input mesh- Parameters:
inputVertices- The vertices of the input triangle meshinputIndices- The indices of the input triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..outputVertices- The vertices of the output tetrahedral meshoutputIndices- The indices of the output tetrahedral mesh of the form (id0, id1, id2, id3), (id0, id1, id2, id3), ..resolution- The grid spacing is computed as the diagonal of the bounding box of the input mesh divided by the resolution.
-
createRelaxedVoxelTetrahedralMesh
public static void createRelaxedVoxelTetrahedralMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, int resolution, int numRelaxationIterations) Creates a tetrahedral mesh by relaxing a voxel mesh around the input mesh- Parameters:
inputVertices- The vertices of the input triangle meshinputIndices- The indices of the input triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..outputVertices- The vertices of the output tetrahedral meshoutputIndices- The indices of the output tetrahedral mesh of the form (id0, id1, id2, id3), (id0, id1, id2, id3), ..resolution- The grid spacing is computed as the diagonal of the bounding box of the input mesh divided by the resolution.numRelaxationIterations- Number of iterations to pull the tetrahedral mesh towards the input mesh
-
createRelaxedVoxelTetrahedralMesh
public static void createRelaxedVoxelTetrahedralMesh(PxArray_PxVec3 inputVertices, PxArray_PxU32 inputIndices, PxArray_PxVec3 outputVertices, PxArray_PxU32 outputIndices, int resolution, int numRelaxationIterations, float relMinTetVolume) Creates a tetrahedral mesh by relaxing a voxel mesh around the input mesh- Parameters:
inputVertices- The vertices of the input triangle meshinputIndices- The indices of the input triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..outputVertices- The vertices of the output tetrahedral meshoutputIndices- The indices of the output tetrahedral mesh of the form (id0, id1, id2, id3), (id0, id1, id2, id3), ..resolution- The grid spacing is computed as the diagonal of the bounding box of the input mesh divided by the resolution.numRelaxationIterations- Number of iterations to pull the tetrahedral mesh towards the input meshrelMinTetVolume- Constrains the volumes of the tetrahedra to stay abobe relMinTetvolume times the tetrahedron's rest volume.
-
detectTriangleIslands
public static void detectTriangleIslands(PxI32ConstPtr triangles, int numTriangles, PxArray_PxU32 islandIndexPerTriangle) Creates a tetrahedral mesh by relaxing a voxel mesh around the input mesh- Parameters:
triangles- The indices of the input triangle mesh of the form (id0, id1, id2), (id0, id1, id2), ..numTriangles- The number of trianglesislandIndexPerTriangle- Every triangle gets an island index assigned. Triangles with the same island index belong to the same patch of connected triangles.
-
findLargestIslandId
Creates a tetrahedral mesh by relaxing a voxel mesh around the input mesh- Parameters:
islandIndexPerTriangle- An island marker per triangles. All triangles with the same marker belong to an island. Can becomputed using the method detectTriangleIslands.numTriangles- The number of triangles- Returns:
- The marker value of the island that contains the most triangles
-