pub struct Triangulation { /* private fields */ }Expand description
A planar triangulation over a point set, honouring constraint edges.
Implementations§
Source§impl Triangulation
impl Triangulation
Sourcepub fn triangles(&self) -> &[u32]
pub fn triangles(&self) -> &[u32]
The triangle list, three counter-clockwise vertex indices each.
Indices are into points; an input point merged
into a coincident one (see merged_points)
appears under the kept index.
Sourcepub fn points(&self) -> &[Point2] ⓘ
pub fn points(&self) -> &[Point2] ⓘ
The vertex positions, including any Steiner points appended by refinement.
Sourcepub fn triangle_count(&self) -> usize
pub fn triangle_count(&self) -> usize
Number of triangles.
Sourcepub fn constraints(&self) -> &[Constraint]
pub fn constraints(&self) -> &[Constraint]
The constraint edges this triangulation was built to honour, between kept vertices: an endpoint that was merged into a coincident point is replaced by the kept index. A constraint through input vertices is listed as the pieces between them, each an edge of the output. For a domain triangulation, pieces outside the domain are dropped.
Sourcepub fn merged_points(&self) -> &[MergedPoint]
pub fn merged_points(&self) -> &[MergedPoint]
The input points merged into an exactly coincident point, in ascending input order; empty when every input point is distinct.
Every input index not listed is its own vertex. With this list the merge is lossless: a caller can map each of its indices to the vertex that carries it.
Sourcepub fn outside_points(&self) -> &[u32]
pub fn outside_points(&self) -> &[u32]
The kept vertices that no triangle uses, ascending: the points of a
domain triangulation that lie outside the domain (or inside a hole)
and were dropped, and ring vertices that bound no domain triangle
(an outline corner covered by a hole). Empty for a hull triangulation, where every kept
point is a corner. A merged point is not listed; see
merged_points.
Trait Implementations§
Source§impl Clone for Triangulation
impl Clone for Triangulation
Source§fn clone(&self) -> Triangulation
fn clone(&self) -> Triangulation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more