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...
struct  OutlineParameters

Typedefs

using HoleVertIds = std::vector<VertId>
using HolesVertIds = std::vector<HoleVertIds>
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

HolesVertIds findHoleVertIdsByHoleEdges (const MeshTopology &tp, const std::vector< EdgePath > &holePaths)
 return vertices of holes that correspond internal contours representation of PlanarTriangulation
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 HolesVertIds *holeVertsIds=nullptr)
 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 HolesVertIds *holeVertsIds=nullptr)
std::optional< MeshtriangulateDisjointContours (const Contours2d &contours, const HolesVertIds *holeVertsIds=nullptr, std::vector< EdgePath > *outBoundaries=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< MeshtriangulateDisjointContours (const Contours2f &contours, const HolesVertIds *holeVertsIds=nullptr, std::vector< EdgePath > *outBoundaries=nullptr)