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. | |
MRFaceBitSet * | region |
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 | |
parameters for mrDecimateMesh
bool MRDecimateSettings::collapseNearNotFlippable |
Whether to allow collapse of edges incident to notFlippable edges, which can move vertices of notFlippable edges unless they are fixed
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
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
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)
float MRDecimateSettings::maxBdShift |
Maximal shift of a boundary during one edge collapse.
int MRDecimateSettings::maxDeletedFaces |
Limit on the number of deleted faces.
int MRDecimateSettings::maxDeletedVertices |
Limit on the number of deleted vertices.
float MRDecimateSettings::maxEdgeLen |
Maximal possible edge length created during decimation.
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
float MRDecimateSettings::maxTriangleAspectRatio |
Maximal possible aspect ratio of a triangle introduced during decimation.
int MRDecimateSettings::minFacesInPart |
minimum number of faces in one subdivision part for ( subdivideParts > 1 ) mode
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
bool MRDecimateSettings::packMesh |
whether to pack mesh at the end
MRProgressCallback MRDecimateSettings::progressCallback |
callback to report algorithm progress and cancel it by user request
MRFaceBitSet* MRDecimateSettings::region |
Region on mesh to be decimated, it is updated during the operation.
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
MRDecimateStrategy MRDecimateSettings::strategy |
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
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
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
bool MRDecimateSettings::touchNearBdEdges |
Whether to allow collapsing or flipping edges having at least one vertex on (region) boundary.