[][src]Struct rust_3d::HalfEdge

pub struct HalfEdge<IC> where
    IC: IsIndexContainer
{ /* fields omitted */ }

HalfEdge, the half edge data structure

Methods

impl<IC> HalfEdge<IC> where
    IC: IsIndexContainer
[src]

pub fn new<T, M>(mesh: &M) -> Self where
    M: IsMesh<T, Face3>, 
[src]

Creates a new HalfEdge3D for the given IsMesh3D This only stays valid if IMesh3D is not changed after creation The mesh must be manifold

pub fn tail(&self, id: EId) -> Result<VId>[src]

Returns the ID of the vertex the edge originates from (error if id out of bounds)

pub fn face(&self, id: EId) -> Result<FId>[src]

Returns the ID of the face the edge belongs to (error if id out of bounds)

pub fn twin(&self, id: EId) -> Result<Option<EId>>[src]

Returns the ID of the twin edge (None if there isn't any) (error if id out of bounds)

pub fn next(&self, id: EId) -> Result<EId>[src]

Returns the ID of the edge after this edge (error if id out of bounds)

pub fn prev(&self, id: EId) -> Result<EId>[src]

Returns the ID of the edge before this edge (error if id out of bounds)

pub fn edges_originating(&self, id: VId, result: &mut Vec<EId>) -> Result<()>[src]

Appends all edges originating (pointing away) from the given vertex (error if id out of bounds)

pub fn edges_ending(
    &self,
    id: VId,
    cache: &mut Vec<EId>,
    result: &mut Vec<EId>
) -> Result<()>
[src]

Appends all edges ending (pointing at) the given vertex (error if id out of bounds) cache is used to avoid allocations, pass any Vec

pub fn edges_all(
    &self,
    id: VId,
    cache: &mut Vec<EId>,
    result: &mut Vec<EId>
) -> Result<()>
[src]

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

pub fn faces(
    &self,
    id: VId,
    cache: &mut Vec<EId>,
    result: &mut Vec<FId>
) -> Result<()>
[src]

Appends all faces a vertex is part of (error if id out of bounds) cache is used to avoid allocations, pass any Vec

pub fn ensure_edge_id(&self, id: EId) -> Result<()>[src]

Fails if the edge ID is out of bounds

pub fn ensure_vertex_id(&self, id: VId) -> Result<()>[src]

Fails if the vertex ID is out of bounds

Trait Implementations

impl<IC: Clone> Clone for HalfEdge<IC> where
    IC: IsIndexContainer
[src]

impl<IC: Debug> Debug for HalfEdge<IC> where
    IC: IsIndexContainer
[src]

impl<IC: Eq> Eq for HalfEdge<IC> where
    IC: IsIndexContainer
[src]

impl<IC> From<(IC, Vec<Option<EId>>, Vec<IC>)> for HalfEdge<IC> where
    IC: IsIndexContainer
[src]

impl<IC: Hash> Hash for HalfEdge<IC> where
    IC: IsIndexContainer
[src]

impl<IC> Into<(IC, Vec<Option<EId>>, Vec<IC>)> for HalfEdge<IC> where
    IC: IsIndexContainer
[src]

impl<IC> Into<(IC, Vec<Option<EId>>)> for HalfEdge<IC> where
    IC: IsIndexContainer
[src]

impl<IC> Into<Vec<IC>> for HalfEdge<IC> where
    IC: IsIndexContainer
[src]

impl<IC: Ord> Ord for HalfEdge<IC> where
    IC: IsIndexContainer
[src]

impl<IC: PartialEq> PartialEq<HalfEdge<IC>> for HalfEdge<IC> where
    IC: IsIndexContainer
[src]

impl<IC: PartialOrd> PartialOrd<HalfEdge<IC>> for HalfEdge<IC> where
    IC: IsIndexContainer
[src]

impl<IC> StructuralEq for HalfEdge<IC> where
    IC: IsIndexContainer
[src]

impl<IC> StructuralPartialEq for HalfEdge<IC> where
    IC: IsIndexContainer
[src]

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.