Struct rust_3d::Matrix4
[−]
[src]
pub struct Matrix4 { pub data: [[f64; 4]; 4], }
Matrix4, a matrix with 4 rows and columns
Fields
data: [[f64; 4]; 4]
Methods
impl Matrix4
[src]
fn zeroes() -> Matrix4
Creates a new matrix which contains only zeroes
fn translation(x: f64, y: f64, z: f64) -> Matrix4
Creates a new matrix which applies translation
fn scale(x: f64, y: f64, z: f64) -> Matrix4
Creates a new matrix which applies scaling
fn rotation(x: Rad, y: Rad, z: Rad) -> Matrix4
Creates a new matrix which applies rotation
fn rotation_axis<N>(axis: &N, r: Rad) -> Matrix4 where
N: IsNormalized3D,
N: IsNormalized3D,
Creates a new matrix which applies rotation around an axis
fn perspective(close: f64, away: f64, fov: Rad) -> Matrix4
Creates a new matrix which applies perspective transformation
fn look_at<P, N>(target: &P, up: &N) -> Result<Matrix4> where
P: IsBuildable3D,
N: IsNormalized3D,
P: IsBuildable3D,
N: IsNormalized3D,
Creates a new matrix which applies a look at transformation
Trait Implementations
impl Debug for Matrix4
[src]
impl PartialEq for Matrix4
[src]
fn eq(&self, __arg_0: &Matrix4) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Matrix4) -> bool
This method tests for !=
.
impl PartialOrd for Matrix4
[src]
fn partial_cmp(&self, __arg_0: &Matrix4) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Matrix4) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Matrix4) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Matrix4) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Matrix4) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Clone for Matrix4
[src]
fn clone(&self) -> Matrix4
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Default for Matrix4
[src]
impl Mul for Matrix4
[src]
type Output = Self
The resulting type after applying the *
operator
fn mul(self, other: Self) -> Self
The method for the *
operator