19struct DecimatePolylineSettings
54 std::function<bool( EdgeId edgeToCollapse,
const V & newEdgeOrgPos )>
preCollapse;
64 std::function<void( UndirectedEdgeId ue,
float & collapseErrorSq, V & collapsePos )>
adjustCollapse;
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
std::vector<T>-like container that requires specific indexing type,
Definition MRMesh/MRVector.h:20
MRMESH_API DecimatePolylineResult decimateContour(Contour2f &contour, const DecimatePolylineSettings2 &settings={})
Collapse edges in the contour according to the settings.
MRMESH_API DecimatePolylineResult decimatePolyline(Polyline2 &polyline, const DecimatePolylineSettings2 &settings={})
Collapse edges in the polyline according to the settings.
Definition MRCameraOrientationPlugin.h:8
Contour2< float > Contour2f
Definition MRMesh/MRMeshFwd.h:275
Contour3< float > Contour3f
Definition MRMesh/MRMeshFwd.h:277
Results of MR::decimateContour.
float errorIntroduced
Max different (as distance) between original contour and result contour.
Definition MRPolylineDecimate.h:84
int vertsDeleted
Number deleted verts. Same as the number of performed collapses.
Definition MRPolylineDecimate.h:83
Parameters structure for MR::decimatePolyline.
bool optimizeVertexPos
Definition MRPolylineDecimate.h:34
Vector< QuadraticForm< V >, VertId > * vertForms
If not null, then on input: if the vector is not empty then it is taken for initialization instead of...
Definition MRPolylineDecimate.h:71
float maxError
Limit from above on the maximum distance from moved vertices to original contour.
Definition MRPolylineDecimate.h:22
int maxDeletedVertices
Limit on the number of deleted vertices.
Definition MRPolylineDecimate.h:37
float stabilizer
Definition MRPolylineDecimate.h:30
float maxEdgeLen
Maximal possible edge length created during decimation.
Definition MRPolylineDecimate.h:25
std::function< void(UndirectedEdgeId ue, float &collapseErrorSq, V &collapsePos)> adjustCollapse
The user can provide this optional callback for adjusting error introduced by this edge collapse and ...
Definition MRPolylineDecimate.h:64
VertBitSet * region
Definition MRPolylineDecimate.h:41
std::function< bool(EdgeId edgeToCollapse, const V &newEdgeOrgPos)> preCollapse
The user can provide this optional callback that is invoked immediately before edge collapse;.
Definition MRPolylineDecimate.h:54
bool touchBdVertices
Definition MRPolylineDecimate.h:46