MeshLib Documentation
Loading...
Searching...
No Matches
MRPolylineSubdivide.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
5#include <functional>
6
7namespace MR
8{
9
13
15{
17 float maxEdgeLen = 0;
19 int maxEdgeSplits = 1000;
22 VertBitSet * region = nullptr;
24 VertBitSet * newVerts = nullptr;
27 bool useCurvature = false;
29 std::function<void(VertId)> onVertCreated;
31 std::function<void(EdgeId e1, EdgeId e)> onEdgeSplit;
34};
35
38MRMESH_API int subdividePolyline( Polyline2 & polyline, const PolylineSubdivideSettings & settings = {} );
39MRMESH_API int subdividePolyline( Polyline3 & polyline, const PolylineSubdivideSettings & settings = {} );
40
42
43}
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:576
MRMESH_API int subdividePolyline(Polyline2 &polyline, const PolylineSubdivideSettings &settings={})
Definition MRCameraOrientationPlugin.h:8
Definition MRPolylineSubdivide.h:15
VertBitSet * newVerts
New vertices appeared during subdivision will be added here.
Definition MRPolylineSubdivide.h:24
float maxEdgeLen
Subdivision is stopped when all edges are not longer than this value.
Definition MRPolylineSubdivide.h:17
std::function< void(EdgeId e1, EdgeId e)> onEdgeSplit
this function is called each time edge (e) is split into (e1->e)
Definition MRPolylineSubdivide.h:31
VertBitSet * region
Definition MRPolylineSubdivide.h:22
std::function< void(VertId)> onVertCreated
this function is called each time a new vertex has been created
Definition MRPolylineSubdivide.h:29
bool useCurvature
Definition MRPolylineSubdivide.h:27
ProgressCallback progressCallback
callback to report algorithm progress and cancel it by user request
Definition MRPolylineSubdivide.h:33
int maxEdgeSplits
Maximum number of edge splits allowed.
Definition MRPolylineSubdivide.h:19