Struct iron_shapes::matrix3d::Matrix3d
source · [−]pub struct Matrix3d<T: CoordinateType> {
pub m11: T,
pub m12: T,
pub m13: T,
pub m21: T,
pub m22: T,
pub m23: T,
pub m31: T,
pub m32: T,
pub m33: T,
}
Expand description
3x3 matrix of the form.
[[ m11, m12, m13 ],
[ m21, m22, m23 ],
[ m31, m32, m33 ]]
Fields
m11: T
m11
m12: T
m12
m13: T
m13
m21: T
m21
m22: T
m22
m23: T
m23
m31: T
m31
m32: T
m32
m33: T
m33
Implementations
sourceimpl<T> Matrix3d<T> where
T: CoordinateType,
impl<T> Matrix3d<T> where
T: CoordinateType,
sourcepub fn new(
m11: T,
m12: T,
m13: T,
m21: T,
m22: T,
m23: T,
m31: T,
m32: T,
m33: T
) -> Self
pub fn new(
m11: T,
m12: T,
m13: T,
m21: T,
m22: T,
m23: T,
m31: T,
m32: T,
m33: T
) -> Self
Create a new 3x3 matrix with entries of the form:
[[ m11, m12, m13 ],
[ m21, m22, m23 ],
[ m31, m32, m33 ]]
sourcepub fn mul_scalar(&self, rhs: T) -> Self
pub fn mul_scalar(&self, rhs: T) -> Self
Compute product of the matrix with a scalar.
sourcepub fn mul_column_vector(&self, rhs: &(T, T, T)) -> (T, T, T)
pub fn mul_column_vector(&self, rhs: &(T, T, T)) -> (T, T, T)
Compute multiplication with a column vector A*rhs
.
sourcepub fn mul_matrix(&self, rhs: &Self) -> Self
pub fn mul_matrix(&self, rhs: &Self) -> Self
Matrix-matrix multiplication.
sourcepub fn is_identity(&self) -> bool
pub fn is_identity(&self) -> bool
Test if this matrix is the identity matrix.
sourcepub fn is_unitary(&self) -> bool
pub fn is_unitary(&self) -> bool
Test if this matrix is unitary.
sourcepub fn determinant(&self) -> T
pub fn determinant(&self) -> T
Compute the determinant of this matrix.
sourcepub fn try_inverse(&self) -> Option<Self>
pub fn try_inverse(&self) -> Option<Self>
Compute the inverse matrix.
None
will be returned if the determinant is zero and the matrix
is not invertible.
Trait Implementations
sourceimpl<T: Clone + CoordinateType> Clone for Matrix3d<T>
impl<T: Clone + CoordinateType> Clone for Matrix3d<T>
sourceimpl<T: Debug + CoordinateType> Debug for Matrix3d<T>
impl<T: Debug + CoordinateType> Debug for Matrix3d<T>
sourceimpl<T: CoordinateType> Default for Matrix3d<T>
impl<T: CoordinateType> Default for Matrix3d<T>
sourceimpl<T: Hash + CoordinateType> Hash for Matrix3d<T>
impl<T: Hash + CoordinateType> Hash for Matrix3d<T>
impl<T: Eq + CoordinateType> Eq for Matrix3d<T>
impl<T: CoordinateType> StructuralEq for Matrix3d<T>
impl<T: CoordinateType> StructuralPartialEq for Matrix3d<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Matrix3d<T> where
T: RefUnwindSafe,
impl<T> Send for Matrix3d<T> where
T: Send,
impl<T> Sync for Matrix3d<T> where
T: Sync,
impl<T> Unpin for Matrix3d<T> where
T: Unpin,
impl<T> UnwindSafe for Matrix3d<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more