[−][src]Struct rust_3d::HalfEdge
HalfEdge, the half edge data structure
Methods
impl HalfEdge
[src]
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 (@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]
&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 PartialOrd<HalfEdge> for HalfEdge
[src]
fn partial_cmp(&self, other: &HalfEdge) -> Option<Ordering>
[src]
fn lt(&self, other: &HalfEdge) -> bool
[src]
fn le(&self, other: &HalfEdge) -> bool
[src]
fn gt(&self, other: &HalfEdge) -> bool
[src]
fn ge(&self, other: &HalfEdge) -> bool
[src]
impl PartialEq<HalfEdge> for HalfEdge
[src]
impl Ord for HalfEdge
[src]
fn cmp(&self, other: &HalfEdge) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl Eq for HalfEdge
[src]
impl Clone for HalfEdge
[src]
fn clone(&self) -> 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<__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,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for HalfEdge
[src]
Auto Trait Implementations
impl Send for HalfEdge
impl Unpin for HalfEdge
impl Sync for HalfEdge
impl UnwindSafe for HalfEdge
impl RefUnwindSafe for HalfEdge
Blanket Implementations
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,