pub trait Quaternion {
Show 16 methods
// Required methods
fn as_ptr_mut(&mut self) -> *mut dReal;
fn as_ptr(&self) -> *const dReal;
fn prec_eq(&self, e: dReal, q: dQuaternion) -> bool;
fn as_vec(&self) -> ODEMat<'_>;
// Provided methods
fn new() -> dQuaternion { ... }
fn from_R(m: dMatrix3) -> dQuaternion { ... }
fn to_R(&self) -> dMatrix3 { ... }
fn from_axis_and_angle(axis: [dReal; 3], angle: dReal) -> dQuaternion { ... }
fn multiply0(p: dQuaternion, q: dQuaternion) -> dQuaternion { ... }
fn multiply0_pp(p: *const dReal, q: *const dReal) -> dQuaternion { ... }
fn multiply0_331(m: dMatrix3, v: dVector3) -> dVector3 { ... }
fn multiply0_331_pp(m: *const dReal, v: *const dReal) -> dVector3 { ... }
fn multiply0_441(m: dMatrix4, v: dVector4) -> dVector4 { ... }
fn multiply0_441_pp(m: *const dReal, v: *const dReal) -> dVector4 { ... }
fn conjugate(q: dQuaternion) -> dQuaternion { ... }
fn conjugate_ptr(q: *const dReal) -> dQuaternion { ... }
}
Expand description
constructor and converter for primitive type
Required Methods§
Sourcefn as_ptr_mut(&mut self) -> *mut dReal
fn as_ptr_mut(&mut self) -> *mut dReal
ptr mut of dQuaternion
Sourcefn prec_eq(&self, e: dReal, q: dQuaternion) -> bool
fn prec_eq(&self, e: dReal, q: dQuaternion) -> bool
check equal with precision
Provided Methods§
Sourcefn new() -> dQuaternion
fn new() -> dQuaternion
construct as Identity
Sourcefn from_R(m: dMatrix3) -> dQuaternion
fn from_R(m: dMatrix3) -> dQuaternion
constructor (converter)
Sourcefn from_axis_and_angle(axis: [dReal; 3], angle: dReal) -> dQuaternion
fn from_axis_and_angle(axis: [dReal; 3], angle: dReal) -> dQuaternion
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: dQuaternion, q: dQuaternion) -> dQuaternion
fn multiply0(p: dQuaternion, q: dQuaternion) -> dQuaternion
constructor multiply p: dQuaternion and q: dQuaternion
Sourcefn multiply0_pp(p: *const dReal, q: *const dReal) -> dQuaternion
fn multiply0_pp(p: *const dReal, q: *const dReal) -> dQuaternion
constructor multiply p: dQuaternion pointer and q: dQuaternion pointer
Sourcefn multiply0_331(m: dMatrix3, v: dVector3) -> dVector3
fn multiply0_331(m: dMatrix3, v: dVector3) -> dVector3
constructor multiply m: dMatrix3 and v: dVector3 dVector3::multiply0_331 is defined as dQuaternion::multiply0_331
Sourcefn multiply0_331_pp(m: *const dReal, v: *const dReal) -> dVector3
fn multiply0_331_pp(m: *const dReal, v: *const dReal) -> dVector3
constructor multiply m: dMatrix3 pointer and v: dVector3 pointer dVector3::multiply0_331_pp is defined as dQuaternion::multiply0_331_pp
Sourcefn multiply0_441(m: dMatrix4, v: dVector4) -> dVector4
fn multiply0_441(m: dMatrix4, v: dVector4) -> dVector4
constructor multiply m: dMatrix4 and v: dVector4 dVector4::multiply0_441 is defined as dQuaternion::multiply0_441
Sourcefn multiply0_441_pp(m: *const dReal, v: *const dReal) -> dVector4
fn multiply0_441_pp(m: *const dReal, v: *const dReal) -> dVector4
constructor multiply m: dMatrix4 pointer and v: dVector4 pointer dVector4::multiply0_441_pp is defined as dQuaternion::multiply0_441_pp
Sourcefn conjugate(q: dQuaternion) -> dQuaternion
fn conjugate(q: dQuaternion) -> dQuaternion
conjugate dQuaternion
Sourcefn conjugate_ptr(q: *const dReal) -> dQuaternion
fn conjugate_ptr(q: *const dReal) -> dQuaternion
conjugate dQuaternion pointer
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.