[−][src]Struct glam::f32::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.
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.
Multiplication order is as follows:
local_to_world = local_to_object * object_to_world
Trait Implementations
impl PartialEq<Quat> for Quat
[src]
fn eq(&self, rhs: &Self) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
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 From<Quaternion<f32>> for Quat
[src]
fn from(q: Quaternion<f32>) -> Self
[src]
impl From<Quat> for Quaternion<f32>
[src]
impl Clone for Quat
[src]
fn clone(&self) -> Quat
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Quat
[src]
impl Copy for Quat
[src]
impl PartialOrd<Quat> for Quat
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[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 AsMut<[f32; 4]> 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.
fn mul(self, rhs: Self) -> Self
[src]
impl Mul<Quat> for Vec3
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: Quat) -> Self
[src]
impl Neg for Quat
[src]
impl MulAssign<Quat> for Quat
[src]
fn mul_assign(&mut self, rhs: Self)
[src]
impl MulAssign<Quat> for Vec3
[src]
fn mul_assign(&mut self, rhs: Quat)
[src]
impl Distribution<Quat> for Standard
[src]
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Quat
[src]
fn sample_iter<R>(&'a self, rng: &'a mut R) -> DistIter<'a, Self, R, T> where
R: Rng,
[src]
R: Rng,
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 default_epsilon() -> Self::Epsilon
[src]
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
[src]
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
[src]
The inverse of ApproxEq::abs_diff_eq
.
impl UlpsEq<Quat> for Quat
[src]
fn default_max_ulps() -> u32
[src]
fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
The inverse of ApproxEq::ulps_eq
.
impl Serialize for Quat
[src]
impl<'de> Deserialize<'de> for Quat
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> 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<U> 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<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> 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,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,