pub struct EdgeLedger { /* private fields */ }Expand description
Per-undirected-edge directed use counts of a triangle soup.
Implementations§
Source§impl EdgeLedger
impl EdgeLedger
Sourcepub fn build(mesh: &Mesh, key: VertexKey, degenerate: Degenerate) -> Self
pub fn build(mesh: &Mesh, key: VertexKey, degenerate: Degenerate) -> Self
Walk mesh once. An out-of-range index panics, as every old walk did.
Sourcepub fn build_raw(
positions: &[f32],
indices: &[u32],
key: VertexKey,
degenerate: Degenerate,
) -> Self
pub fn build_raw( positions: &[f32], indices: &[u32], key: VertexKey, degenerate: Degenerate, ) -> Self
build over raw positions (xyz triples) and indices.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
No edge was recorded (no triangle survived the degenerate rule).
Sourcepub fn rejected(&self) -> bool
pub fn rejected(&self) -> bool
The walk stopped at a degenerate triangle under Degenerate::Reject.
Sourcepub fn directed_closed(&self) -> bool
pub fn directed_closed(&self) -> bool
Every edge is used as often forward as backward. Vacuously true on an empty ledger; false on a rejected one.
Sourcepub fn strictly_paired(&self) -> bool
pub fn strictly_paired(&self) -> bool
Every edge is used exactly once each way. Vacuously true on an empty ledger; false on a rejected one.
Sourcepub fn undirected_defects(&self) -> usize
pub fn undirected_defects(&self) -> usize
Edges whose total use count is not two (open or non-manifold).
Sourcepub fn net(&self, a: Key3, b: Key3) -> i64
pub fn net(&self, a: Key3, b: Key3) -> i64
The signed tally of directed edge a -> b: uses a->b minus uses
b->a. Zero for an edge never seen.
Sourcepub fn unbalanced(&self) -> impl Iterator<Item = (Key3, Key3, i64)> + '_
pub fn unbalanced(&self) -> impl Iterator<Item = (Key3, Key3, i64)> + '_
Edges with a net directed tally, oriented so the tally is positive. Iteration order is the map’s: callers that need an order sort.
Sourcepub fn multiplicity_defects(&self) -> EdgeMultiplicityDefects
pub fn multiplicity_defects(&self) -> EdgeMultiplicityDefects
The two defects a signed tally cannot represent: more than two uses, and exactly two uses running the same way. An edge used once is an open boundary, not a multiplicity defect.
Auto Trait Implementations§
impl Freeze for EdgeLedger
impl RefUnwindSafe for EdgeLedger
impl Send for EdgeLedger
impl Sync for EdgeLedger
impl Unpin for EdgeLedger
impl UnwindSafe for EdgeLedger
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.