pub trait Quaternion {
Show 16 methods
// Required methods
fn as_ptr_mut(&mut self) -> *mut f64;
fn as_ptr(&self) -> *const f64;
fn prec_eq(&self, e: f64, q: [f64; 4]) -> bool;
fn as_vec(&self) -> ODEMat<'_>;
// Provided methods
fn new() -> [f64; 4] { ... }
fn from_R(m: [f64; 12]) -> [f64; 4] { ... }
fn to_R(&self) -> [f64; 12] { ... }
fn from_axis_and_angle(axis: [f64; 3], angle: f64) -> [f64; 4] { ... }
fn multiply0(p: [f64; 4], q: [f64; 4]) -> [f64; 4] { ... }
fn multiply0_pp(p: *const f64, q: *const f64) -> [f64; 4] { ... }
fn multiply0_331(m: [f64; 12], v: [f64; 4]) -> [f64; 4] { ... }
fn multiply0_331_pp(m: *const f64, v: *const f64) -> [f64; 4] { ... }
fn multiply0_441(m: [f64; 16], v: [f64; 4]) -> [f64; 4] { ... }
fn multiply0_441_pp(m: *const f64, v: *const f64) -> [f64; 4] { ... }
fn conjugate(q: [f64; 4]) -> [f64; 4] { ... }
fn conjugate_ptr(q: *const f64) -> [f64; 4] { ... }
}
Expand description
constructor and converter for primitive type
Required Methods§
Sourcefn as_ptr_mut(&mut self) -> *mut f64
fn as_ptr_mut(&mut self) -> *mut f64
ptr mut of dQuaternion
Provided Methods§
Sourcefn from_axis_and_angle(axis: [f64; 3], angle: f64) -> [f64; 4]
fn from_axis_and_angle(axis: [f64; 3], angle: f64) -> [f64; 4]
constructor axis [x, y, z] should be norm == 1, angle is theta radian Q(axis, angle) == [cos(t/2), xsin(t/2), ysin(t/2), zsin(t/2)]
Sourcefn multiply0(p: [f64; 4], q: [f64; 4]) -> [f64; 4]
fn multiply0(p: [f64; 4], q: [f64; 4]) -> [f64; 4]
constructor multiply p: dQuaternion and q: dQuaternion
Sourcefn multiply0_pp(p: *const f64, q: *const f64) -> [f64; 4]
fn multiply0_pp(p: *const f64, q: *const f64) -> [f64; 4]
constructor multiply p: dQuaternion pointer and q: dQuaternion pointer
Sourcefn multiply0_331(m: [f64; 12], v: [f64; 4]) -> [f64; 4]
fn multiply0_331(m: [f64; 12], v: [f64; 4]) -> [f64; 4]
constructor multiply m: dMatrix3 and v: dVector3 dVector3::multiply0_331 is defined as dQuaternion::multiply0_331
Sourcefn multiply0_331_pp(m: *const f64, v: *const f64) -> [f64; 4]
fn multiply0_331_pp(m: *const f64, v: *const f64) -> [f64; 4]
constructor multiply m: dMatrix3 pointer and v: dVector3 pointer dVector3::multiply0_331_pp is defined as dQuaternion::multiply0_331_pp
Sourcefn multiply0_441(m: [f64; 16], v: [f64; 4]) -> [f64; 4]
fn multiply0_441(m: [f64; 16], v: [f64; 4]) -> [f64; 4]
constructor multiply m: dMatrix4 and v: dVector4 dVector4::multiply0_441 is defined as dQuaternion::multiply0_441
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.