MeshLib
 
Loading...
Searching...
No Matches
MRDecimateSettings Struct Reference

parameters for mrDecimateMesh More...

#include <MRMeshDecimate.h>

Public Attributes

MRDecimateStrategy strategy
 
float maxError
 
float maxEdgeLen
 Maximal possible edge length created during decimation.
 
float maxBdShift
 Maximal shift of a boundary during one edge collapse.
 
float maxTriangleAspectRatio
 Maximal possible aspect ratio of a triangle introduced during decimation.
 
float criticalTriAspectRatio
 
float tinyEdgeLength
 edges not longer than this value will be collapsed even if it results in appearance of a triangle with high aspect ratio
 
float stabilizer
 
bool optimizeVertexPos
 
int maxDeletedVertices
 Limit on the number of deleted vertices.
 
int maxDeletedFaces
 Limit on the number of deleted faces.
 
MRFaceBitSetregion
 Region on mesh to be decimated, it is updated during the operation.
 
bool collapseNearNotFlippable
 
bool touchNearBdEdges
 Whether to allow collapsing or flipping edges having at least one vertex on (region) boundary.
 
bool touchBdVerts
 
float maxAngleChange
 
bool packMesh
 whether to pack mesh at the end
 
MRProgressCallback progressCallback
 callback to report algorithm progress and cancel it by user request
 
int subdivideParts
 
bool decimateBetweenParts
 
int minFacesInPart
 minimum number of faces in one subdivision part for ( subdivideParts > 1 ) mode
 

Detailed Description

parameters for mrDecimateMesh

Member Data Documentation

◆ collapseNearNotFlippable

bool MRDecimateSettings::collapseNearNotFlippable

Whether to allow collapse of edges incident to notFlippable edges, which can move vertices of notFlippable edges unless they are fixed

◆ criticalTriAspectRatio

float MRDecimateSettings::criticalTriAspectRatio

the algorithm will ignore dihedral angle check if one of triangles had aspect ratio equal or more than this value; and the algorithm will permit temporary increase in aspect ratio after collapse, if before collapse one of the triangles had larger aspect ratio

◆ decimateBetweenParts

bool MRDecimateSettings::decimateBetweenParts

After parallel decimation of all mesh parts is done, whether to perform final decimation of whole mesh region to eliminate small edges near the border of individual parts

◆ maxAngleChange

float MRDecimateSettings::maxAngleChange

Permit edge flips (in addition to collapsing) to improve Delone quality of the mesh if it does not change dihedral angle more than on this value (negative value prohibits any edge flips)

◆ maxBdShift

float MRDecimateSettings::maxBdShift

Maximal shift of a boundary during one edge collapse.

◆ maxDeletedFaces

int MRDecimateSettings::maxDeletedFaces

Limit on the number of deleted faces.

◆ maxDeletedVertices

int MRDecimateSettings::maxDeletedVertices

Limit on the number of deleted vertices.

◆ maxEdgeLen

float MRDecimateSettings::maxEdgeLen

Maximal possible edge length created during decimation.

◆ maxError

float MRDecimateSettings::maxError

for DecimateStrategy::MinimizeError: stop the decimation as soon as the estimated distance deviation from the original mesh is more than this value for DecimateStrategy::ShortestEdgeFirst only: stop the decimation as soon as the shortest edge in the mesh is greater than this value

◆ maxTriangleAspectRatio

float MRDecimateSettings::maxTriangleAspectRatio

Maximal possible aspect ratio of a triangle introduced during decimation.

◆ minFacesInPart

int MRDecimateSettings::minFacesInPart

minimum number of faces in one subdivision part for ( subdivideParts > 1 ) mode

◆ optimizeVertexPos

bool MRDecimateSettings::optimizeVertexPos

if true then after each edge collapse the position of remaining vertex is optimized to minimize local shape change, if false then the edge is collapsed in one of its vertices, which keeps its position

◆ packMesh

bool MRDecimateSettings::packMesh

whether to pack mesh at the end

◆ progressCallback

MRProgressCallback MRDecimateSettings::progressCallback

callback to report algorithm progress and cancel it by user request

◆ region

MRFaceBitSet* MRDecimateSettings::region

Region on mesh to be decimated, it is updated during the operation.

◆ stabilizer

float MRDecimateSettings::stabilizer

Small stabilizer is important to achieve good results on completely planar mesh parts, if your mesh is not-planer everywhere, then you can set it to zero

◆ strategy

MRDecimateStrategy MRDecimateSettings::strategy

◆ subdivideParts

int MRDecimateSettings::subdivideParts

If this value is more than 1, then virtually subdivides the mesh on given number of parts to process them in parallel (using many threads); unlike mrDecimateParallelMesh it does not create copies of mesh regions, so may take less memory to operate; IMPORTANT: please call mrMeshPackOptimally before calling decimating with subdivideParts > 1, otherwise performance will be bad

◆ tinyEdgeLength

float MRDecimateSettings::tinyEdgeLength

edges not longer than this value will be collapsed even if it results in appearance of a triangle with high aspect ratio

◆ touchBdVerts

bool MRDecimateSettings::touchBdVerts

touchBdVerts=true: allow moving and eliminating boundary vertices during edge collapses; touchBdVerts=false: allow only collapsing an edge having only one boundary vertex in that vertex, so position and count of boundary vertices do not change; this setting is ignored if touchNearBdEdges=false

◆ touchNearBdEdges

bool MRDecimateSettings::touchNearBdEdges

Whether to allow collapsing or flipping edges having at least one vertex on (region) boundary.


The documentation for this struct was generated from the following file: