pub struct ValidationProperties {
pub volume: f64,
pub area: f64,
pub centroid: Point,
}Expand description
Mass-property check values, recorded so a receiver can verify a translation preserved the body they describe.
Fields§
§volume: f64Enclosed volume, in the model’s cubic length unit.
area: f64Surface area, in the squared unit.
centroid: PointThe centroid.
Implementations§
Source§impl ValidationProperties
impl ValidationProperties
Sourcepub fn agrees_with(&self, other: &Self, relative: f64) -> bool
pub fn agrees_with(&self, other: &Self, relative: f64) -> bool
Whether another set of values agrees within a relative tolerance, the centroid compared against the body’s own size, taken from the cube root of its volume.
Trait Implementations§
Source§impl Clone for ValidationProperties
impl Clone for ValidationProperties
Source§fn clone(&self) -> ValidationProperties
fn clone(&self) -> ValidationProperties
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 moreimpl Copy for ValidationProperties
Source§impl Debug for ValidationProperties
impl Debug for ValidationProperties
Source§impl PartialEq for ValidationProperties
impl PartialEq for ValidationProperties
Source§fn eq(&self, other: &ValidationProperties) -> bool
fn eq(&self, other: &ValidationProperties) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ValidationProperties
Auto Trait Implementations§
impl Freeze for ValidationProperties
impl RefUnwindSafe for ValidationProperties
impl Send for ValidationProperties
impl Sync for ValidationProperties
impl Unpin for ValidationProperties
impl UnsafeUnpin for ValidationProperties
impl UnwindSafe for ValidationProperties
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,
impl<T> Scalar 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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§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).§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.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.