MeshLib
 
Loading...
Searching...
No Matches
MR::RemeshSettings Struct Reference

#include <MRMeshDecimate.h>

Public Attributes

float targetEdgeLen = 0.001f
 
int maxEdgeSplits = 10'000'000
 Maximum number of edge splits allowed during subdivision.
 
float maxAngleChangeAfterFlip = 30 * PI_F / 180.0f
 Improves local mesh triangulation by doing edge flips if it does not change dihedral angle more than on this value.
 
float maxBdShift = FLT_MAX
 Maximal shift of a boundary during one edge collapse.
 
bool useCurvature = false
 
int finalRelaxIters = 0
 
bool finalRelaxNoShrinkage = false
 if true prevents the surface from shrinkage after many iterations
 
FaceBitSetregion = nullptr
 Region on mesh to be changed, it is updated during the operation.
 
UndirectedEdgeBitSet * notFlippable = nullptr
 
bool packMesh = false
 whether to pack mesh at the end
 
bool projectOnOriginalMesh = false
 
std::function< void(EdgeId e1, EdgeId e)> onEdgeSplit
 this function is called each time edge (e) is split into (e1->e), but before the ring is made Delone
 
std::function< void(EdgeId e, EdgeId e1)> onEdgeDel
 if valid (e1) is given then dest(e) = dest(e1) and their origins are in different ends of collapsing edge, e1 shall take the place of e
 
std::function< bool(EdgeId edgeToCollapse, const Vector3f &newEdgeOrgPos)> preCollapse
 The user can provide this optional callback that is invoked immediately before edge collapse;.
 
ProgressCallback progressCallback
 callback to report algorithm progress and cancel it by user request
 

Member Data Documentation

◆ finalRelaxIters

int MR::RemeshSettings::finalRelaxIters = 0

the number of iterations of final relaxation of mesh vertices; few iterations can give almost perfect uniformity of the vertices and edge lengths but deviate from the original surface

◆ finalRelaxNoShrinkage

bool MR::RemeshSettings::finalRelaxNoShrinkage = false

if true prevents the surface from shrinkage after many iterations

◆ maxAngleChangeAfterFlip

float MR::RemeshSettings::maxAngleChangeAfterFlip = 30 * PI_F / 180.0f

Improves local mesh triangulation by doing edge flips if it does not change dihedral angle more than on this value.

◆ maxBdShift

float MR::RemeshSettings::maxBdShift = FLT_MAX

Maximal shift of a boundary during one edge collapse.

◆ maxEdgeSplits

int MR::RemeshSettings::maxEdgeSplits = 10'000'000

Maximum number of edge splits allowed during subdivision.

◆ notFlippable

UndirectedEdgeBitSet* MR::RemeshSettings::notFlippable = nullptr

Edges specified by this bit-set will never be flipped or collapsed, but they can be replaced during collapse of nearby edges so it is updated during the operation; also the vertices incident to these edges are excluded from relaxation

◆ onEdgeDel

std::function<void(EdgeId e, EdgeId e1)> MR::RemeshSettings::onEdgeDel

if valid (e1) is given then dest(e) = dest(e1) and their origins are in different ends of collapsing edge, e1 shall take the place of e

◆ onEdgeSplit

std::function<void(EdgeId e1, EdgeId e)> MR::RemeshSettings::onEdgeSplit

this function is called each time edge (e) is split into (e1->e), but before the ring is made Delone

◆ packMesh

bool MR::RemeshSettings::packMesh = false

whether to pack mesh at the end

◆ preCollapse

std::function<bool( EdgeId edgeToCollapse, const Vector3f& newEdgeOrgPos )> MR::RemeshSettings::preCollapse

The user can provide this optional callback that is invoked immediately before edge collapse;.

It receives the edge being collapsed: its destination vertex will disappear, and its origin vertex will get new position (provided as the second argument) after collapse; If the callback returns false, then the collapse is prohibited

◆ progressCallback

ProgressCallback MR::RemeshSettings::progressCallback

callback to report algorithm progress and cancel it by user request

◆ projectOnOriginalMesh

bool MR::RemeshSettings::projectOnOriginalMesh = false

if true, then every new vertex after subdivision will be projected on the original mesh (before smoothing); this does not affect the vertices moved on other stages of the processing

◆ region

FaceBitSet* MR::RemeshSettings::region = nullptr

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

◆ targetEdgeLen

float MR::RemeshSettings::targetEdgeLen = 0.001f

the algorithm will try to keep the length of all edges close to this value, splitting the edges longer than targetEdgeLen, and then eliminating the edges shorter than targetEdgeLen

◆ useCurvature

bool MR::RemeshSettings::useCurvature = false

This option in subdivision works best for natural surfaces, where all triangles are close to equilateral and have similar area, and no sharp edges in between


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