pub struct HalfedgeTriangulation {
pub halfedges: Vec<Halfedge>,
pub contour_end: usize,
}Expand description
Triangulation result represented directly as halfedges, ported from
HalfedgeTriangulation in C++ polygon_internal.h.
halfedges[0..contour_end] are the exterior contour halfedges (the
input edges reversed, so their end_vert holds the original idx of the
edge’s start point). halfedges[contour_end..] hold three halfedges per
output triangle. All vertex fields are original idx values.
Pairing happens incrementally with a LIFO multimap keyed on (start, end),
so duplicate vertex pairs (from degenerate/overlapping polygons) still pair
one-to-one within the triangulation. This is what Face2Tri relies on to
keep boolean results manifold on exactly-coplanar faces — re-deriving pairs
from vertex positions after the fact cannot distinguish duplicates.
Fields§
§halfedges: Vec<Halfedge>§contour_end: usizeImplementations§
Auto Trait Implementations§
impl Freeze for HalfedgeTriangulation
impl RefUnwindSafe for HalfedgeTriangulation
impl Send for HalfedgeTriangulation
impl Sync for HalfedgeTriangulation
impl Unpin for HalfedgeTriangulation
impl UnsafeUnpin for HalfedgeTriangulation
impl UnwindSafe for HalfedgeTriangulation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more