pub struct SpaceFrame { /* private fields */ }Expand description
An origin and a right-handed orthonormal triad of axes.
§Invariant
A SpaceFrame that exists is valid: finite, unit-length on every axis,
mutually perpendicular, and right-handed, all judged when it was built.
Fields are private so a struct literal cannot bypass that.
Implementations§
Source§impl SpaceFrame
impl SpaceFrame
Sourcepub fn new(
origin: Point3,
x: Vec3,
y: Vec3,
z: Vec3,
tolerance: Tolerance,
) -> Result<Self, FrameError>
pub fn new( origin: Point3, x: Vec3, y: Vec3, z: Vec3, tolerance: Tolerance, ) -> Result<Self, FrameError>
Validate a basis and build a frame from it.
Unit length, perpendicularity, and handedness are all DIMENSIONLESS properties, so all three are judged against the ANGULAR tolerance. Using the linear tolerance would tie a pure direction test to the model length unit.
Handedness is checked explicitly because it is invisible to the other two tests: a mirrored basis is perfectly orthonormal and still reflects every point it maps.
§Errors
Returns the property that failed, so a caller can name the cause.
Trait Implementations§
Source§impl Clone for SpaceFrame
impl Clone for SpaceFrame
Source§fn clone(&self) -> SpaceFrame
fn clone(&self) -> SpaceFrame
Returns a copy of the value. Read more
1.0.0 · 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 SpaceFrame
impl Debug for SpaceFrame
Source§impl PartialEq for SpaceFrame
impl PartialEq for SpaceFrame
impl Copy for SpaceFrame
impl StructuralPartialEq for SpaceFrame
Auto Trait Implementations§
impl Freeze for SpaceFrame
impl RefUnwindSafe for SpaceFrame
impl Send for SpaceFrame
impl Sync for SpaceFrame
impl Unpin for SpaceFrame
impl UnwindSafe for SpaceFrame
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