[][src]Struct glam::f32::Quat

#[repr(C)]
pub struct Quat(_);

Methods

impl Quat[src]

pub fn from_axis_angle(axis: Vec3, angle: Angle) -> Self[src]

Create quaterion for a normalized rotation axis and angle. The axis must be normalized.

pub fn from_rotation_x(angle: Angle) -> Self[src]

pub fn from_rotation_y(angle: Angle) -> Self[src]

pub fn from_rotation_z(angle: Angle) -> Self[src]

pub fn from_rotation_ypr(yaw: Angle, pitch: Angle, roll: Angle) -> Self[src]

Create a quaternion from the given yaw (around y), pitch (around x) and roll (around z).

pub fn from_rotation_mat3(mat: &Mat3) -> Self[src]

pub fn from_rotation_mat4(mat: &Mat4) -> Self[src]

pub fn to_axis_angle(self) -> (Vec3, Angle)[src]

pub fn conjugate(self) -> Self[src]

pub fn dot(self, rhs: Self) -> f32[src]

pub fn length(self) -> f32[src]

pub fn length_squared(self) -> f32[src]

pub fn length_reciprocal(self) -> f32[src]

pub fn normalize(self) -> Self[src]

pub fn is_normalized(self) -> bool[src]

pub fn lerp(self, end: Self, t: f32) -> Self[src]

impl Quat[src]

pub fn new(x: f32, y: f32, z: f32, w: f32) -> Self[src]

pub fn identity() -> Self[src]

pub fn from_slice_unaligned(slice: &[f32]) -> Self[src]

pub fn write_to_slice_unaligned(self, slice: &mut [f32])[src]

pub fn mul_quat(self, rhs: Self) -> Self[src]

Multiplies two quaternions. Note that due to floating point rounding the result may not be perfectly normalized.

pub fn mul_vec3(self, rhs: Vec3) -> Vec3[src]

Multiplies a quaternion and a 3D vector, rotating it.

Trait Implementations

impl AsMut<[f32; 4]> for Quat[src]

impl PartialEq<Quat> for Quat[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Copy for Quat[src]

impl Clone for Quat[src]

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

Performs copy-assignment from source. Read more

impl PartialOrd<Quat> for Quat[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

impl From<(f32, f32, f32, f32)> for Quat[src]

impl From<Vec4> for Quat[src]

impl From<Quat> for Vec4[src]

impl From<Quat> for __m128[src]

impl From<__m128> for Quat[src]

impl From<Quat> for (f32, f32, f32, f32)[src]

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

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

impl Default for Quat[src]

impl Debug for Quat[src]

impl Display for Quat[src]

impl Mul<Quat> for Quat[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<Vec3> for Quat[src]

type Output = Vec3

The resulting type after applying the * operator.

impl Neg for Quat[src]

type Output = Self

The resulting type after applying the - operator.

impl MulAssign<Quat> for Quat[src]

impl Distribution<Quat> for Standard[src]

fn sample_iter<R>(&'a self, rng: &'a mut R) -> DistIter<'a, Self, R, T> where
    R: Rng
[src]

Create an iterator that generates random values of T, using rng as the source of randomness. Read more

impl AbsDiffEq<Quat> for Quat[src]

type Epsilon = <f32 as AbsDiffEq>::Epsilon

Used for specifying relative comparisons.

fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool[src]

The inverse of ApproxEq::abs_diff_eq.

impl RelativeEq<Quat> for Quat[src]

fn relative_ne(
    &self,
    other: &Rhs,
    epsilon: Self::Epsilon,
    max_relative: Self::Epsilon
) -> bool
[src]

The inverse of ApproxEq::relative_eq.

impl UlpsEq<Quat> for Quat[src]

fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool[src]

The inverse of ApproxEq::ulps_eq.

Auto Trait Implementations

impl Send for Quat

impl Sync for Quat

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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

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.

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

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

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