pub struct HalfEdge {
pub origin: VertexId,
pub twin: HalfEdgeId,
pub next: HalfEdgeId,
pub prev: HalfEdgeId,
pub face: FaceId,
}Expand description
One direction of an edge.
The twin runs the other way along the same geometric segment. Storing both directions is what makes “the face on the other side” a constant-time question rather than a search.
Fields§
§origin: VertexIdVertex this half-edge leaves from.
twin: HalfEdgeIdThe opposite half-edge along the same segment.
next: HalfEdgeIdNext half-edge counter-clockwise around face.
prev: HalfEdgeIdPrevious half-edge around face.
face: FaceIdFace lying to the left of this half-edge.
Trait Implementations§
impl Copy for HalfEdge
impl StructuralPartialEq for HalfEdge
Auto Trait Implementations§
impl Freeze for HalfEdge
impl RefUnwindSafe for HalfEdge
impl Send for HalfEdge
impl Sync for HalfEdge
impl Unpin for HalfEdge
impl UnwindSafe for HalfEdge
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