MeshLib Rust Docs
Loading...
Searching...
No Matches
meshlib::planar_triangulation Namespace Reference

Classes

struct  BaseOutlineParameters
struct  IntersectionInfo
struct  IntersectionsMap
struct  ISweepLineCache
struct  OutlineParameters
struct  TriangulationParameters
struct  WindingMode

Functions

auto get_outline_mesh_std_vector_std_vector_mr_vector2f (contours:&meshlib::std_vector_std_vector_MR_Vector2f, interMap:Option<&mut meshlib::planar_triangulation::IntersectionsMap >, params:Option<&meshlib::planar_triangulation::BaseOutlineParameters >) -> meshlib::Owned< meshlib::Mesh >
auto get_outline_mesh_std_vector_std_vector_mr_vector2d (contours:&meshlib::std_vector_std_vector_MR_Vector2d, interMap:Option<&mut meshlib::planar_triangulation::IntersectionsMap >, params:Option<&meshlib::planar_triangulation::BaseOutlineParameters >) -> meshlib::Owned< meshlib::Mesh >
auto get_outline_std_vector_std_vector_mr_vector2f (contours:&meshlib::std_vector_std_vector_MR_Vector2f, params:Option<&meshlib::planar_triangulation::OutlineParameters >) -> meshlib::Owned< meshlib::std_vector_std_vector_MR_Vector2f >
auto get_outline_std_vector_std_vector_mr_vector2d (contours:&meshlib::std_vector_std_vector_MR_Vector2d, params:Option<&meshlib::planar_triangulation::OutlineParameters >) -> meshlib::Owned< meshlib::std_vector_std_vector_MR_Vector2f >
auto triangulate_contours_std_vector_std_vector_mr_vector2d (contours:&meshlib::std_vector_std_vector_MR_Vector2d, params:Option<&meshlib::planar_triangulation::TriangulationParameters >) -> meshlib::Owned< meshlib::Mesh >
 triangulate 2d contours only closed contours are allowed (first point of each contour should be the same as last point of the contour)
auto triangulate_contours_std_vector_std_vector_mr_vector2f (contours:&meshlib::std_vector_std_vector_MR_Vector2f, params:Option<&meshlib::planar_triangulation::TriangulationParameters >) -> meshlib::Owned< meshlib::Mesh >
auto make_sweep_line_cache () -> meshlib::Owned< meshlib::planar_triangulation::ISweepLineCache >
auto triangulate_disjoint_contours_2_std_vector_std_vector_mr_vector2d (contours:&meshlib::std_vector_std_vector_MR_Vector2d, cache:Option<&mut meshlib::planar_triangulation::ISweepLineCache >) -> meshlib::Owned< meshlib::std_optional_MR_Mesh >
 triangulate 2d contours only closed contours are allowed (first point of each contour should be the same as last point of the contour)
auto triangulate_disjoint_contours_2_std_vector_std_vector_mr_vector2f (contours:&meshlib::std_vector_std_vector_MR_Vector2f, cache:Option<&mut meshlib::planar_triangulation::ISweepLineCache >) -> meshlib::Owned< meshlib::std_optional_MR_Mesh >
auto triangulate_disjoint_contours_5 (mesh:&meshlib::Mesh, loops:&meshlib::std_vector_std_vector_MR_EdgeId, normal:&meshlib::Vector3f, outPatchMap:Option<&mut meshlib::WholeEdgeMap >, cache:Option<&mut meshlib::planar_triangulation::ISweepLineCache >) -> meshlib::Owned< meshlib::std_optional_MR_Mesh >
 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.
auto get_monotone_plan (mesh:&meshlib::Mesh, loops:&meshlib::std_vector_std_vector_MR_EdgeId, normal:&meshlib::Vector3f) -> meshlib::Owned< meshlib::std_optional_MR_HoleFillPlan >
 splits the near-planar region bounded by loops in monotone parts, without triangulating them this is the sweep-line triangulation stopped right after monotonation

Function Documentation

◆ get_monotone_plan()

auto meshlib::planar_triangulation::get_monotone_plan ( mesh:&meshlib::Mesh ,
loops:&meshlib::std_vector_std_vector_MR_EdgeId ,
normal:&meshlib::Vector3f  ) -> meshlib::Owned< meshlib::std_optional_MR_HoleFillPlan >

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 per boundary of one region, bounding holes of mesh as trackRightBoundaryLoop returns them (a slit of one edge is a loop of 2 edges, and a loop of one edge is skipped); which way round a loop runs does not matter; the holes can be several parts of one region split by edges between them, as all the holes of a face cut along contours (the parts between the contours that cross its sides, and both sides of every island), since an edge taken both ways adds zero winding
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, since a chord may duplicate an off-loop mesh edge

Generated from function MR::PlanarTriangulation::getMonotonePlan.

Calls MR_PlanarTriangulation_getMonotonePlan().

◆ get_outline_mesh_std_vector_std_vector_mr_vector2d()

auto meshlib::planar_triangulation::get_outline_mesh_std_vector_std_vector_mr_vector2d ( contours:&meshlib::std_vector_std_vector_MR_Vector2d ,
interMap:Option<&mut meshlib::planar_triangulation::IntersectionsMap > ,
params:Option<&meshlib::planar_triangulation::BaseOutlineParameters >  ) -> meshlib::Owned< meshlib::Mesh >

Generated from function MR::PlanarTriangulation::getOutlineMesh.

Calls MR_PlanarTriangulation_getOutlineMesh_std_vector_std_vector_MR_Vector2d().

◆ get_outline_mesh_std_vector_std_vector_mr_vector2f()

auto meshlib::planar_triangulation::get_outline_mesh_std_vector_std_vector_mr_vector2f ( contours:&meshlib::std_vector_std_vector_MR_Vector2f ,
interMap:Option<&mut meshlib::planar_triangulation::IntersectionsMap > ,
params:Option<&meshlib::planar_triangulation::BaseOutlineParameters >  ) -> meshlib::Owned< meshlib::Mesh >

returns Mesh with boundaries representing outline if input contours interMap optional output intersection map Generated from function MR::PlanarTriangulation::getOutlineMesh.

Calls MR_PlanarTriangulation_getOutlineMesh_std_vector_std_vector_MR_Vector2f().

◆ get_outline_std_vector_std_vector_mr_vector2d()

auto meshlib::planar_triangulation::get_outline_std_vector_std_vector_mr_vector2d ( contours:&meshlib::std_vector_std_vector_MR_Vector2d ,
params:Option<&meshlib::planar_triangulation::OutlineParameters >  ) -> meshlib::Owned< meshlib::std_vector_std_vector_MR_Vector2f >

Generated from function MR::PlanarTriangulation::getOutline.

Calls MR_PlanarTriangulation_getOutline_std_vector_std_vector_MR_Vector2d().

◆ get_outline_std_vector_std_vector_mr_vector2f()

auto meshlib::planar_triangulation::get_outline_std_vector_std_vector_mr_vector2f ( contours:&meshlib::std_vector_std_vector_MR_Vector2f ,
params:Option<&meshlib::planar_triangulation::OutlineParameters >  ) -> meshlib::Owned< meshlib::std_vector_std_vector_MR_Vector2f >

returns Contour representing outline if input contours Generated from function MR::PlanarTriangulation::getOutline.

Calls MR_PlanarTriangulation_getOutline_std_vector_std_vector_MR_Vector2f().

◆ make_sweep_line_cache()

auto meshlib::planar_triangulation::make_sweep_line_cache ( ) -> meshlib::Owned< meshlib::planar_triangulation::ISweepLineCache >

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

Calls MR_PlanarTriangulation_makeSweepLineCache().

◆ triangulate_contours_std_vector_std_vector_mr_vector2d()

auto meshlib::planar_triangulation::triangulate_contours_std_vector_std_vector_mr_vector2d ( contours:&meshlib::std_vector_std_vector_MR_Vector2d ,
params:Option<&meshlib::planar_triangulation::TriangulationParameters >  ) -> meshlib::Owned< meshlib::Mesh >

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.

Calls MR_PlanarTriangulation_triangulateContours_std_vector_std_vector_MR_Vector2d().

◆ triangulate_contours_std_vector_std_vector_mr_vector2f()

auto meshlib::planar_triangulation::triangulate_contours_std_vector_std_vector_mr_vector2f ( contours:&meshlib::std_vector_std_vector_MR_Vector2f ,
params:Option<&meshlib::planar_triangulation::TriangulationParameters >  ) -> meshlib::Owned< meshlib::Mesh >

Generated from function MR::PlanarTriangulation::triangulateContours.

Calls MR_PlanarTriangulation_triangulateContours_std_vector_std_vector_MR_Vector2f().

◆ triangulate_disjoint_contours_2_std_vector_std_vector_mr_vector2d()

auto meshlib::planar_triangulation::triangulate_disjoint_contours_2_std_vector_std_vector_mr_vector2d ( contours:&meshlib::std_vector_std_vector_MR_Vector2d ,
cache:Option<&mut meshlib::planar_triangulation::ISweepLineCache >  ) -> meshlib::Owned< meshlib::std_optional_MR_Mesh >

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.

Calls MR_PlanarTriangulation_triangulateDisjointContours_2_std_vector_std_vector_MR_Vector2d().

◆ triangulate_disjoint_contours_2_std_vector_std_vector_mr_vector2f()

auto meshlib::planar_triangulation::triangulate_disjoint_contours_2_std_vector_std_vector_mr_vector2f ( contours:&meshlib::std_vector_std_vector_MR_Vector2f ,
cache:Option<&mut meshlib::planar_triangulation::ISweepLineCache >  ) -> meshlib::Owned< meshlib::std_optional_MR_Mesh >

Generated from function MR::PlanarTriangulation::triangulateDisjointContours.

Calls MR_PlanarTriangulation_triangulateDisjointContours_2_std_vector_std_vector_MR_Vector2f().

◆ triangulate_disjoint_contours_5()

auto meshlib::planar_triangulation::triangulate_disjoint_contours_5 ( mesh:&meshlib::Mesh ,
loops:&meshlib::std_vector_std_vector_MR_EdgeId ,
normal:&meshlib::Vector3f ,
outPatchMap:Option<&mut meshlib::WholeEdgeMap > ,
cache:Option<&mut meshlib::planar_triangulation::ISweepLineCache >  ) -> meshlib::Owned< meshlib::std_optional_MR_Mesh >

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.

Calls MR_PlanarTriangulation_triangulateDisjointContours_5().