Trait ode_rs::ode::Quaternion

source ·
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§

source

fn as_ptr_mut(&mut self) -> *mut f64

ptr mut of dQuaternion

source

fn as_ptr(&self) -> *const f64

ptr of dQuaternion (use for converter)

source

fn prec_eq(&self, e: f64, q: [f64; 4]) -> bool

check equal with precision

source

fn as_vec(&self) -> ODEMat<'_>

for Debug

Provided Methods§

source

fn new() -> [f64; 4]

construct as Identity

source

fn from_R(m: [f64; 12]) -> [f64; 4]

constructor (converter)

source

fn to_R(&self) -> [f64; 12]

converter (like as dMatrix3::from_Q(*self))

source

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)]

source

fn multiply0(p: [f64; 4], q: [f64; 4]) -> [f64; 4]

constructor multiply p: dQuaternion and q: dQuaternion

source

fn multiply0_pp(p: *const f64, q: *const f64) -> [f64; 4]

constructor multiply p: dQuaternion pointer and q: dQuaternion pointer

source

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

source

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

source

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

source

fn multiply0_441_pp(m: *const f64, v: *const f64) -> [f64; 4]

constructor multiply m: dMatrix4 pointer and v: dVector4 pointer dVector4::multiply0_441_pp is defined as dQuaternion::multiply0_441_pp

source

fn conjugate(q: [f64; 4]) -> [f64; 4]

conjugate dQuaternion

source

fn conjugate_ptr(q: *const f64) -> [f64; 4]

conjugate dQuaternion pointer

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Quaternion for [f64; 4]

source§

fn as_ptr_mut(&mut self) -> *mut f64

ptr mut of dQuaternion

source§

fn as_ptr(&self) -> *const f64

ptr of dQuaternion (use for converter)

source§

fn prec_eq(&self, e: f64, q: [f64; 4]) -> bool

check equal with precision

source§

fn as_vec(&self) -> ODEMat<'_>

for Debug

Implementors§