Type Alias qm::q::Quaternion

source ·
pub type Quaternion<F> = [F; 4];
Expand description

Quaternion

Trait Implementations§

source§

impl<F: Float + Debug + Sum> TQuaternion<F> for Quaternion<F>

TQuaternion for Quaternion

source§

fn from_axis_and_angle(v: &Vector3<F>, a: F) -> Self

constructor

source§

fn identity() -> Self

constructor

source§

fn conjugate(&self) -> Self

conjugate

source§

fn me(&self) -> &Quaternion<F>

like as ref

source§

fn to_m4_left(&self) -> Matrix4<F>

to Matrix4 (qp = Q4x4 p4)

source§

fn to_m4_right(&self) -> Matrix4<F>

to Matrix4 (qp = P4x4 q4)

source§

fn to_m4_rot(&self) -> Matrix4<F>

to Matrix4 rot

  • q * r * q.conjugate()
  • Matrix4::from_p_right(q.conjugate()) * Matrix4::from_q_left(q) * r