pub struct Translation { /* private fields */ }Expand description
A translation represented geometrically
In standard GA3 (Euclidean), translations are not directly representable as versors. This type provides a convenient API that internally uses vector addition.
Implementations§
Source§impl Translation
impl Translation
Sourcepub fn transform(&self, v: &GA3) -> GA3
pub fn transform(&self, v: &GA3) -> GA3
Apply this translation to a multivector
For vectors, this adds the translation. For other grades, behavior depends on the geometric interpretation.
Sourcepub fn then(&self, other: &Translation) -> Translation
pub fn then(&self, other: &Translation) -> Translation
Compose two translations
Sourcepub fn inverse(&self) -> Translation
pub fn inverse(&self) -> Translation
Get the inverse translation
Sourcepub fn lerp(&self, t: f64) -> Translation
pub fn lerp(&self, t: f64) -> Translation
Linear interpolation of translation
Sourcepub fn lerp_to(&self, other: &Translation, t: f64) -> Translation
pub fn lerp_to(&self, other: &Translation, t: f64) -> Translation
Linear interpolation to another translation
Trait Implementations§
Source§impl Clone for Translation
impl Clone for Translation
Source§fn clone(&self) -> Translation
fn clone(&self) -> Translation
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for Translation
impl RefUnwindSafe for Translation
impl Send for Translation
impl Sync for Translation
impl Unpin for Translation
impl UnsafeUnpin for Translation
impl UnwindSafe for Translation
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