Struct rust_3d::Matrix4Pipe
[−]
[src]
pub struct Matrix4Pipe { pub mtranslation: Matrix4, pub mrotation: Matrix4, pub mscale: Matrix4, pub mperspective: Matrix4, pub mcamtrans: Matrix4, pub mcamlook: Matrix4, }
Matrix4Pipe, which makes it easier to pipe different matrices in a defined order
Fields
mtranslation: Matrix4
mrotation: Matrix4
mscale: Matrix4
mperspective: Matrix4
mcamtrans: Matrix4
mcamlook: Matrix4
Methods
impl Matrix4Pipe
[src]
pub fn result(&self) -> Matrix4
[src]
Creates a new matrix as a result of all defined operations set within the pipe
pub fn add_translation(&mut self, x: f64, y: f64, z: f64)
[src]
Adds a translation to the pipe
pub fn remove_translation(&mut self)
[src]
Removes any translation from the pipe
pub fn add_rotation(&mut self, x: Rad, y: Rad, z: Rad)
[src]
Adds a rotation to the pipe
pub fn add_rotation_axis<N>(&mut self, axis: &N, rad: Rad) where
N: IsNormalized3D,
[src]
N: IsNormalized3D,
Adds a rotation around an axis to the pipe
pub fn remove_rotation(&mut self)
[src]
Removes any rotation from the pipe
pub fn add_scale(&mut self, x: f64, y: f64, z: f64)
[src]
Adds scaling to the pipe
pub fn remove_scale(&mut self)
[src]
Removes any scaling from the pipe
pub fn add_perspective(&mut self, close: f64, away: f64, rad: Rad)
[src]
Adds a perspective transformation to the pipe
pub fn remove_perspective(&mut self)
[src]
Removes any perspective transformation from the pipe
pub fn add_camera_translation(&mut self, x: f64, y: f64, z: f64)
[src]
Adds camera translation to the pipe
pub fn remove_camera_translation(&mut self)
[src]
Removes any camera translation from the pipe
pub fn add_look_at<P, N>(&mut self, target: &P, up: &N) -> Result<()> where
P: IsBuildable3D,
N: IsNormalized3D,
[src]
P: IsBuildable3D,
N: IsNormalized3D,
Adds a look at target to the pipe
pub fn remove_look_at(&mut self)
[src]
Removes any look at target from the pipe
Trait Implementations
impl Default for Matrix4Pipe
[src]
fn default() -> Matrix4Pipe
[src]
Returns the "default value" for a type. Read more
impl Debug for Matrix4Pipe
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for Matrix4Pipe
[src]
fn eq(&self, __arg_0: &Matrix4Pipe) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Matrix4Pipe) -> bool
[src]
This method tests for !=
.
impl PartialOrd for Matrix4Pipe
[src]
fn partial_cmp(&self, __arg_0: &Matrix4Pipe) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Matrix4Pipe) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Matrix4Pipe) -> bool
[src]
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: &Matrix4Pipe) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Matrix4Pipe) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Clone for Matrix4Pipe
[src]
fn clone(&self) -> Matrix4Pipe
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more