MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::PlanarTriangulation Namespace Reference

Classes

struct  BaseOutlineParameters
struct  IntersectionInfo
 Info about intersection point for mapping. More...
struct  IntersectionsMap
 struct to map new vertices (only appear on intersections) of the outline to it's edges More...
class  ISweepLineCache
struct  OutlineParameters
struct  TriangulationParameters

Typedefs

using ContourIdMap = std::vector<IntersectionInfo>
using ContoursIdMap = std::vector<ContourIdMap>

Enumerations

enum class  WindingMode { WindingMode::NonZero , WindingMode::Positive , WindingMode::Negative }
 Specify mode of detecting inside and outside parts of triangulation. More...

Functions

Mesh getOutlineMesh (const Contours2f &contours, IntersectionsMap *interMap=nullptr, const BaseOutlineParameters &params={})
Mesh getOutlineMesh (const Contours2d &contours, IntersectionsMap *interMap=nullptr, const BaseOutlineParameters &params={})
Contours2f getOutline (const Contours2f &contours, const OutlineParameters &params={})
 returns Contour representing outline if input contours
Contours2f getOutline (const Contours2d &contours, const OutlineParameters &params={})
Mesh triangulateContours (const Contours2d &contours, const TriangulationParameters &params={})
 triangulate 2d contours only closed contours are allowed (first point of each contour should be the same as last point of the contour)
Mesh triangulateContours (const Contours2f &contours, const TriangulationParameters &params={})
std::unique_ptr< ISweepLineCache > makeSweepLineCache ()
 creates a cache for the sweep-line triangulation
std::optional< Mesh > triangulateDisjointContours (const Contours2d &contours, ISweepLineCache *cache=nullptr)
 triangulate 2d contours only closed contours are allowed (first point of each contour should be the same as last point of the contour)
std::optional< Mesh > triangulateDisjointContours (const Contours2f &contours, ISweepLineCache *cache=nullptr)
std::optional< Mesh > triangulateDisjointContours (const Mesh &mesh, const EdgeLoops &loops, const Vector3f &normal, WholeEdgeMap *outPatchMap=nullptr, ISweepLineCache *cache=nullptr)
 triangulate hole boundary loops of mesh in the mesh's own 3d space, orienting faces around normal combinatorics run on the dominant-axis projection of normal; output vertices keep the exact mesh coordinates (no projection round-trip), and loops sharing a mesh vertex are merged by identity.
MR_BIND_IGNORE MeshTopology * triangulateDisjointContoursTopology (const Mesh &mesh, const EdgeLoops &loops, const Vector3f &normal, WholeEdgeMap &outPatchMap, ISweepLineCache &cache)
std::optional< HoleFillPlan > getMonotonePlan (const Mesh &mesh, const EdgeLoops &loops, const Vector3f &normal)
 splits the near-planar region bounded by loops in monotone parts, without triangulating them this is the sweep-line triangulation stopped right after monotonation