[−][src]Struct transform_matrix::Transform
Methods
impl Transform
[src]
pub fn new() -> Self
[src]
Begins a new transformation
Note: The transformation starts as an identity matrix
pub fn translate(self, x: f32, y: f32, z: f32) -> Self
[src]
Adds a translation transformation
Arguments
-
x
- Amount by which to move on the x-axis -
y
- Amount by which to move on the y-axis -
z
- Amount by which to move on the z-axis
pub fn scale(self, x: f32, y: f32, z: f32) -> Self
[src]
Adds a scale transformation
Arguments
-
x
- Amount by which to scale on the x-axis -
y
- Amount by which to scale on the y-axis -
z
- Amount by which to scale on the z-axis
pub fn rotate(self, x: f32, y: f32, z: f32) -> Self
[src]
Adds a rotation transformation
Arguments
-
x
- Amount by which to rotate on the x-axis -
y
- Amount by which to rotate on the y-axis -
z
- Amount by which to rotate on the z-axis
pub fn orthographic(self, width: f32, height: f32, depth: f32) -> [[f32; 4]; 4]
[src]
Adds an orthographic projection transformation
Arguments
-
width
- Size of the view on the x-axis -
height
- Size of the view on the y-axis -
depth
- Size of the view on the z-axis
Note: This is the last step of the transformation and returns the matrix
Trait Implementations
Auto Trait Implementations
impl Send for Transform
impl Unpin for Transform
impl Sync for Transform
impl RefUnwindSafe for Transform
impl UnwindSafe for Transform
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,