MeshLib C# Docs
Loading...
Searching...
No Matches
MR.PlanarTriangulation Class Reference

Classes

class  _ByValue_IntersectionsMap
 This is used as a function parameter when the underlying function receives IntersectionsMap by value. Usage:
class  _InOptConst_BaseOutlineParameters
 This is used for optional parameters of class BaseOutlineParameters with default arguments. This is only used const parameters. For non-const ones we have _InOptMut_BaseOutlineParameters. Usage:
class  _InOptConst_IntersectionInfo
 This is used for optional parameters of class IntersectionInfo with default arguments. This is only used const parameters. For non-const ones we have _InOptMut_IntersectionInfo. Usage:
class  _InOptConst_IntersectionsMap
 This is used for optional parameters of class IntersectionsMap with default arguments. This is only used const parameters. For non-const ones we have _InOptMut_IntersectionsMap. Usage:
class  _InOptConst_ISweepLineCache
 This is used for optional parameters of class ISweepLineCache with default arguments. This is only used const parameters. For non-const ones we have _InOptMut_ISweepLineCache. Usage:
class  _InOptConst_OutlineParameters
 This is used for optional parameters of class OutlineParameters with default arguments. This is only used const parameters. For non-const ones we have _InOptMut_OutlineParameters. Usage:
class  _InOptConst_TriangulationParameters
 This is used for optional parameters of class TriangulationParameters with default arguments. This is only used const parameters. For non-const ones we have _InOptMut_TriangulationParameters. Usage:
class  _InOptMut_BaseOutlineParameters
 This is used for optional parameters of class BaseOutlineParameters with default arguments. This is only used mutable parameters. For const ones we have _InOptConst_BaseOutlineParameters. Usage:
class  _InOptMut_IntersectionInfo
 This is used for optional parameters of class IntersectionInfo with default arguments. This is only used mutable parameters. For const ones we have _InOptConst_IntersectionInfo. Usage:
class  _InOptMut_IntersectionsMap
 This is used for optional parameters of class IntersectionsMap with default arguments. This is only used mutable parameters. For const ones we have _InOptConst_IntersectionsMap. Usage:
class  _InOptMut_ISweepLineCache
 This is used for optional parameters of class ISweepLineCache with default arguments. This is only used mutable parameters. For const ones we have _InOptConst_ISweepLineCache. Usage:
class  _InOptMut_OutlineParameters
 This is used for optional parameters of class OutlineParameters with default arguments. This is only used mutable parameters. For const ones we have _InOptConst_OutlineParameters. Usage:
class  _InOptMut_TriangulationParameters
 This is used for optional parameters of class TriangulationParameters with default arguments. This is only used mutable parameters. For const ones we have _InOptConst_TriangulationParameters. Usage:
class  BaseOutlineParameters
 Generated from class MR.PlanarTriangulation.BaseOutlineParameters. This is the non-const half of the class. More...
class  Const_BaseOutlineParameters
 Generated from class MR.PlanarTriangulation.BaseOutlineParameters. This is the const half of the class. More...
class  Const_IntersectionInfo
 Info about intersection point for mapping Generated from class MR.PlanarTriangulation.IntersectionInfo. This is the const half of the class. More...
class  Const_IntersectionsMap
 struct to map new vertices (only appear on intersections) of the outline to it's edges Generated from class MR.PlanarTriangulation.IntersectionsMap. This is the const half of the class. More...
class  Const_ISweepLineCache
 keeps the internal buffers of the sweep-line triangulation alive between runs, so a caller triangulating many contour sets one by one avoids re-allocating them on every call; the entries returning a Mesh move the topology and the points out into it, so those two grow again on the next run, while triangulateDisjointContoursTopology keeps everything; one cache must not be used by several threads at once Generated from class MR.PlanarTriangulation.ISweepLineCache. This is the const half of the class. More...
class  Const_OutlineParameters
 Generated from class MR.PlanarTriangulation.OutlineParameters. This is the const half of the class. More...
class  Const_TriangulationParameters
 Generated from class MR.PlanarTriangulation.TriangulationParameters. This is the const half of the class. More...
class  IntersectionInfo
 Info about intersection point for mapping Generated from class MR.PlanarTriangulation.IntersectionInfo. This is the non-const half of the class. More...
class  IntersectionsMap
 struct to map new vertices (only appear on intersections) of the outline to it's edges Generated from class MR.PlanarTriangulation.IntersectionsMap. This is the non-const half of the class. More...
class  ISweepLineCache
 keeps the internal buffers of the sweep-line triangulation alive between runs, so a caller triangulating many contour sets one by one avoids re-allocating them on every call; the entries returning a Mesh move the topology and the points out into it, so those two grow again on the next run, while triangulateDisjointContoursTopology keeps everything; one cache must not be used by several threads at once Generated from class MR.PlanarTriangulation.ISweepLineCache. This is the non-const half of the class. More...
class  OutlineParameters
 Generated from class MR.PlanarTriangulation.OutlineParameters. This is the non-const half of the class. More...
class  TriangulationParameters
 Generated from class MR.PlanarTriangulation.TriangulationParameters. This is the non-const half of the class. More...

Public Types

enum  WindingMode : int { NonZero = 0 , Positive = 1 , Negative = 2 }
 Specify mode of detecting inside and outside parts of triangulation. More...

Static Public Member Functions

static unsafe MR.Mesh getOutlineMesh (MR.Std.Const_Vector_StdVectorMRVector2f contours, MR.PlanarTriangulation.IntersectionsMap? interMap=null, MR.PlanarTriangulation.Const_BaseOutlineParameters? params_=null)
 returns Mesh with boundaries representing outline if input contours interMap optional output intersection map Generated from function MR.PlanarTriangulation.getOutlineMesh. Parameter params_ defaults to {}.
static unsafe MR.Mesh getOutlineMesh (MR.Std.Const_Vector_StdVectorMRVector2d contours, MR.PlanarTriangulation.IntersectionsMap? interMap=null, MR.PlanarTriangulation.Const_BaseOutlineParameters? params_=null)
 Generated from function MR.PlanarTriangulation.getOutlineMesh. Parameter params_ defaults to {}.
static unsafe MR.Std.Vector_StdVectorMRVector2f getOutline (MR.Std.Const_Vector_StdVectorMRVector2f contours, MR.PlanarTriangulation.Const_OutlineParameters? params_=null)
 returns Contour representing outline if input contours Generated from function MR.PlanarTriangulation.getOutline. Parameter params_ defaults to {}.
static unsafe MR.Std.Vector_StdVectorMRVector2f getOutline (MR.Std.Const_Vector_StdVectorMRVector2d contours, MR.PlanarTriangulation.Const_OutlineParameters? params_=null)
 Generated from function MR.PlanarTriangulation.getOutline. Parameter params_ defaults to {}.
static unsafe MR.Mesh triangulateContours (MR.Std.Const_Vector_StdVectorMRVector2d contours, MR.PlanarTriangulation.Const_TriangulationParameters? params_=null)
 triangulate 2d contours only closed contours are allowed (first point of each contour should be the same as last point of the contour)
static unsafe MR.Mesh triangulateContours (MR.Std.Const_Vector_StdVectorMRVector2f contours, MR.PlanarTriangulation.Const_TriangulationParameters? params_=null)
 Generated from function MR.PlanarTriangulation.triangulateContours. Parameter params_ defaults to {}.
static unsafe void * makeSweepLineCache ()
 creates a cache for the sweep-line triangulation Generated from function MR.PlanarTriangulation.makeSweepLineCache.
static unsafe MR.Std.Optional_MRMesh triangulateDisjointContours (MR.Std.Const_Vector_StdVectorMRVector2d contours, MR.PlanarTriangulation.ISweepLineCache? cache=null)
 triangulate 2d contours only closed contours are allowed (first point of each contour should be the same as last point of the contour)
static unsafe MR.Std.Optional_MRMesh triangulateDisjointContours (MR.Std.Const_Vector_StdVectorMRVector2f contours, MR.PlanarTriangulation.ISweepLineCache? cache=null)
 Generated from function MR.PlanarTriangulation.triangulateDisjointContours.
static unsafe MR.Std.Optional_MRMesh triangulateDisjointContours (MR.Const_Mesh mesh, MR.Std.Const_Vector_StdVectorMREdgeId loops, in MR.Vector3f normal, MR.WholeEdgeMap? outPatchMap=null, MR.PlanarTriangulation.ISweepLineCache? cache=null)
 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.
static unsafe MR.Std.Optional_MRHoleFillPlan getMonotonePlan (MR.Const_Mesh mesh, MR.Std.Const_Vector_StdVectorMREdgeId loops, in MR.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

Member Enumeration Documentation

◆ WindingMode

Specify mode of detecting inside and outside parts of triangulation.

Enumerator
NonZero 
Positive 
Negative 

Member Function Documentation

◆ getMonotonePlan()

unsafe MR.Std.Optional_MRHoleFillPlan MR.PlanarTriangulation.getMonotonePlan ( MR.Const_Mesh mesh,
MR.Std.Const_Vector_StdVectorMREdgeId loops,
in MR.Vector3f normal )
inlinestatic

splits the near-planar region bounded by loops in monotone parts, without triangulating them this is the sweep-line triangulation stopped right after monotonation

Parameters
loopsone closed EdgeLoop of at least 3 edges per boundary of one region, bounding holes of mesh as trackRightBoundaryLoop returns them; which way round a loop runs does not matter
normalthe orientation the region is monotone around, see triangulateDisjointContours
Returns
std::nullopt if the loops intersect or a chord would land in a face instead of a hole, so that the caller can fall back on filling every loop separately; otherwise a plan with numTris == 0 for executeHoleFillPlan, which then only adds edges (empty if already monotone, a no-op). Validate it with isFillingMultipleEdgeFree: a chord may duplicate an off-loop mesh edge Generated from function MR.PlanarTriangulation.getMonotonePlan.

◆ getOutline() [1/2]

unsafe MR.Std.Vector_StdVectorMRVector2f MR.PlanarTriangulation.getOutline ( MR.Std.Const_Vector_StdVectorMRVector2d contours,
MR.PlanarTriangulation.Const_OutlineParameters? params_ = null )
inlinestatic

Generated from function MR.PlanarTriangulation.getOutline. Parameter params_ defaults to {}.

◆ getOutline() [2/2]

unsafe MR.Std.Vector_StdVectorMRVector2f MR.PlanarTriangulation.getOutline ( MR.Std.Const_Vector_StdVectorMRVector2f contours,
MR.PlanarTriangulation.Const_OutlineParameters? params_ = null )
inlinestatic

returns Contour representing outline if input contours Generated from function MR.PlanarTriangulation.getOutline. Parameter params_ defaults to {}.

◆ getOutlineMesh() [1/2]

unsafe MR.Mesh MR.PlanarTriangulation.getOutlineMesh ( MR.Std.Const_Vector_StdVectorMRVector2d contours,
MR.PlanarTriangulation.IntersectionsMap? interMap = null,
MR.PlanarTriangulation.Const_BaseOutlineParameters? params_ = null )
inlinestatic

Generated from function MR.PlanarTriangulation.getOutlineMesh. Parameter params_ defaults to {}.

◆ getOutlineMesh() [2/2]

unsafe MR.Mesh MR.PlanarTriangulation.getOutlineMesh ( MR.Std.Const_Vector_StdVectorMRVector2f contours,
MR.PlanarTriangulation.IntersectionsMap? interMap = null,
MR.PlanarTriangulation.Const_BaseOutlineParameters? params_ = null )
inlinestatic

returns Mesh with boundaries representing outline if input contours interMap optional output intersection map Generated from function MR.PlanarTriangulation.getOutlineMesh. Parameter params_ defaults to {}.

◆ makeSweepLineCache()

unsafe void * MR.PlanarTriangulation.makeSweepLineCache ( )
inlinestatic

creates a cache for the sweep-line triangulation Generated from function MR.PlanarTriangulation.makeSweepLineCache.

◆ triangulateContours() [1/2]

unsafe MR.Mesh MR.PlanarTriangulation.triangulateContours ( MR.Std.Const_Vector_StdVectorMRVector2d contours,
MR.PlanarTriangulation.Const_TriangulationParameters? params_ = null )
inlinestatic

triangulate 2d contours only closed contours are allowed (first point of each contour should be the same as last point of the contour)

Returns
return created mesh Generated from function MR.PlanarTriangulation.triangulateContours. Parameter params_ defaults to {}.

◆ triangulateContours() [2/2]

unsafe MR.Mesh MR.PlanarTriangulation.triangulateContours ( MR.Std.Const_Vector_StdVectorMRVector2f contours,
MR.PlanarTriangulation.Const_TriangulationParameters? params_ = null )
inlinestatic

Generated from function MR.PlanarTriangulation.triangulateContours. Parameter params_ defaults to {}.

◆ triangulateDisjointContours() [1/3]

unsafe MR.Std.Optional_MRMesh MR.PlanarTriangulation.triangulateDisjointContours ( MR.Const_Mesh mesh,
MR.Std.Const_Vector_StdVectorMREdgeId loops,
in MR.Vector3f normal,
MR.WholeEdgeMap? outPatchMap = null,
MR.PlanarTriangulation.ISweepLineCache? cache = null )
inlinestatic

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.

Parameters
loopsone closed EdgeLoop per contour (as produced by trackRightBoundaryLoop on each hole edge)
outPatchMapoptional output: for each patch boundary edge (by undirected id) the mesh edge it copies, directed along it; edges past its size are the triangulation's own
Returns
std::nullopt if the loops self-intersect, otherwise the patch mesh Generated from function MR.PlanarTriangulation.triangulateDisjointContours.

◆ triangulateDisjointContours() [2/3]

unsafe MR.Std.Optional_MRMesh MR.PlanarTriangulation.triangulateDisjointContours ( MR.Std.Const_Vector_StdVectorMRVector2d contours,
MR.PlanarTriangulation.ISweepLineCache? cache = null )
inlinestatic

triangulate 2d contours only closed contours are allowed (first point of each contour should be the same as last point of the contour)

Returns
std::optional<Mesh> : if some contours intersect return false, otherwise return created mesh Generated from function MR.PlanarTriangulation.triangulateDisjointContours.

◆ triangulateDisjointContours() [3/3]

unsafe MR.Std.Optional_MRMesh MR.PlanarTriangulation.triangulateDisjointContours ( MR.Std.Const_Vector_StdVectorMRVector2f contours,
MR.PlanarTriangulation.ISweepLineCache? cache = null )
inlinestatic

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