RavEngine
Loading...
Searching...
No Matches
physx::PxTetrahedronMeshExt Class Reference

utility functions for use with PxTetrahedronMesh and subclasses More...

#include <PxTetrahedronMeshExt.h>

Static Public Member Functions

static PxI32 findTetrahedronContainingPoint (const PxTetrahedronMesh *mesh, const PxVec3 &point, PxVec4 &bary, PxReal tolerance=1e-6f)
 
static PxI32 findTetrahedronClosestToPoint (const PxTetrahedronMesh *mesh, const PxVec3 &point, PxVec4 &bary)
 
static void extractTetMeshSurface (const void *tetrahedra, PxU32 numTetrahedra, bool sixteenBitIndices, PxArray< PxU32 > &surfaceTriangles, PxArray< PxU32 > *surfaceTriangleToTet=NULL, bool flipTriangleOrientation=false)
 
static void extractTetMeshSurface (const PxTetrahedronMesh *mesh, PxArray< PxU32 > &surfaceTriangles, PxArray< PxU32 > *surfaceTriangleToTet=NULL, bool flipTriangleOrientation=false)
 

Detailed Description

utility functions for use with PxTetrahedronMesh and subclasses

Member Function Documentation

◆ extractTetMeshSurface() [1/2]

void physx::PxTetrahedronMeshExt::extractTetMeshSurface ( const PxTetrahedronMesh *  mesh,
PxArray< PxU32 > &  surfaceTriangles,
PxArray< PxU32 > *  surfaceTriangleToTet = NULL,
bool  flipTriangleOrientation = false 
)
static

Extracts the surface triangles of a tetmesh

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

Parameters
[in]meshThe mesh from which the surface shall be computed
[in]surfaceTrianglesThe resulting surface triangles
[in]surfaceTriangleToTetOptional array to get the index of a tetrahedron that is adjacent to the surface triangle with the corresponding index
[in]flipTriangleOrientationReverses the orientation of the ouput triangles

◆ extractTetMeshSurface() [2/2]

void physx::PxTetrahedronMeshExt::extractTetMeshSurface ( const void *  tetrahedra,
PxU32  numTetrahedra,
bool  sixteenBitIndices,
PxArray< PxU32 > &  surfaceTriangles,
PxArray< PxU32 > *  surfaceTriangleToTet = NULL,
bool  flipTriangleOrientation = false 
)
static

Extracts the surface triangles of a tetmesh

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

Parameters
[in]tetrahedraThe tetrahedra indices
[in]numTetrahedraThe number of tetrahedra
[in]sixteenBitIndicesIf set to true, the tetrahedra indices are read as 16bit integers, otherwise 32bit integers are used
[in]surfaceTrianglesThe resulting surface triangles
[in]surfaceTriangleToTetOptional array to get the index of a tetrahedron that is adjacent to the surface triangle with the corresponding index
[in]flipTriangleOrientationReverses the orientation of the ouput triangles

◆ findTetrahedronClosestToPoint()

PxI32 physx::PxTetrahedronMeshExt::findTetrahedronClosestToPoint ( const PxTetrahedronMesh *  mesh,
const PxVec3 &  point,
PxVec4 &  bary 
)
static

Returns the index of the tetrahedron closest to a point

Parameters
[in]meshThe tetmesh
[in]pointThe point to find the closest tetrahedron for
[in]baryThe barycentric coordinates of the point in the tetrahedron
Returns
The index of the tetrahedon closest to the point

◆ findTetrahedronContainingPoint()

PxI32 physx::PxTetrahedronMeshExt::findTetrahedronContainingPoint ( const PxTetrahedronMesh *  mesh,
const PxVec3 &  point,
PxVec4 &  bary,
PxReal  tolerance = 1e-6f 
)
static

Returns the index of the tetrahedron that contains a point

Parameters
[in]meshThe tetmesh
[in]pointThe point to find the enclosing tetrahedron for
[in]baryThe barycentric coordinates of the point inside the enclosing tetrahedron
[in]toleranceTolerance 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

The documentation for this class was generated from the following files: