Struct ami::Rotation [−][src]
Single-precision quaternion.
Fields
x: f32
y: f32
z: f32
s: f32
Methods
impl Rotation
[src]
impl Rotation
pub fn identity() -> Self
[src]
pub fn identity() -> Self
Identity constructor.
pub fn euler(angles: Vector) -> Self
[src]
pub fn euler(angles: Vector) -> Self
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) -> Self
[src]
pub fn new(axis: Vector, angle: f32) -> Self
Create a new Rotation
from axis and angle.
pub fn rotate(&self, vector: Vector) -> Vector
[src]
pub fn rotate(&self, vector: Vector) -> Vector
Return the application of the rotation represented by this quaternion to the vector argument.
pub fn then(self, rhs: Self) -> Self
[src]
pub fn then(self, rhs: Self) -> Self
Add another Rotation
after the current Rotation
.
Trait Implementations
impl Clone for Rotation
[src]
impl Clone for Rotation
fn clone(&self) -> Rotation
[src]
fn clone(&self) -> Rotation
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for Rotation
[src]
impl Copy for Rotation
impl Debug for Rotation
[src]
impl Debug for Rotation
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Rotation
[src]
impl PartialEq for Rotation
fn eq(&self, other: &Rotation) -> bool
[src]
fn eq(&self, other: &Rotation) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rotation) -> bool
[src]
fn ne(&self, other: &Rotation) -> bool
This method tests for !=
.
impl Display for Rotation
[src]
impl Display for Rotation
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Mul<f32> for Rotation
[src]
impl Mul<f32> for Rotation
type Output = Rotation
The resulting type after applying the *
operator.
fn mul(self, rhs: f32) -> Rotation
[src]
fn mul(self, rhs: f32) -> Rotation
Performs the *
operation.
impl Mul<Rotation> for Rotation
[src]
impl Mul<Rotation> for Rotation
type Output = Rotation
The resulting type after applying the *
operator.
fn mul(self, rhs: Rotation) -> Rotation
[src]
fn mul(self, rhs: Rotation) -> Rotation
Performs the *
operation.
impl MulAssign<Rotation> for Rotation
[src]
impl MulAssign<Rotation> for Rotation
fn mul_assign(&mut self, rhs: Rotation)
[src]
fn mul_assign(&mut self, rhs: Rotation)
Performs the *=
operation.
impl Default for Rotation
[src]
impl Default for Rotation
impl AsRef<[f32; 4]> for Rotation
[src]
impl AsRef<[f32; 4]> for Rotation
impl From<[f32; 4]> for Rotation
[src]
impl From<[f32; 4]> for Rotation
impl Into<[f32; 4]> for Rotation
[src]
impl Into<[f32; 4]> for Rotation