[−][src]Struct window::Transform
A 4x4 transformation matrix.
Methods
impl Transform
[src]
pub fn new() -> Self
[src]
Create a new identity matrix (transform that does nothing).
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, c: 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.
pub fn perspective(fovy: f32, aspect: f32, near: f32, far: f32) -> Self
[src]
Create a perspective matrix.
fovy
- Y dimension field of view (in cycles), 0.25 is standard domain: 0 < fovy < 0.5aspect
-window_height / window_width
near
- Near clipping pane, domain: 0 < nearfar
- Far clipping pane, domain: near < far
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.
fn mul(self, vertex: [f32; 3]) -> Self::Output
[src]
impl Mul<Transform> for Transform
[src]
Auto Trait Implementations
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnwindSafe for Transform
impl RefUnwindSafe for Transform
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,