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]
fn result(&self) -> Matrix4
Creates a new matrix as a result of all defined operations set within the pipe
fn add_translation(&mut self, x: f64, y: f64, z: f64)
Adds a translation to the pipe
fn remove_translation(&mut self)
Removes any translation from the pipe
fn add_rotation(&mut self, x: Rad, y: Rad, z: Rad)
Adds a rotation to the pipe
fn add_rotation_axis<N>(&mut self, axis: &N, rad: Rad) where
N: IsNormalized3D,
N: IsNormalized3D,
Adds a rotation around an axis to the pipe
fn remove_rotation(&mut self)
Removes any rotation from the pipe
fn add_scale(&mut self, x: f64, y: f64, z: f64)
Adds scaling to the pipe
fn remove_scale(&mut self)
Removes any scaling from the pipe
fn add_perspective(&mut self, close: f64, away: f64, rad: Rad)
Adds a perspective transformation to the pipe
fn remove_perspective(&mut self)
Removes any perspective transformation from the pipe
fn add_camera_translation(&mut self, x: f64, y: f64, z: f64)
Adds camera translation to the pipe
fn remove_camera_translation(&mut self)
Removes any camera translation from the pipe
fn add_look_at<P, N>(&mut self, target: &P, up: &N) -> Result<()> where
P: IsBuildable3D,
N: IsNormalized3D,
P: IsBuildable3D,
N: IsNormalized3D,
Adds a look at target to the pipe
fn remove_look_at(&mut self)
Removes any look at target from the pipe
Trait Implementations
impl Default for Matrix4Pipe[src]
fn default() -> Matrix4Pipe
Returns the "default value" for a type. Read more
impl Debug for Matrix4Pipe[src]
impl PartialEq for Matrix4Pipe[src]
fn eq(&self, __arg_0: &Matrix4Pipe) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Matrix4Pipe) -> bool
This method tests for !=.
impl PartialOrd for Matrix4Pipe[src]
fn partial_cmp(&self, __arg_0: &Matrix4Pipe) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, __arg_0: &Matrix4Pipe) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, __arg_0: &Matrix4Pipe) -> 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: &Matrix4Pipe) -> bool
This method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, __arg_0: &Matrix4Pipe) -> bool
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
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