[][src]Struct rust_3d::HalfEdge

pub struct HalfEdge { /* fields omitted */ }

HalfEdge, the half edge data structure

Methods

impl HalfEdge[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 (@todo ensure via types?)

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 PartialOrd<HalfEdge> for HalfEdge[src]

impl PartialEq<HalfEdge> for HalfEdge[src]

impl Ord for HalfEdge[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl Eq for HalfEdge[src]

impl Clone for HalfEdge[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Hash for HalfEdge[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for HalfEdge[src]

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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

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

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