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

Public Member Functions

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

Static Public Member Functions

static auto new () -> meshlib::Owned< meshlib::Quaternionf >
static auto construct_from_another (_other:&meshlib::Quaternionf) -> meshlib::Owned< meshlib::Quaternionf >
static auto construct_4 (a:f32, b:f32, c:f32, d:f32) -> meshlib::Owned< meshlib::Quaternionf >
static auto construct_2_float (real:f32, im:&meshlib::Vector3f) -> meshlib::Owned< meshlib::Quaternionf >
static auto construct_1 (m:&meshlib::Matrix3f) -> meshlib::Owned< meshlib::Quaternionf >
static auto construct_2_const_mr_vector3f_ref_mr_vector3f (from:&meshlib::Vector3f, to:&meshlib::Vector3f) -> meshlib::Owned< meshlib::Quaternionf >
static auto lerp (q0:&meshlib::Quaternionf, q1:&meshlib::Quaternionf, t:f32) -> meshlib::Owned< meshlib::Quaternionf >
static auto slerp_3_mr_quaternionf (q0:&meshlib::Quaternionf, q1:&meshlib::Quaternionf, t:f32) -> meshlib::Owned< meshlib::Quaternionf >
static auto slerp_3_mr_matrix3f (m0:&meshlib::Matrix3f, m1:&meshlib::Matrix3f, t:f32) -> meshlib::Matrix3f
static auto slerp_4 (xf0:&meshlib::AffineXf3f, xf1:&meshlib::AffineXf3f, t:f32, p:Option<&meshlib::Vector3f >) -> meshlib::AffineXf3f
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_vector3f_ref_float (axis:&meshlib::Vector3f, angle:f32) -> meshlib::Owned< meshlib::Quaternionf >

Detailed Description

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

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

Member Function Documentation

◆ a()

auto meshlib::Quaternionf::a ( ) const -> &f32

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

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

◆ a_mut()

auto meshlib::Quaternionf::a_mut ( ) -> &mut f32

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

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

◆ angle()

auto meshlib::Quaternionf::angle ( ) const -> f32

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

Calls MR_Quaternionf_angle().

◆ assign_from_another()

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

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

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

◆ axis()

auto meshlib::Quaternionf::axis ( ) const -> meshlib::Vector3f

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

Calls MR_Quaternionf_axis().

◆ b()

auto meshlib::Quaternionf::b ( ) const -> &f32

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

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

◆ b_mut()

auto meshlib::Quaternionf::b_mut ( ) -> &mut f32

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

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

◆ c()

auto meshlib::Quaternionf::c ( ) const -> &f32

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

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

◆ c_mut()

auto meshlib::Quaternionf::c_mut ( ) -> &mut f32

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

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

◆ call()

auto meshlib::Quaternionf::call ( p:&meshlib::Vector3f ) const -> meshlib::Vector3f

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::Quaternionf::operator().

Calls MR_Quaternionf_call().

◆ conjugate()

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

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

Calls MR_Quaternionf_conjugate().

◆ construct_1()

auto meshlib::Quaternionf::construct_1 ( m:&meshlib::Matrix3f ) -> meshlib::Owned< meshlib::Quaternionf >
static

Generated from constructor MR::Quaternionf::Quaternionf.

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

◆ construct_2_const_mr_vector3f_ref_mr_vector3f()

auto meshlib::Quaternionf::construct_2_const_mr_vector3f_ref_mr_vector3f ( from:&meshlib::Vector3f ,
to:&meshlib::Vector3f  ) -> meshlib::Owned< meshlib::Quaternionf >
static

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

Calls MR_Quaternionf_Construct_2_const_MR_Vector3f_ref_MR_Vector3f(). 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_float()

auto meshlib::Quaternionf::construct_2_float ( real:f32 ,
im:&meshlib::Vector3f  ) -> meshlib::Owned< meshlib::Quaternionf >
static

Generated from constructor MR::Quaternionf::Quaternionf.

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

◆ construct_4()

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

Generated from constructor MR::Quaternionf::Quaternionf.

Calls MR_Quaternionf_Construct_4().

◆ construct_from_another()

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

Generated from constructor MR::Quaternionf::Quaternionf.

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

◆ convert_to_mr_matrix3f()

auto meshlib::Quaternionf::convert_to_mr_matrix3f ( ) const -> meshlib::Matrix3f

converts this into 3x3 rotation matrix Generated from conversion operator MR::Quaternionf::operator MR::Matrix3f.

Calls MR_Quaternionf_ConvertTo_MR_Matrix3f().

◆ d()

auto meshlib::Quaternionf::d ( ) const -> &f32

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

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

◆ d_mut()

auto meshlib::Quaternionf::d_mut ( ) -> &mut f32

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

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

◆ div_assign()

auto meshlib::Quaternionf::div_assign ( s:f32 ) -> &mut meshlib::Quaternionf

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

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

◆ im()

auto meshlib::Quaternionf::im ( ) const -> meshlib::Vector3f

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

Calls MR_Quaternionf_im().

◆ inverse()

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

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

Calls MR_Quaternionf_inverse().

◆ lerp()

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

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

Calls MR_Quaternionf_lerp().

◆ mul_assign()

auto meshlib::Quaternionf::mul_assign ( s:f32 ) -> &mut meshlib::Quaternionf

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

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

◆ new()

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

Constructs an empty (default-constructed) instance.

Calls MR_Quaternionf_DefaultConstruct().

◆ norm()

auto meshlib::Quaternionf::norm ( ) const -> f32

Generated from method MR::Quaternionf::norm.

Calls MR_Quaternionf_norm().

◆ norm_sq()

auto meshlib::Quaternionf::norm_sq ( ) const -> f32

Generated from method MR::Quaternionf::normSq.

Calls MR_Quaternionf_normSq().

◆ normalize()

void meshlib::Quaternionf::normalize ( )

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

Calls MR_Quaternionf_normalize().

◆ normalized()

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

Generated from method MR::Quaternionf::normalized.

Calls MR_Quaternionf_normalized().

◆ op_neg()

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

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

Calls MR_neg_MR_Quaternionf().

◆ set_a()

void meshlib::Quaternionf::set_a ( value:f32 )

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

Calls MR_Quaternionf_Set_a().

◆ set_b()

void meshlib::Quaternionf::set_b ( value:f32 )

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

Calls MR_Quaternionf_Set_b().

◆ set_c()

void meshlib::Quaternionf::set_c ( value:f32 )

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

Calls MR_Quaternionf_Set_c().

◆ set_d()

void meshlib::Quaternionf::set_d ( value:f32 )

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

Calls MR_Quaternionf_Set_d().

◆ slerp_3_mr_matrix3f()

auto meshlib::Quaternionf::slerp_3_mr_matrix3f ( m0:&meshlib::Matrix3f ,
m1:&meshlib::Matrix3f ,
t:f32  ) -> meshlib::Matrix3f
static

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

Calls MR_Quaternionf_slerp_3_MR_Matrix3f().

◆ slerp_3_mr_quaternionf()

auto meshlib::Quaternionf::slerp_3_mr_quaternionf ( q0:&meshlib::Quaternionf ,
q1:&meshlib::Quaternionf ,
t:f32  ) -> meshlib::Owned< meshlib::Quaternionf >
static

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

Calls MR_Quaternionf_slerp_3_MR_Quaternionf().

◆ slerp_4()

auto meshlib::Quaternionf::slerp_4 ( xf0:&meshlib::AffineXf3f ,
xf1:&meshlib::AffineXf3f ,
t:f32 ,
p:Option<&meshlib::Vector3f >  ) -> meshlib::AffineXf3f
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::Quaternionf::slerp.

Calls MR_Quaternionf_slerp_4().

◆ construct_2_const_mr_vector3f_ref_float()

auto construct_2_const_mr_vector3f_ref_float ( axis:&meshlib::Vector3f ,
angle:f32  ) -> meshlib::Owned< meshlib::Quaternionf >
related

Generated from constructor MR::Quaternionf::Quaternionf.

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


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