Struct rustracer::transformation::Transformation  
source · pub struct Transformation {
    m: Matrix,
    invm: Matrix,
}Expand description
3D Homogeneous Transformation struct.
This class encodes an affine transformation.
It has been designed with the aim of making the calculation
of the inverse transformation particularly efficient.
Fields§
§m: MatrixTransformation matrix.
invm: MatrixInverse transformation matrix.
Implementations§
source§impl Transformation
 
impl Transformation
sourcefn is_consistent(self) -> bool
 
fn is_consistent(self) -> bool
Check the internal consistency of the transformation.
This method is useful when writing tests.
sourcepub fn inverse(self) -> Self
 
pub fn inverse(self) -> Self
Return a Transformation object representing the inverse affine transformation.
This method is very cheap to call.
Trait Implementations§
source§impl Clone for Transformation
 
impl Clone for Transformation
source§fn clone(&self) -> Transformation
 
fn clone(&self) -> Transformation
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 Transformation
 
impl Debug for Transformation
source§impl Default for Transformation
 
impl Default for Transformation
source§fn default() -> Transformation
 
fn default() -> Transformation
Returns the “default value” for a type. Read more
source§impl IsClose for Transformation
 
impl IsClose for Transformation
source§fn is_close(&self, other: Transformation) -> bool
 
fn is_close(&self, other: Transformation) -> bool
Return true if matrix and inverse matrix of two Transformation are
close.
source§impl Mul<Normal> for Transformation
 
impl Mul<Normal> for Transformation
source§impl Mul<Point> for Transformation
 
impl Mul<Point> for Transformation
source§impl Mul<Ray> for Transformation
 
impl Mul<Ray> for Transformation
source§impl Mul<Vector> for Transformation
 
impl Mul<Vector> for Transformation
source§impl Mul for Transformation
 
impl Mul for Transformation
§type Output = Transformation
 
type Output = Transformation
The resulting type after applying the 
* operator.source§impl PartialEq for Transformation
 
impl PartialEq for Transformation
source§fn eq(&self, other: &Transformation) -> bool
 
fn eq(&self, other: &Transformation) -> bool
This method tests for 
self and other values to be equal, and is used
by ==.impl Copy for Transformation
impl StructuralPartialEq for Transformation
Auto Trait Implementations§
impl RefUnwindSafe for Transformation
impl Send for Transformation
impl Sync for Transformation
impl Unpin for Transformation
impl UnwindSafe for Transformation
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