[][src]Struct toolbelt::transform::Transform

pub struct Transform {
    pub position: Point3<f32>,
    pub rotation: Quaternion<f32>,
    pub scale: Vector3<f32>,
}

A 3D transform, with position, rotation, and scale.

Fields

position: Point3<f32>rotation: Quaternion<f32>scale: Vector3<f32>

Methods

impl Transform[src]

pub fn identity() -> Transform[src]

Creates an identity transform.

pub fn from_position(position: Point3<f32>) -> Transform[src]

Creates a transform with the given position.

pub fn from_rotation(rotation: Quaternion<f32>) -> Transform[src]

Creates a transform with the given rotation.

pub fn from_scale(scale: Vector3<f32>) -> Transform[src]

Creates a transform with the given scale.

pub fn from_uniform_scale(scale: f32) -> Transform[src]

Creates a transform with the given uniform scale (scaling all axes by the same amount).

pub fn to_matrix(&self) -> Matrix4<f32>[src]

Generates a 4x4 transformation matrix from this transform.

Trait Implementations

impl Clone for Transform[src]

impl Debug for Transform[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.