pub struct Quat { /* private fields */ }Expand description
Unit Hamilton quaternion (x, y, z, w) representing gimbal-lock-free 3D rotations.
Implementations§
Source§impl Quat
Hamilton quaternion algebra, Euler/matrix conversions, SLERP/NLERP, and Blender basis conversion for Quat.
impl Quat
Hamilton quaternion algebra, Euler/matrix conversions, SLERP/NLERP, and Blender basis conversion for Quat.
Sourcepub const fn from_array(values: [f32; 4]) -> Self
pub const fn from_array(values: [f32; 4]) -> Self
Sourcepub fn rotate_vec3(self, vec_val: Vec3) -> Vec3
pub fn rotate_vec3(self, vec_val: Vec3) -> Vec3
Sourcepub fn from_axis_angle(axis: Vec3, angle_rad: f32) -> Self
pub fn from_axis_angle(axis: Vec3, angle_rad: f32) -> Self
Sourcepub fn from_euler_yxz(yaw_rad: f32, pitch_rad: f32, roll_rad: f32) -> Self
pub fn from_euler_yxz(yaw_rad: f32, pitch_rad: f32, roll_rad: f32) -> Self
Sourcepub fn blender_z_up_to_y_up(self) -> Self
pub fn blender_z_up_to_y_up(self) -> Self
Sourcepub fn y_up_to_blender_z_up(self) -> Self
pub fn y_up_to_blender_z_up(self) -> Self
Source§impl Quat
impl Quat
pub fn get_x(&self) -> f32
pub fn get_mut_x(&mut self) -> &mut f32
pub fn set_x(&mut self, val: f32) -> &mut Self
pub fn get_y(&self) -> f32
pub fn get_mut_y(&mut self) -> &mut f32
pub fn set_y(&mut self, val: f32) -> &mut Self
pub fn get_z(&self) -> f32
pub fn get_mut_z(&mut self) -> &mut f32
pub fn set_z(&mut self, val: f32) -> &mut Self
pub fn get_w(&self) -> f32
pub fn get_mut_w(&mut self) -> &mut f32
pub fn set_w(&mut self, val: f32) -> &mut Self
Trait Implementations§
impl Copy for Quat
impl StructuralPartialEq for Quat
Auto Trait Implementations§
impl Forget for Quat
impl Freeze for Quat
impl Move for Quat
impl RefUnwindSafe for Quat
impl Send for Quat
impl Sync for Quat
impl Unpin for Quat
impl UnsafeUnpin for Quat
impl UnwindSafe for Quat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more