Struct rustracer::transformation::Matrix
source · struct Matrix {
elements: [[f32; 4]; 4],
}
Expand description
4D Matrix struct.
Note: a 4D matrix is used for a 3D transformation because this is the dimension needed for homo transformation in a 3D space.
Fields§
§elements: [[f32; 4]; 4]
Matrix elements.
Trait Implementations§
source§impl Default for Matrix
impl Default for Matrix
source§fn default() -> Self
fn default() -> Self
Return as default matrix a Matrix
with elements equal to IDENTITY_MATRIX
.
source§impl PartialEq for Matrix
impl PartialEq for Matrix
impl Copy for Matrix
impl StructuralPartialEq for Matrix
Auto Trait Implementations§
impl RefUnwindSafe for Matrix
impl Send for Matrix
impl Sync for Matrix
impl Unpin for Matrix
impl UnwindSafe for Matrix
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