pub struct HalfEdge<IC>where
IC: IsIndexContainer,{ /* private fields */ }
Expand description
HalfEdge, the half edge data structure
Implementations§
Source§impl<IC> HalfEdge<IC>where
IC: IsIndexContainer,
impl<IC> HalfEdge<IC>where
IC: IsIndexContainer,
Sourcepub fn new<T, M>(mesh: &M) -> Self
pub fn new<T, M>(mesh: &M) -> Self
Creates a new HalfEdge3D for the given IsMesh3D This only stays valid if IMesh3D is not changed after creation The mesh must be manifold
Sourcepub fn tail(&self, id: EId) -> Result<VId>
pub fn tail(&self, id: EId) -> Result<VId>
Returns the ID of the vertex the edge originates from (error if id out of bounds)
Sourcepub fn face(&self, id: EId) -> Result<FId>
pub fn face(&self, id: EId) -> Result<FId>
Returns the ID of the face the edge belongs to (error if id out of bounds)
Sourcepub fn twin(&self, id: EId) -> Result<Option<EId>>
pub fn twin(&self, id: EId) -> Result<Option<EId>>
Returns the ID of the twin edge (None if there isn’t any) (error if id out of bounds)
Sourcepub fn next(&self, id: EId) -> Result<EId>
pub fn next(&self, id: EId) -> Result<EId>
Returns the ID of the edge after this edge (error if id out of bounds)
Sourcepub fn prev(&self, id: EId) -> Result<EId>
pub fn prev(&self, id: EId) -> Result<EId>
Returns the ID of the edge before this edge (error if id out of bounds)
Sourcepub fn edges_originating(&self, id: VId, result: &mut Vec<EId>) -> Result<()>
pub fn edges_originating(&self, id: VId, result: &mut Vec<EId>) -> Result<()>
Appends all edges originating (pointing away) from the given vertex (error if id out of bounds)
Sourcepub fn edges_ending(
&self,
id: VId,
cache: &mut Vec<EId>,
result: &mut Vec<EId>,
) -> Result<()>
pub fn edges_ending( &self, id: VId, cache: &mut Vec<EId>, result: &mut Vec<EId>, ) -> Result<()>
Appends all edges ending (pointing at) the given vertex (error if id out of bounds) cache is used to avoid allocations, pass any Vec
Sourcepub fn edges_all(
&self,
id: VId,
cache: &mut Vec<EId>,
result: &mut Vec<EId>,
) -> Result<()>
pub fn edges_all( &self, id: VId, cache: &mut Vec<EId>, result: &mut Vec<EId>, ) -> Result<()>
Appends all edges connected to the vertex (both originating and ending) (error if id out of bounds) cache is used to avoid allocations, pass any Vec
Sourcepub fn faces(
&self,
id: VId,
cache: &mut Vec<EId>,
result: &mut Vec<FId>,
) -> Result<()>
pub fn faces( &self, id: VId, cache: &mut Vec<EId>, result: &mut Vec<FId>, ) -> Result<()>
Appends all faces a vertex is part of (error if id out of bounds) cache is used to avoid allocations, pass any Vec
Sourcepub fn ensure_edge_id(&self, id: EId) -> Result<()>
pub fn ensure_edge_id(&self, id: EId) -> Result<()>
Fails if the edge ID is out of bounds
Sourcepub fn ensure_vertex_id(&self, id: VId) -> Result<()>
pub fn ensure_vertex_id(&self, id: VId) -> Result<()>
Fails if the vertex ID is out of bounds
Trait Implementations§
Source§impl<IC> Ord for HalfEdge<IC>where
IC: IsIndexContainer + Ord,
impl<IC> Ord for HalfEdge<IC>where
IC: IsIndexContainer + Ord,
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<IC> PartialOrd for HalfEdge<IC>where
IC: IsIndexContainer + PartialOrd,
impl<IC> PartialOrd for HalfEdge<IC>where
IC: IsIndexContainer + PartialOrd,
impl<IC> Eq for HalfEdge<IC>where
IC: IsIndexContainer + Eq,
impl<IC> StructuralPartialEq for HalfEdge<IC>where
IC: IsIndexContainer,
Auto Trait Implementations§
impl<IC> Freeze for HalfEdge<IC>where
IC: Freeze,
impl<IC> RefUnwindSafe for HalfEdge<IC>where
IC: RefUnwindSafe,
impl<IC> Send for HalfEdge<IC>where
IC: Send,
impl<IC> Sync for HalfEdge<IC>where
IC: Sync,
impl<IC> Unpin for HalfEdge<IC>where
IC: Unpin,
impl<IC> UnwindSafe for HalfEdge<IC>where
IC: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more