[−][src]Struct plop::prelude::Rotation
Single-precision quaternion.
Fields
x: f32
y: f32
z: f32
s: 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(&self) -> 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.
fn mul(self, rhs: Rotation) -> Rotation
[src]
impl Mul<f32> for Rotation
[src]
type Output = Rotation
The resulting type after applying the *
operator.
fn mul(self, rhs: f32) -> Rotation
[src]
impl Default for Rotation
[src]
impl PartialEq<Rotation> for Rotation
[src]
impl Display for Rotation
[src]
impl MulAssign<Rotation> for Rotation
[src]
fn mul_assign(&mut self, rhs: Rotation)
[src]
Auto Trait Implementations
Blanket Implementations
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom 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 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 for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut 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,