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

Provides methods to adjust the tessellation of meshes. More...

#include <PxRemeshingExt.h>

Static Public Member Functions

static bool limitMaxEdgeLength (PxArray< PxU32 > &triangles, PxArray< PxVec3 > &points, PxReal maxEdgeLength, PxU32 maxIterations=100, PxArray< PxU32 > *triangleMap=NULL, PxU32 triangleCountThreshold=0xFFFFFFFF)
 Processes a triangle mesh and makes sure that no triangle edge is longer than the maximal edge length specified.
 

Detailed Description

Provides methods to adjust the tessellation of meshes.

Member Function Documentation

◆ limitMaxEdgeLength()

bool physx::PxRemeshingExt::limitMaxEdgeLength ( PxArray< PxU32 > &  triangles,
PxArray< PxVec3 > &  points,
PxReal  maxEdgeLength,
PxU32  maxIterations = 100,
PxArray< PxU32 > *  triangleMap = NULL,
PxU32  triangleCountThreshold = 0xFFFFFFFF 
)
static

Processes a triangle mesh and makes sure that no triangle edge is longer than the maximal edge length specified.

To shorten edges that are too long, additional points get inserted at their center leading to a subdivision of the input mesh. This process is executed repeatedly until the maximum edge length criterion is satisfied

Parameters
[in,out]trianglesThe triangles of the mesh where a maximum edge length should be enforced. They will be modified in place during the process.
[in,out]pointsThe vertices of the mesh where a maximum edge length should be enforced. They will be modified in place during the process.
[in]maxEdgeLengthThe maximum edge length allowed after processing the input
[in]maxIterationsThe maximum number of subdivision iterations
[out]triangleMapAn optional map that provides the index of the original triangle for every triangle after the subdivision
[in]triangleCountThresholdOptional limit to the number of triangles. Not guaranteed to match exactly, the algorithm will just stop as soon as possible after reaching the limit.
Returns
True if any remeshing was applied

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