[−][src]Struct rust_3d::Matrix4
Matrix4, a matrix with 4 rows and columns
Fields
data: [[f64; 4]; 4]
Implementations
impl Matrix4
[src]
pub fn identity() -> Matrix4
[src]
Creates a new identity matrix
pub fn zeroes() -> Matrix4
[src]
Creates a new matrix which contains only zeroes
pub fn translation(x: f64, y: f64, z: f64) -> Matrix4
[src]
Creates a new matrix which applies translation
pub fn scale(x: f64, y: f64, z: f64) -> Matrix4
[src]
Creates a new matrix which applies scaling
pub fn rotation(x: Rad, y: Rad, z: Rad) -> Matrix4
[src]
Creates a new matrix which applies rotation
pub fn rotation_axis<N>(axis: &N, r: Rad) -> Matrix4 where
N: IsNormalized3D,
[src]
N: IsNormalized3D,
Creates a new matrix which applies rotation around an axis
pub fn perspective(close: f64, away: f64, fov: Rad) -> Matrix4
[src]
Creates a new matrix which applies perspective transformation
pub fn look_at<P, N>(target: &P, up: &N) -> Result<Matrix4> where
P: IsBuildable3D,
N: IsNormalized3D,
[src]
P: IsBuildable3D,
N: IsNormalized3D,
Creates a new matrix which applies a look at transformation
Trait Implementations
impl Clone for Matrix4
[src]
impl Debug for Matrix4
[src]
impl Default for Matrix4
[src]
impl<'_> Mul<&'_ Matrix4> for Matrix4
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: &Self) -> Self
[src]
impl<'_> Mul<&'_ Matrix4> for &'_ Matrix4
[src]
type Output = Matrix4
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Matrix4
[src]
impl Mul<Matrix4> for Matrix4
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Self
[src]
impl Mul<f64> for Matrix4
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: f64) -> Self
[src]
impl<'_> Mul<f64> for &'_ Matrix4
[src]
type Output = Matrix4
The resulting type after applying the *
operator.
fn mul(self, other: f64) -> Matrix4
[src]
impl PartialEq<Matrix4> for Matrix4
[src]
impl PartialOrd<Matrix4> for Matrix4
[src]
fn partial_cmp(&self, other: &Matrix4) -> Option<Ordering>
[src]
fn lt(&self, other: &Matrix4) -> bool
[src]
fn le(&self, other: &Matrix4) -> bool
[src]
fn gt(&self, other: &Matrix4) -> bool
[src]
fn ge(&self, other: &Matrix4) -> bool
[src]
impl StructuralPartialEq for Matrix4
[src]
Auto Trait Implementations
impl RefUnwindSafe for Matrix4
impl Send for Matrix4
impl Sync for Matrix4
impl Unpin for Matrix4
impl UnwindSafe for Matrix4
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> 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, U> TryFrom<U> 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<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,