[−][src]Struct rust_3d::HalfEdge
HalfEdge, the half edge data structure
Implementations
impl<IC> HalfEdge<IC> where
IC: IsIndexContainer,
[src]
IC: IsIndexContainer,
pub fn new<T, M>(mesh: &M) -> Self where
M: IsMesh<T, Face3>,
[src]
M: IsMesh<T, Face3>,
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]
&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
pub fn edges_all(
&self,
id: VId,
cache: &mut Vec<EId>,
result: &mut Vec<EId>
) -> Result<()>
[src]
&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
pub fn faces(
&self,
id: VId,
cache: &mut Vec<EId>,
result: &mut Vec<FId>
) -> Result<()>
[src]
&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
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]
IC: IsIndexContainer,
impl<IC: Debug> Debug for HalfEdge<IC> where
IC: IsIndexContainer,
[src]
IC: IsIndexContainer,
impl<IC: Eq> Eq for HalfEdge<IC> where
IC: IsIndexContainer,
[src]
IC: IsIndexContainer,
impl<IC> From<(IC, Vec<Option<EId>>, Vec<IC>)> for HalfEdge<IC> where
IC: IsIndexContainer,
[src]
IC: IsIndexContainer,
impl<IC: Hash> Hash for HalfEdge<IC> where
IC: IsIndexContainer,
[src]
IC: IsIndexContainer,
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<IC> Into<(IC, Vec<Option<EId>>, Vec<IC>)> for HalfEdge<IC> where
IC: IsIndexContainer,
[src]
IC: IsIndexContainer,
impl<IC> Into<(IC, Vec<Option<EId>>)> for HalfEdge<IC> where
IC: IsIndexContainer,
[src]
IC: IsIndexContainer,
impl<IC> Into<Vec<IC>> for HalfEdge<IC> where
IC: IsIndexContainer,
[src]
IC: IsIndexContainer,
impl<IC: Ord> Ord for HalfEdge<IC> where
IC: IsIndexContainer,
[src]
IC: IsIndexContainer,
fn cmp(&self, other: &HalfEdge<IC>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<IC: PartialEq> PartialEq<HalfEdge<IC>> for HalfEdge<IC> where
IC: IsIndexContainer,
[src]
IC: IsIndexContainer,
impl<IC: PartialOrd> PartialOrd<HalfEdge<IC>> for HalfEdge<IC> where
IC: IsIndexContainer,
[src]
IC: IsIndexContainer,
fn partial_cmp(&self, other: &HalfEdge<IC>) -> Option<Ordering>
[src]
fn lt(&self, other: &HalfEdge<IC>) -> bool
[src]
fn le(&self, other: &HalfEdge<IC>) -> bool
[src]
fn gt(&self, other: &HalfEdge<IC>) -> bool
[src]
fn ge(&self, other: &HalfEdge<IC>) -> bool
[src]
impl<IC> StructuralEq for HalfEdge<IC> where
IC: IsIndexContainer,
[src]
IC: IsIndexContainer,
impl<IC> StructuralPartialEq for HalfEdge<IC> where
IC: IsIndexContainer,
[src]
IC: IsIndexContainer,
Auto Trait Implementations
impl<IC> RefUnwindSafe for HalfEdge<IC> where
IC: RefUnwindSafe,
IC: RefUnwindSafe,
impl<IC> Send for HalfEdge<IC> where
IC: Send,
IC: Send,
impl<IC> Sync for HalfEdge<IC> where
IC: Sync,
IC: Sync,
impl<IC> Unpin for HalfEdge<IC> where
IC: Unpin,
IC: Unpin,
impl<IC> UnwindSafe for HalfEdge<IC> where
IC: UnwindSafe,
IC: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,