pub struct Versor { /* private fields */ }Expand description
A versor is a general geometric transformation (rotation, reflection, or their composition).
Every versor can be written as a product of vectors. Versors with an even number of vectors are rotors. Versors with an odd number of vectors include reflections.
Implementations§
Source§impl Versor
impl Versor
Sourcepub fn from_multivector(mv: GA3, is_even: bool) -> Self
pub fn from_multivector(mv: GA3, is_even: bool) -> Self
Create a versor from a multivector
Sourcepub fn reflection(normal_x: f64, normal_y: f64, normal_z: f64) -> Self
pub fn reflection(normal_x: f64, normal_y: f64, normal_z: f64) -> Self
Create a reflection through a plane with normal vector (x, y, z)
Reflects points through the plane passing through origin with the given normal.
Sourcepub fn from_rotor(rotor: Rotor) -> Self
pub fn from_rotor(rotor: Rotor) -> Self
Convert from a Rotor
Sourcepub fn as_multivector(&self) -> &GA3
pub fn as_multivector(&self) -> &GA3
Get the internal multivector
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Versor
impl RefUnwindSafe for Versor
impl Send for Versor
impl Sync for Versor
impl Unpin for Versor
impl UnsafeUnpin for Versor
impl UnwindSafe for Versor
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