pub enum IntersectionSolid {
Solid {
positions: Vec<f64>,
indices: Vec<u32>,
volume_m3: f64,
},
Degenerate(DegenerateReason),
}Expand description
The overlap volume of one clashing pair.
Solid carries a closed, world-space triangle mesh in f64 — not the f32
of Mesh — because the caller reports its volume, and the f32 round-trip
costs ~1e-7 relative on a quantity that is otherwise exact.
Variants§
Solid
Fields
Degenerate(DegenerateReason)
No solid to draw. The viewer keeps the contact marker it already has.
Implementations§
Source§impl IntersectionSolid
impl IntersectionSolid
Sourcepub fn volume_m3(&self) -> Option<f64>
pub fn volume_m3(&self) -> Option<f64>
Some(volume) for a solid, None when degenerate. Deliberately not
unwrap_or(0.0): “no measurable overlap” and “an overlap of zero” are
different claims, and the caller must not be able to conflate them by
accident.
Sourcepub fn triangle_count(&self) -> usize
pub fn triangle_count(&self) -> usize
Triangle count of the solid; 0 when degenerate.
Trait Implementations§
Source§impl Clone for IntersectionSolid
impl Clone for IntersectionSolid
Source§fn clone(&self) -> IntersectionSolid
fn clone(&self) -> IntersectionSolid
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IntersectionSolid
impl Debug for IntersectionSolid
Source§impl PartialEq for IntersectionSolid
impl PartialEq for IntersectionSolid
impl StructuralPartialEq for IntersectionSolid
Auto Trait Implementations§
impl Freeze for IntersectionSolid
impl RefUnwindSafe for IntersectionSolid
impl Send for IntersectionSolid
impl Sync for IntersectionSolid
impl Unpin for IntersectionSolid
impl UnsafeUnpin for IntersectionSolid
impl UnwindSafe for IntersectionSolid
Blanket Implementations§
Source§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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.