pub struct Quat {
pub w: f64,
pub x: f64,
pub y: f64,
pub z: f64,
}Expand description
A 4D Unit Quaternion representing 3D spatial orientation [w, x, y, z].
Fields§
§w: f64§x: f64§y: f64§z: f64Implementations§
Source§impl Quat
impl Quat
Sourcepub fn slerp(q0: &Self, q1: &Self, t: f64) -> Self
pub fn slerp(q0: &Self, q1: &Self, t: f64) -> Self
Standard Spherical Linear Interpolation (SLERP) along the shortest arc.
Sourcepub fn compute_inner_control_point(
q_prev: &Self,
q_curr: &Self,
q_next: &Self,
) -> Self
pub fn compute_inner_control_point( q_prev: &Self, q_curr: &Self, q_next: &Self, ) -> Self
Compute intermediate control point a_i for SQUAD given three consecutive orientations (q_{i-1}, q_i, q_{i+1}).
Trait Implementations§
impl Copy for Quat
impl StructuralPartialEq for Quat
Auto Trait Implementations§
impl Freeze 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