[][src]Struct plop::prelude::Rotation

#[repr(C)]
pub struct Rotation { pub x: f32, pub y: f32, pub z: f32, pub s: f32, }

Single-precision quaternion.

Fields

x: f32y: f32z: f32s: f32

Methods

impl Rotation[src]

pub fn identity() -> Rotation[src]

Identity constructor.

pub fn euler(angles: Vector) -> Rotation[src]

Constructor for a rotation defined by a set of Euler angles

The rotation order is Z, then X, then Y. From the point of the object, this is equivalent to a yaw in angles.y, a pitch in angles.x, and a roll in angles.z.

pub fn new(axis: Vector, angle: f32) -> Rotation[src]

Create a new Rotation from axis and angle.

pub fn rotate(&self, vector: Vector) -> Vector[src]

Return the application of the rotation represented by this quaternion to the vector argument.

pub fn then(self, rhs: Rotation) -> Rotation[src]

Add another Rotation after the current Rotation.

Trait Implementations

impl Copy for Rotation[src]

impl Clone for Rotation[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl AsRef<[f32; 4]> for Rotation[src]

impl From<[f32; 4]> for Rotation[src]

impl Debug for Rotation[src]

impl Into<[f32; 4]> for Rotation[src]

impl Mul<Rotation> for Rotation[src]

type Output = Rotation

The resulting type after applying the * operator.

impl Mul<f32> for Rotation[src]

type Output = Rotation

The resulting type after applying the * operator.

impl Default for Rotation[src]

impl PartialEq<Rotation> for Rotation[src]

impl Display for Rotation[src]

impl MulAssign<Rotation> for Rotation[src]

Auto Trait Implementations

impl Send for Rotation

impl Sync for Rotation

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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