pub struct Matrix4Pipe {
pub mtranslation: Matrix4,
pub mrotation: Matrix4,
pub mscale: Matrix4,
pub mperspective: Matrix4,
pub mcamtrans: Matrix4,
pub mcamlook: Matrix4,
}
Expand description
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
Implementations§
Source§impl Matrix4Pipe
impl Matrix4Pipe
Sourcepub fn result(&self) -> Matrix4
pub fn result(&self) -> Matrix4
Creates a new matrix as a result of all defined operations set within the pipe
Sourcepub fn add_translation(&mut self, x: f64, y: f64, z: f64)
pub fn add_translation(&mut self, x: f64, y: f64, z: f64)
Adds a translation to the pipe
Sourcepub fn remove_translation(&mut self)
pub fn remove_translation(&mut self)
Removes any translation from the pipe
Sourcepub fn add_rotation(&mut self, x: Rad, y: Rad, z: Rad)
pub fn add_rotation(&mut self, x: Rad, y: Rad, z: Rad)
Adds a rotation to the pipe
Sourcepub fn add_rotation_axis<N>(&mut self, axis: &N, rad: Rad)where
N: IsNormalized3D,
pub fn add_rotation_axis<N>(&mut self, axis: &N, rad: Rad)where
N: IsNormalized3D,
Adds a rotation around an axis to the pipe
Sourcepub fn remove_rotation(&mut self)
pub fn remove_rotation(&mut self)
Removes any rotation from the pipe
Sourcepub fn remove_scale(&mut self)
pub fn remove_scale(&mut self)
Removes any scaling from the pipe
Sourcepub fn add_perspective(&mut self, close: f64, away: f64, rad: Rad)
pub fn add_perspective(&mut self, close: f64, away: f64, rad: Rad)
Adds a perspective transformation to the pipe
Sourcepub fn remove_perspective(&mut self)
pub fn remove_perspective(&mut self)
Removes any perspective transformation from the pipe
Sourcepub fn add_camera_translation(&mut self, x: f64, y: f64, z: f64)
pub fn add_camera_translation(&mut self, x: f64, y: f64, z: f64)
Adds camera translation to the pipe
Sourcepub fn remove_camera_translation(&mut self)
pub fn remove_camera_translation(&mut self)
Removes any camera translation from the pipe
Sourcepub fn add_look_at<P, N>(&mut self, target: &P, up: &N) -> Result<()>where
P: IsBuildable3D,
N: IsNormalized3D,
pub fn add_look_at<P, N>(&mut self, target: &P, up: &N) -> Result<()>where
P: IsBuildable3D,
N: IsNormalized3D,
Adds a look at target to the pipe
Sourcepub fn remove_look_at(&mut self)
pub fn remove_look_at(&mut self)
Removes any look at target from the pipe
Trait Implementations§
Source§impl Clone for Matrix4Pipe
impl Clone for Matrix4Pipe
Source§fn clone(&self) -> Matrix4Pipe
fn clone(&self) -> Matrix4Pipe
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Matrix4Pipe
impl Debug for Matrix4Pipe
Source§impl Default for Matrix4Pipe
impl Default for Matrix4Pipe
Source§fn default() -> Matrix4Pipe
fn default() -> Matrix4Pipe
Returns the “default value” for a type. Read more
Source§impl PartialEq for Matrix4Pipe
impl PartialEq for Matrix4Pipe
Source§impl PartialOrd for Matrix4Pipe
impl PartialOrd for Matrix4Pipe
impl StructuralPartialEq for Matrix4Pipe
Auto Trait Implementations§
impl Freeze for Matrix4Pipe
impl RefUnwindSafe for Matrix4Pipe
impl Send for Matrix4Pipe
impl Sync for Matrix4Pipe
impl Unpin for Matrix4Pipe
impl UnwindSafe for Matrix4Pipe
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more