oa::vlm::Quat

A packed vector-first quaternion (x, y, z, w).

StRust public API

Declaration

#[repr(C)]pub struct Quat<T: Float = f32> { pub x: T, pub y: T, pub z: T, pub w: T, }
Public Rust declaration.

Public Methods

pub fn is_finite(self) -> bool
pub fn norm_squared(self) -> T
pub fn norm(self) -> T
pub fn try_normalized(self) -> Option<Self>
pub fn conjugate(self) -> Self
pub fn dot(self, other: Self) -> T
pub fn try_inverse(self, tolerance: T) -> Option<Self>
pub fn try_rotate(self, vector: Vec3<T>) -> Option<Vec3<T>>
pub fn try_inverse_rotate(self, vector: Vec3<T>) -> Option<Vec3<T>>
pub fn try_to_euler_radians(self, order: RotationOrder) -> Option<Vec3<T>>
pub fn try_to_euler_degrees(self, order: RotationOrder) -> Option<Vec3<T>>
pub fn try_nlerp(self, other: Self, amount: T) -> Option<Self>
pub fn try_slerp(self, other: Self, amount: T) -> Option<Self>
pub fn angle(self) -> Option<T>
pub fn axis(self) -> Option<Vec3<T>>
pub fn approximately_equal(self, other: Self, absolute: T, relative: T) -> bool
fn add(self, other: Self) -> Self
fn add_assign(&mut self, other: Self)
fn clone(&self) -> Quat<T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn div(self, scalar: T) -> Self
fn div_assign(&mut self, scalar: T)
fn mul(self, other: Self) -> Self
fn mul(self, quaternion: Quat<f64>) -> Self::Output
fn mul(self, quaternion: Quat<f32>) -> Self::Output
fn mul(self, scalar: T) -> Self
fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, scalar: T)
fn neg(self) -> Self
fn eq(&self, other: &Quat<T>) -> bool
fn sub(self, other: Self) -> Self
fn sub_assign(&mut self, other: Self)

Associated Functions

pub fn try_from_rotation_matrix(matrix: Mat3<T>, tolerance: T) -> Option<Self>
pub fn try_from_rotation_matrix4(matrix: Mat4<T>, tolerance: T) -> Option<Self>
pub fn try_from_to(from: Vec3<T>, to: Vec3<T>, tolerance: T) -> Option<Self>
pub fn try_look_rotation( forward: Vec3<T>, world_up: Vec3<T>, tolerance: T, ) -> Option<Self>
pub fn identity() -> Self
pub fn try_from_axis_angle(axis: Vec3<T>, angle_radians: T) -> Option<Self>
pub fn try_from_euler_radians( angles: Vec3<T>, order: RotationOrder, ) -> Option<Self>
pub fn try_from_euler_degrees( angles: Vec3<T>, order: RotationOrder, ) -> Option<Self>
fn default() -> Self

Public Data Members

xTfield
yTfield
zTfield
wTfield

Public Method Documentation

pub fn is_finite( self ) -> bool
Constructs an axis-angle rotation, returning None for invalid input.
pub fn norm_squared( self ) -> T
Constructs an axis-angle rotation, returning None for invalid input.
pub fn norm( self ) -> T
Constructs an axis-angle rotation, returning None for invalid input.
pub fn try_normalized( self ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn conjugate( self ) -> Self
Constructs an axis-angle rotation, returning None for invalid input.
pub fn dot( self, other: Self ) -> T
Constructs an axis-angle rotation, returning None for invalid input.
pub fn try_inverse( self, tolerance: T ) -> Option<Self>
Constructs an axis-angle rotation, returning None for invalid input.
pub fn try_rotate( self, vector: Vec3<T> ) -> Option<Vec3<T>>
Constructs an axis-angle rotation, returning None for invalid input.
pub fn try_inverse_rotate( self, vector: Vec3<T> ) -> Option<Vec3<T>>
Constructs an axis-angle rotation, returning None for invalid input.
pub fn try_to_euler_radians( self, order: RotationOrder ) -> Option<Vec3<T>>
Constructs an axis-angle rotation, returning None for invalid input.
pub fn try_to_euler_degrees( self, order: RotationOrder ) -> Option<Vec3<T>>
Constructs an axis-angle rotation, returning None for invalid input.
pub fn try_nlerp( self, other: Self, amount: T ) -> Option<Self>
Constructs an axis-angle rotation, returning None for invalid input.
pub fn try_slerp( self, other: Self, amount: T ) -> Option<Self>
Constructs an axis-angle rotation, returning None for invalid input.
pub fn angle( self ) -> Option<T>
Constructs an axis-angle rotation, returning None for invalid input.
pub fn axis( self ) -> Option<Vec3<T>>
Constructs an axis-angle rotation, returning None for invalid input.
pub fn approximately_equal( self, other: Self, absolute: T, relative: T ) -> bool
Constructs an axis-angle rotation, returning None for invalid input.
fn add( self, other: Self ) -> Self
No public source comment is attached to this declaration.
fn add_assign( &mut self, other: Self )
No public source comment is attached to this declaration.
fn clone( &self ) -> Quat<T>
No public source comment is attached to this declaration.
fn fmt( &self, f: &mut Formatter<'_> ) -> Result
No public source comment is attached to this declaration.
fn div( self, scalar: T ) -> Self
No public source comment is attached to this declaration.
fn div_assign( &mut self, scalar: T )
No public source comment is attached to this declaration.
fn mul( self, other: Self ) -> Self
No public source comment is attached to this declaration.
fn mul( self, quaternion: Quat<f64> ) -> Self::Output
No public source comment is attached to this declaration.
fn mul( self, quaternion: Quat<f32> ) -> Self::Output
No public source comment is attached to this declaration.
fn mul( self, scalar: T ) -> Self
No public source comment is attached to this declaration.
fn mul_assign( &mut self, other: Self )
No public source comment is attached to this declaration.
fn mul_assign( &mut self, scalar: T )
No public source comment is attached to this declaration.
fn neg( self ) -> Self
No public source comment is attached to this declaration.
fn eq( &self, other: &Quat<T> ) -> bool
No public source comment is attached to this declaration.
fn sub( self, other: Self ) -> Self
No public source comment is attached to this declaration.
fn sub_assign( &mut self, other: Self )
No public source comment is attached to this declaration.
pub fn try_from_rotation_matrix( matrix: Mat3<T>, tolerance: T ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_from_rotation_matrix4( matrix: Mat4<T>, tolerance: T ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_from_to( from: Vec3<T>, to: Vec3<T>, tolerance: T ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_look_rotation( forward: Vec3<T>, world_up: Vec3<T>, tolerance: T ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn identity() -> Self
Constructs an axis-angle rotation, returning None for invalid input.
pub fn try_from_axis_angle( axis: Vec3<T>, angle_radians: T ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_from_euler_radians( angles: Vec3<T>, order: RotationOrder ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_from_euler_degrees( angles: Vec3<T>, order: RotationOrder ) -> Option<Self>
Constructs an axis-angle rotation, returning None for invalid input.
fn default() -> Self
No public source comment is attached to this declaration.