[−][src]Struct window::Transform
A 4x4 transformation matrix.
Implementations
impl Transform
[src]
pub fn new() -> Self
[src]
Create a new identity matrix (transform that does nothing).
pub fn from_mat4(mat: [[f32; 4]; 4]) -> Self
[src]
Create a new Transform from a 4x4 matrix.
pub fn scale(self, x: f32, y: f32, z: f32) -> Self
[src]
Scale transformation (make biggger or smaller).
pub fn translate(self, x: f32, y: f32, z: f32) -> Self
[src]
Translate (move) transformation.
pub fn rotate(self, x: f32, y: f32, z: f32, cycles: f32) -> Self
[src]
Rotate transformation. Parameters are quaternion in axis-angle form.
x
: axis-vector x.y
: axis-vector y.z
: axis-vector z.c
: angle in cycles.
Trait Implementations
impl Clone for Transform
[src]
impl Copy for Transform
[src]
impl Default for Transform
[src]
impl Mul<[f32; 3]> for Transform
[src]
type Output = [f32; 3]
The resulting type after applying the *
operator.
pub fn mul(self, vertex: [f32; 3]) -> Self::Output
[src]
impl Mul<Transform> for Transform
[src]
Auto Trait Implementations
impl RefUnwindSafe for Transform
[src]
impl Send for Transform
[src]
impl Sync for Transform
[src]
impl Unpin for Transform
[src]
impl UnwindSafe for Transform
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,