Loading...

Searching...

No Matches

MR::SubdivideSettings Struct Reference

`#include <MRMeshSubdivide.h>`

## Public Attributes | |

float | maxEdgeLen = 0 |

Subdivision is stopped when all edges inside or on the boundary of the region are not longer than this value. | |

int | maxEdgeSplits = 1000 |

Maximum number of edge splits allowed. | |

float | maxDeviationAfterFlip = 1 |

Improves local mesh triangulation by doing edge flips if it does not make too big surface deviation. | |

float | maxAngleChangeAfterFlip = FLT_MAX |

Improves local mesh triangulation by doing edge flips if it does not change dihedral angle more than on this value (in radians) | |

float | criticalAspectRatioFlip = 1000.0f |

FaceBitSet * | region = nullptr |

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

UndirectedEdgeBitSet * | notFlippable = nullptr |

Edges specified by this bit-set will never be flipped, but they can be split so it is updated during the operation. | |

VertBitSet * | newVerts = nullptr |

New vertices appeared during subdivision will be added here. | |

bool | subdivideBorder = true |

float | maxTriAspectRatio = 0 |

The subdivision stops as soon as all triangles (in the region) have aspect ratio below or equal to this value. | |

float | maxSplittableTriAspectRatio = FLT_MAX |

bool | smoothMode = false |

float | minSharpDihedralAngle = PI_F / 6 |

bool | projectOnOriginalMesh = false |

if true, then every new vertex will be projected on the original mesh (before smoothing) | |

std::function< void(VertId)> | onVertCreated |

this function is called each time a new vertex has been created, but before the ring is made Delone | |

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< bool(EdgeId e)> | beforeEdgeSplit |

this function is called each time edge (e) is going to split, if it returns false then this split will be skipped | |

ProgressCallback | progressCallback = {} |

callback to report algorithm progress and cancel it by user request | |

std::function<bool(EdgeId e)> MR::SubdivideSettings::beforeEdgeSplit |

this function is called each time edge (e) is going to split, if it returns false then this split will be skipped

float MR::SubdivideSettings::criticalAspectRatioFlip = 1000.0f |

If this value is less than FLT_MAX then edge flips will ignore dihedral angle check if one of triangles has aspect ratio more than this value Unit: rad

float MR::SubdivideSettings::maxAngleChangeAfterFlip = FLT_MAX |

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

float MR::SubdivideSettings::maxDeviationAfterFlip = 1 |

Improves local mesh triangulation by doing edge flips if it does not make too big surface deviation.

float MR::SubdivideSettings::maxEdgeLen = 0 |

Subdivision is stopped when all edges inside or on the boundary of the region are not longer than this value.

int MR::SubdivideSettings::maxEdgeSplits = 1000 |

Maximum number of edge splits allowed.

float MR::SubdivideSettings::maxSplittableTriAspectRatio = FLT_MAX |

An edge is subdivided only if both its left and right triangles have aspect ratio below or equal to this value. So this is a maximum aspect ratio of a triangle that can be split on two before Delone optimization. Please set it to a smaller value only if subdivideBorder==false, otherwise many narrow triangles can appear near border

float MR::SubdivideSettings::maxTriAspectRatio = 0 |

The subdivision stops as soon as all triangles (in the region) have aspect ratio below or equal to this value.

float MR::SubdivideSettings::minSharpDihedralAngle = PI_F / 6 |

In case of activated smoothMode, the smoothness is locally deactivated at the edges having dihedral angle at least this value

VertBitSet* MR::SubdivideSettings::newVerts = nullptr |

New vertices appeared during subdivision will be added here.

UndirectedEdgeBitSet* MR::SubdivideSettings::notFlippable = nullptr |

Edges specified by this bit-set will never be flipped, but they can be split so it is updated during the operation.

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

std::function<void(VertId)> MR::SubdivideSettings::onVertCreated |

this function is called each time a new vertex has been created, but before the ring is made Delone

ProgressCallback MR::SubdivideSettings::progressCallback = {} |

callback to report algorithm progress and cancel it by user request

bool MR::SubdivideSettings::projectOnOriginalMesh = false |

if true, then every new vertex will be projected on the original mesh (before smoothing)

FaceBitSet* MR::SubdivideSettings::region = nullptr |

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

bool MR::SubdivideSettings::smoothMode = false |

Puts new vertices so that they form a smooth surface together with existing vertices. This option works best for natural surfaces without sharp edges in between triangles

bool MR::SubdivideSettings::subdivideBorder = true |

If false do not touch border edges (cannot subdivide lone faces)

use MR::findRegionOuterFaces to find boundary faces

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