MeshLib Rust Docs
Loading...
Searching...
No Matches
Inheritance diagram for meshlib::Quaterniond:

Public Member Functions

auto convert_to_mr_matrix3d () const -> meshlib::Matrix3d
auto assign_from_another (_other:&meshlib::Quaterniond) -> &mut meshlib::Quaterniond
auto im () const -> meshlib::Vector3d
auto angle () const -> f64
auto axis () const -> meshlib::Vector3d
auto norm_sq () const -> f64
auto norm () const -> f64
auto op_neg () const -> meshlib::Owned< meshlib::Quaterniond >
void normalize ()
auto normalized () const -> meshlib::Owned< meshlib::Quaterniond >
auto conjugate () const -> meshlib::Owned< meshlib::Quaterniond >
auto inverse () const -> meshlib::Owned< meshlib::Quaterniond >
auto call (p:&meshlib::Vector3d) const -> meshlib::Vector3d
auto mul_assign (s:f64) -> &mut meshlib::Quaterniond
auto div_assign (s:f64) -> &mut meshlib::Quaterniond
auto a () const -> &f64
auto a_mut () -> &mut f64
void set_a (value:f64)
auto b () const -> &f64
auto b_mut () -> &mut f64
void set_b (value:f64)
auto c () const -> &f64
auto c_mut () -> &mut f64
void set_c (value:f64)
auto d () const -> &f64
auto d_mut () -> &mut f64
void set_d (value:f64)

Static Public Member Functions

static auto new () -> meshlib::Owned< meshlib::Quaterniond >
static auto construct_from_another (_other:&meshlib::Quaterniond) -> meshlib::Owned< meshlib::Quaterniond >
static auto construct_4 (a:f64, b:f64, c:f64, d:f64) -> meshlib::Owned< meshlib::Quaterniond >
static auto construct_2_double (real:f64, im:&meshlib::Vector3d) -> meshlib::Owned< meshlib::Quaterniond >
static auto construct_1 (m:&meshlib::Matrix3d) -> meshlib::Owned< meshlib::Quaterniond >
static auto construct_2_const_mr_vector3d_ref_mr_vector3d (from:&meshlib::Vector3d, to:&meshlib::Vector3d) -> meshlib::Owned< meshlib::Quaterniond >
static auto lerp (q0:&meshlib::Quaterniond, q1:&meshlib::Quaterniond, t:f64) -> meshlib::Owned< meshlib::Quaterniond >
static auto slerp_3_mr_quaterniond (q0:&meshlib::Quaterniond, q1:&meshlib::Quaterniond, t:f64) -> meshlib::Owned< meshlib::Quaterniond >
static auto slerp_3_mr_matrix3d (m0:&meshlib::Matrix3d, m1:&meshlib::Matrix3d, t:f64) -> meshlib::Matrix3d
static auto slerp_4 (xf0:&meshlib::AffineXf3d, xf1:&meshlib::AffineXf3d, t:f64, p:Option<&meshlib::Vector3d >) -> meshlib::AffineXf3d
Static Public Member Functions inherited from meshlib::CppClass
static void destroy (ptr:*mut Self)
Static Public Member Functions inherited from meshlib::CppCopy
static auto copy (ptr:*const Self) -> *mut Self

(Note that these are not member symbols.)

static auto construct_2_const_mr_vector3d_ref_double (axis:&meshlib::Vector3d, angle:f64) -> meshlib::Owned< meshlib::Quaterniond >

Detailed Description

Represents a quaternion following the notations from https://en.wikipedia.org/wiki/Quaternion Generated from class MR::Quaterniond.

Generated from class MR::Quaterniond. Heap-allocated instances are held in Owned<Quaterniond>.

Member Function Documentation

◆ a()

auto meshlib::Quaterniond::a ( ) const -> &f64

< real part of the quaternion Returns a pointer to a member variable of class MR::Quaterniond named a.

Calls MR_Quaterniond_Get_a(). The reference to this object might be preserved as the return value.

◆ a_mut()

auto meshlib::Quaterniond::a_mut ( ) -> &mut f64

< real part of the quaternion Returns a mutable pointer to a member variable of class MR::Quaterniond named a.

Calls MR_Quaterniond_GetMutable_a(). The reference to this object might be preserved as the return value.

◆ angle()

auto meshlib::Quaterniond::angle ( ) const -> f64

returns angle of rotation encoded in this quaternion Generated from method MR::Quaterniond::angle.

Calls MR_Quaterniond_angle().

◆ assign_from_another()

auto meshlib::Quaterniond::assign_from_another ( _other:&meshlib::Quaterniond ) -> &mut meshlib::Quaterniond

Generated from method MR::Quaterniond::operator=.

Calls MR_Quaterniond_AssignFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in this object.

◆ axis()

auto meshlib::Quaterniond::axis ( ) const -> meshlib::Vector3d

returns axis of rotation encoded in this quaternion Generated from method MR::Quaterniond::axis.

Calls MR_Quaterniond_axis().

◆ b()

auto meshlib::Quaterniond::b ( ) const -> &f64

< imaginary part: b*i + c*j + d*k Returns a pointer to a member variable of class MR::Quaterniond named b.

Calls MR_Quaterniond_Get_b(). The reference to this object might be preserved as the return value.

◆ b_mut()

auto meshlib::Quaterniond::b_mut ( ) -> &mut f64

< imaginary part: b*i + c*j + d*k Returns a mutable pointer to a member variable of class MR::Quaterniond named b.

Calls MR_Quaterniond_GetMutable_b(). The reference to this object might be preserved as the return value.

◆ c()

auto meshlib::Quaterniond::c ( ) const -> &f64

< imaginary part: b*i + c*j + d*k Returns a pointer to a member variable of class MR::Quaterniond named c.

Calls MR_Quaterniond_Get_c(). The reference to this object might be preserved as the return value.

◆ c_mut()

auto meshlib::Quaterniond::c_mut ( ) -> &mut f64

< imaginary part: b*i + c*j + d*k Returns a mutable pointer to a member variable of class MR::Quaterniond named c.

Calls MR_Quaterniond_GetMutable_c(). The reference to this object might be preserved as the return value.

◆ call()

auto meshlib::Quaterniond::call ( p:&meshlib::Vector3d ) const -> meshlib::Vector3d

for unit quaternion returns the rotation of point p, which is faster to compute for single point; for multiple points it is faster to create matrix representation and apply it to the points Generated from method MR::Quaterniond::operator().

Calls MR_Quaterniond_call().

◆ conjugate()

auto meshlib::Quaterniond::conjugate ( ) const -> meshlib::Owned< meshlib::Quaterniond >

computes conjugate quaternion, which for unit quaternions encodes the opposite rotation Generated from method MR::Quaterniond::conjugate.

Calls MR_Quaterniond_conjugate().

◆ construct_1()

auto meshlib::Quaterniond::construct_1 ( m:&meshlib::Matrix3d ) -> meshlib::Owned< meshlib::Quaterniond >
static

Generated from constructor MR::Quaterniond::Quaterniond.

Calls MR_Quaterniond_Construct_1(). The reference to the parameter m might be preserved in the constructed object.

◆ construct_2_const_mr_vector3d_ref_mr_vector3d()

auto meshlib::Quaterniond::construct_2_const_mr_vector3d_ref_mr_vector3d ( from:&meshlib::Vector3d ,
to:&meshlib::Vector3d  ) -> meshlib::Owned< meshlib::Quaterniond >
static

finds shorter arc rotation quaternion from one vector to another Generated from constructor MR::Quaterniond::Quaterniond.

Calls MR_Quaterniond_Construct_2_const_MR_Vector3d_ref_MR_Vector3d(). The reference to the parameter from might be preserved in the constructed object. The reference to the parameter to might be preserved in the constructed object.

◆ construct_2_double()

auto meshlib::Quaterniond::construct_2_double ( real:f64 ,
im:&meshlib::Vector3d  ) -> meshlib::Owned< meshlib::Quaterniond >
static

Generated from constructor MR::Quaterniond::Quaterniond.

Calls MR_Quaterniond_Construct_2_double(). The reference to the parameter im might be preserved in the constructed object.

◆ construct_4()

auto meshlib::Quaterniond::construct_4 ( a:f64 ,
b:f64 ,
c:f64 ,
d:f64  ) -> meshlib::Owned< meshlib::Quaterniond >
static

Generated from constructor MR::Quaterniond::Quaterniond.

Calls MR_Quaterniond_Construct_4().

◆ construct_from_another()

auto meshlib::Quaterniond::construct_from_another ( _other:&meshlib::Quaterniond ) -> meshlib::Owned< meshlib::Quaterniond >
static

Generated from constructor MR::Quaterniond::Quaterniond.

Calls MR_Quaterniond_ConstructFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.

◆ convert_to_mr_matrix3d()

auto meshlib::Quaterniond::convert_to_mr_matrix3d ( ) const -> meshlib::Matrix3d

converts this into 3x3 rotation matrix Generated from conversion operator MR::Quaterniond::operator MR::Matrix3d.

Calls MR_Quaterniond_ConvertTo_MR_Matrix3d().

◆ d()

auto meshlib::Quaterniond::d ( ) const -> &f64

< imaginary part: b*i + c*j + d*k Returns a pointer to a member variable of class MR::Quaterniond named d.

Calls MR_Quaterniond_Get_d(). The reference to this object might be preserved as the return value.

◆ d_mut()

auto meshlib::Quaterniond::d_mut ( ) -> &mut f64

< imaginary part: b*i + c*j + d*k Returns a mutable pointer to a member variable of class MR::Quaterniond named d.

Calls MR_Quaterniond_GetMutable_d(). The reference to this object might be preserved as the return value.

◆ div_assign()

auto meshlib::Quaterniond::div_assign ( s:f64 ) -> &mut meshlib::Quaterniond

Generated from method MR::Quaterniond::operator/=.

Calls MR_Quaterniond_div_assign(). The reference to this object might be preserved in the return value.

◆ im()

auto meshlib::Quaterniond::im ( ) const -> meshlib::Vector3d

returns imaginary part of the quaternion as a vector Generated from method MR::Quaterniond::im.

Calls MR_Quaterniond_im().

◆ inverse()

auto meshlib::Quaterniond::inverse ( ) const -> meshlib::Owned< meshlib::Quaterniond >

computes reciprocal quaternion Generated from method MR::Quaterniond::inverse.

Calls MR_Quaterniond_inverse().

◆ lerp()

auto meshlib::Quaterniond::lerp ( q0:&meshlib::Quaterniond ,
q1:&meshlib::Quaterniond ,
t:f64  ) -> meshlib::Owned< meshlib::Quaterniond >
static

given t in [0,1], interpolates linearly two quaternions giving in general not-unit quaternion Generated from method MR::Quaterniond::lerp.

Calls MR_Quaterniond_lerp().

◆ mul_assign()

auto meshlib::Quaterniond::mul_assign ( s:f64 ) -> &mut meshlib::Quaterniond

Generated from method MR::Quaterniond::operator*=.

Calls MR_Quaterniond_mul_assign(). The reference to this object might be preserved in the return value.

◆ new()

auto meshlib::Quaterniond::new ( ) -> meshlib::Owned< meshlib::Quaterniond >
static

Constructs an empty (default-constructed) instance.

Calls MR_Quaterniond_DefaultConstruct().

◆ norm()

auto meshlib::Quaterniond::norm ( ) const -> f64

Generated from method MR::Quaterniond::norm.

Calls MR_Quaterniond_norm().

◆ norm_sq()

auto meshlib::Quaterniond::norm_sq ( ) const -> f64

Generated from method MR::Quaterniond::normSq.

Calls MR_Quaterniond_normSq().

◆ normalize()

void meshlib::Quaterniond::normalize ( )

scales this quaternion to make its norm unit Generated from method MR::Quaterniond::normalize.

Calls MR_Quaterniond_normalize().

◆ normalized()

auto meshlib::Quaterniond::normalized ( ) const -> meshlib::Owned< meshlib::Quaterniond >

Generated from method MR::Quaterniond::normalized.

Calls MR_Quaterniond_normalized().

◆ op_neg()

auto meshlib::Quaterniond::op_neg ( ) const -> meshlib::Owned< meshlib::Quaterniond >

returns quaternion representing the same rotation, using the opposite rotation direction and opposite angle Generated from method MR::Quaterniond::operator-.

Calls MR_neg_MR_Quaterniond().

◆ set_a()

void meshlib::Quaterniond::set_a ( value:f64 )

< real part of the quaternion Modifies a member variable of class MR::Quaterniond named a.

Calls MR_Quaterniond_Set_a().

◆ set_b()

void meshlib::Quaterniond::set_b ( value:f64 )

< imaginary part: b*i + c*j + d*k Modifies a member variable of class MR::Quaterniond named b.

Calls MR_Quaterniond_Set_b().

◆ set_c()

void meshlib::Quaterniond::set_c ( value:f64 )

< imaginary part: b*i + c*j + d*k Modifies a member variable of class MR::Quaterniond named c.

Calls MR_Quaterniond_Set_c().

◆ set_d()

void meshlib::Quaterniond::set_d ( value:f64 )

< imaginary part: b*i + c*j + d*k Modifies a member variable of class MR::Quaterniond named d.

Calls MR_Quaterniond_Set_d().

◆ slerp_3_mr_matrix3d()

auto meshlib::Quaterniond::slerp_3_mr_matrix3d ( m0:&meshlib::Matrix3d ,
m1:&meshlib::Matrix3d ,
t:f64  ) -> meshlib::Matrix3d
static

given t in [0,1] and two rotation matrices, interpolates them spherically and produces another rotation matrix Generated from method MR::Quaterniond::slerp.

Calls MR_Quaterniond_slerp_3_MR_Matrix3d().

◆ slerp_3_mr_quaterniond()

auto meshlib::Quaterniond::slerp_3_mr_quaterniond ( q0:&meshlib::Quaterniond ,
q1:&meshlib::Quaterniond ,
t:f64  ) -> meshlib::Owned< meshlib::Quaterniond >
static

given t in [0,1] and two unit quaternions, interpolates them spherically and produces another unit quaternion Generated from method MR::Quaterniond::slerp.

Calls MR_Quaterniond_slerp_3_MR_Quaterniond().

◆ slerp_4()

auto meshlib::Quaterniond::slerp_4 ( xf0:&meshlib::AffineXf3d ,
xf1:&meshlib::AffineXf3d ,
t:f64 ,
p:Option<&meshlib::Vector3d >  ) -> meshlib::AffineXf3d
static

given t in [0,1] and rigid transformations, interpolates them spherically and produces another rigid transformation; p is the only point that will have straight line movement during interpolation Generated from method MR::Quaterniond::slerp.

Calls MR_Quaterniond_slerp_4().

◆ construct_2_const_mr_vector3d_ref_double()

auto construct_2_const_mr_vector3d_ref_double ( axis:&meshlib::Vector3d ,
angle:f64  ) -> meshlib::Owned< meshlib::Quaterniond >
related

Generated from constructor MR::Quaterniond::Quaterniond.

Calls MR_Quaterniond_Construct_2_const_MR_Vector3d_ref_double(). The reference to the parameter axis might be preserved in the constructed object.


The documentation for this struct was generated from the following file: