[−][src]Struct plop::prelude::Matrix
4x4 Matrix.
Fields
m00: f32
m01: f32
m02: f32
m03: f32
m10: f32
m11: f32
m12: f32
m13: f32
m20: f32
m21: f32
m22: f32
m23: f32
m30: f32
m31: f32
m32: f32
m33: f32
Methods
impl Matrix
[src]
pub fn srt(self, scale: Vector, rotate: Rotation, translate: Vector) -> Matrix
[src]
Scale, then rotate Quaternion (axis, angle), then translate.
pub fn rt(self, rotate: Rotation, translate: Vector) -> Matrix
[src]
Rotate Quaternion (axis, angle), then translate.
pub fn st(self, scale: Vector, translate: Vector) -> Matrix
[src]
Scale, then translate.
pub fn t(self, translate: Vector) -> Matrix
[src]
Translate.
pub fn s(self, scale: Vector) -> Matrix
[src]
Scale.
pub fn r(self, rotation: Rotation) -> Matrix
[src]
Rotate Quaternion (axis, angle).
pub fn m(self, matrix: Matrix) -> Matrix
[src]
Multiply by a custom matrix
pub fn new(
m00: f32,
m01: f32,
m02: f32,
m03: f32,
m10: f32,
m11: f32,
m12: f32,
m13: f32,
m20: f32,
m21: f32,
m22: f32,
m23: f32,
m30: f32,
m31: f32,
m32: f32,
m33: f32
) -> Matrix
[src]
m00: f32,
m01: f32,
m02: f32,
m03: f32,
m10: f32,
m11: f32,
m12: f32,
m13: f32,
m20: f32,
m21: f32,
m22: f32,
m23: f32,
m30: f32,
m31: f32,
m32: f32,
m33: f32
) -> Matrix
Full constructor.
pub fn diagonal(di: f32) -> Matrix
[src]
Diagonal constructor.
pub fn tridiagonal(lo: f32, di: f32, up: f32) -> Matrix
[src]
Tri-diagonal constructor.
pub fn orthographic_projection(
left: f32,
right: f32,
bottom: f32,
top: f32,
near: f32,
far: f32
) -> Matrix
[src]
left: f32,
right: f32,
bottom: f32,
top: f32,
near: f32,
far: f32
) -> Matrix
Orthographic projection matrix constructor.
pub fn finite_perspective_projection(
fovy: f32,
aspect: f32,
near: f32,
far: f32
) -> Matrix
[src]
fovy: f32,
aspect: f32,
near: f32,
far: f32
) -> Matrix
Finite perspective projection matrix constructor.
pub fn determinant(self) -> f32
[src]
Computes the matrix determinant.
pub fn trace(self) -> f32
[src]
Computes the matrix trace.
pub fn inverse(self) -> Matrix
[src]
Computes the matrix inverse.
Panics
Panics if the matrix has no inverse (i.e. has zero determinant).
pub fn transpose(self) -> Matrix
[src]
Returns the matrix transpose.
pub fn try_invert(self) -> Option<Matrix>
[src]
Attempts to compute the matrix inverse, returning None
if the matrix is
non-invertible (i.e. has zero determinant).
Trait Implementations
impl Copy for Matrix
[src]
impl Clone for Matrix
[src]
fn clone(&self) -> Matrix
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Add<Matrix> for Matrix
[src]
type Output = Matrix
The resulting type after applying the +
operator.
fn add(self, rhs: Matrix) -> <Matrix as Add<Matrix>>::Output
[src]
impl AsRef<[[f32; 4]; 4]> for Matrix
[src]
impl Sub<Matrix> for Matrix
[src]
type Output = Matrix
The resulting type after applying the -
operator.
fn sub(self, rhs: Matrix) -> <Matrix as Sub<Matrix>>::Output
[src]
impl From<[[f32; 4]; 4]> for Matrix
[src]
impl From<f32> for Matrix
[src]
impl Debug for Matrix
[src]
impl Into<[f32; 16]> for Matrix
[src]
impl Into<[[f32; 4]; 4]> for Matrix
[src]
impl<'a> Mul<(Vector, f32)> for &'a Matrix
[src]
type Output = Vector
The resulting type after applying the *
operator.
fn mul(self, rhs: (Vector, f32)) -> <&'a Matrix as Mul<(Vector, f32)>>::Output
[src]
impl Mul<f32> for Matrix
[src]
type Output = Matrix
The resulting type after applying the *
operator.
fn mul(self, rhs: f32) -> <Matrix as Mul<f32>>::Output
[src]
impl Mul<(Vector, f32)> for Matrix
[src]
type Output = Vector
The resulting type after applying the *
operator.
fn mul(self, rhs: (Vector, f32)) -> <Matrix as Mul<(Vector, f32)>>::Output
[src]
impl Mul<Matrix> for Matrix
[src]
type Output = Matrix
The resulting type after applying the *
operator.
fn mul(self, rhs: Matrix) -> <Matrix as Mul<Matrix>>::Output
[src]
impl Default for Matrix
[src]
impl PartialEq<Matrix> for Matrix
[src]
impl Display for Matrix
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,