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

Public Member Functions

 Quaternionf (java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner)
 Quaternionf ()
 Quaternionf (meshlib.Quaternionf _other)
 Quaternionf (float a, float b, float c, float d)
 Quaternionf (float real, meshlib.Vector3f im)
 Quaternionf (meshlib.Matrix3f m)
 Quaternionf (meshlib.Vector3f from, meshlib.Vector3f to)
meshlib.Matrix3f convertTo_MR_Matrix3f ()
meshlib.Quaternionf assignFromAnother (meshlib.Quaternionf _other)
meshlib.Vector3f im ()
float angle ()
meshlib.Vector3f axis ()
float normSq ()
float norm ()
meshlib.Quaternionf opSub ()
void normalize ()
meshlib.Quaternionf normalized ()
meshlib.Quaternionf conjugate ()
meshlib.Quaternionf inverse ()
meshlib.Vector3f call (meshlib.Vector3f p)
meshlib.Quaternionf mul_assign (float s)
meshlib.Quaternionf div_assign (float s)
float a ()
void setA (float value)
float b ()
void setB (float value)
float c ()
void setC (float value)
float d ()
void setD (float value)
Public Member Functions inherited from meshlib.CppObject
final java.lang.foreign.MemorySegment rawPointer ()
final boolean isOwned ()
final void close ()
final java.lang.foreign.MemorySegment release ()

Static Public Member Functions

static meshlib.Quaternionf lerp (meshlib.Quaternionf q0, meshlib.Quaternionf q1, float t)
static meshlib.Quaternionf slerp (meshlib.Quaternionf q0, meshlib.Quaternionf q1, float t)
static meshlib.Matrix3f slerp (meshlib.Matrix3f m0, meshlib.Matrix3f m1, float t)
static meshlib.AffineXf3f slerp (meshlib.AffineXf3f xf0, meshlib.AffineXf3f xf1, float t, meshlib.Vector3f p)

(Note that these are not member symbols.)

 Quaternionf (meshlib.Vector3f axis, float angle)

Additional Inherited Members

Protected Member Functions inherited from meshlib.CppObject
 CppObject (java.lang.foreign.MemorySegment ptr, java.util.function.Consumer< java.lang.foreign.MemorySegment > destroy, java.lang.Object owner)

Detailed Description

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

Instances created here own their C++ objects, see CppObject.

Constructor & Destructor Documentation

◆ Quaternionf() [1/7]

meshlib.Quaternionf.Quaternionf ( java.lang.foreign.MemorySegment ptr,
boolean owned,
java.lang.Object owner )

Wraps a pointer from the C bindings. If owned, the object is destroyed when the wrapper dies. owner is kept alive as long as this wrapper is. Not for normal use.

◆ Quaternionf() [2/7]

meshlib.Quaternionf.Quaternionf ( )

Constructs an empty (default-constructed) instance.

Calls MR_Quaternionf_DefaultConstruct().

◆ Quaternionf() [3/7]

meshlib.Quaternionf.Quaternionf ( meshlib.Quaternionf _other)

Generated from constructor MR::Quaternionf::Quaternionf. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.

Calls MR_Quaternionf_ConstructFromAnother().

◆ Quaternionf() [4/7]

meshlib.Quaternionf.Quaternionf ( float a,
float b,
float c,
float d )

Generated from constructor MR::Quaternionf::Quaternionf.

Calls MR_Quaternionf_Construct_4().

◆ Quaternionf() [5/7]

meshlib.Quaternionf.Quaternionf ( float real,
meshlib.Vector3f im )

Generated from constructor MR::Quaternionf::Quaternionf. The reference to the parameter im might be preserved in the constructed object.

Calls MR_Quaternionf_Construct_2_float().

◆ Quaternionf() [6/7]

meshlib.Quaternionf.Quaternionf ( meshlib.Matrix3f m)

Generated from constructor MR::Quaternionf::Quaternionf. The reference to the parameter m might be preserved in the constructed object.

Calls MR_Quaternionf_Construct_1().

◆ Quaternionf() [7/7]

meshlib.Quaternionf.Quaternionf ( meshlib.Vector3f from,
meshlib.Vector3f to )

finds shorter arc rotation quaternion from one vector to another Generated from constructor MR::Quaternionf::Quaternionf. 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.

Calls MR_Quaternionf_Construct_2_const_MR_Vector3f_ref_MR_Vector3f().

Member Function Documentation

◆ a()

float meshlib.Quaternionf.a ( )

< real part of the quaternion Returns a pointer to a member variable of class MR::Quaternionf named a. The reference to this object might be preserved as the return value.

Calls MR_Quaternionf_Get_a().

◆ angle()

float meshlib.Quaternionf.angle ( )

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

Calls MR_Quaternionf_angle().

◆ assignFromAnother()

meshlib.Quaternionf meshlib.Quaternionf.assignFromAnother ( meshlib.Quaternionf _other)

Generated from method MR::Quaternionf::operator=. The reference to things referred to by the parameter _other (if any) might be preserved in this object.

Calls MR_Quaternionf_AssignFromAnother().

◆ axis()

meshlib.Vector3f meshlib.Quaternionf.axis ( )

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

Calls MR_Quaternionf_axis().

◆ b()

float meshlib.Quaternionf.b ( )

< imaginary part: b*i + c*j + d*k Returns a pointer to a member variable of class MR::Quaternionf named b. The reference to this object might be preserved as the return value.

Calls MR_Quaternionf_Get_b().

◆ c()

float meshlib.Quaternionf.c ( )

< imaginary part: b*i + c*j + d*k Returns a pointer to a member variable of class MR::Quaternionf named c. The reference to this object might be preserved as the return value.

Calls MR_Quaternionf_Get_c().

◆ call()

meshlib.Vector3f meshlib.Quaternionf.call ( meshlib.Vector3f p)

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

meshlib.Quaternionf meshlib.Quaternionf.conjugate ( )

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

Calls MR_Quaternionf_conjugate().

◆ convertTo_MR_Matrix3f()

meshlib.Matrix3f meshlib.Quaternionf.convertTo_MR_Matrix3f ( )

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

Calls MR_Quaternionf_ConvertTo_MR_Matrix3f().

◆ d()

float meshlib.Quaternionf.d ( )

< imaginary part: b*i + c*j + d*k Returns a pointer to a member variable of class MR::Quaternionf named d. The reference to this object might be preserved as the return value.

Calls MR_Quaternionf_Get_d().

◆ div_assign()

meshlib.Quaternionf meshlib.Quaternionf.div_assign ( float s)

Generated from method MR::Quaternionf::operator/=. The reference to this object might be preserved in the return value.

Calls MR_Quaternionf_div_assign().

◆ im()

meshlib.Vector3f meshlib.Quaternionf.im ( )

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

Calls MR_Quaternionf_im().

◆ inverse()

meshlib.Quaternionf meshlib.Quaternionf.inverse ( )

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

Calls MR_Quaternionf_inverse().

◆ lerp()

meshlib.Quaternionf meshlib.Quaternionf.lerp ( meshlib.Quaternionf q0,
meshlib.Quaternionf q1,
float t )
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()

meshlib.Quaternionf meshlib.Quaternionf.mul_assign ( float s)

Generated from method MR::Quaternionf::operator*=. The reference to this object might be preserved in the return value.

Calls MR_Quaternionf_mul_assign().

◆ norm()

float meshlib.Quaternionf.norm ( )

Generated from method MR::Quaternionf::norm.

Calls MR_Quaternionf_norm().

◆ normalize()

void meshlib.Quaternionf.normalize ( )

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

Calls MR_Quaternionf_normalize().

◆ normalized()

meshlib.Quaternionf meshlib.Quaternionf.normalized ( )

Generated from method MR::Quaternionf::normalized.

Calls MR_Quaternionf_normalized().

◆ normSq()

float meshlib.Quaternionf.normSq ( )

Generated from method MR::Quaternionf::normSq.

Calls MR_Quaternionf_normSq().

◆ opSub()

meshlib.Quaternionf meshlib.Quaternionf.opSub ( )

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().

◆ setA()

void meshlib.Quaternionf.setA ( float value)

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

Calls MR_Quaternionf_Set_a().

◆ setB()

void meshlib.Quaternionf.setB ( float value)

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

Calls MR_Quaternionf_Set_b().

◆ setC()

void meshlib.Quaternionf.setC ( float value)

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

Calls MR_Quaternionf_Set_c().

◆ setD()

void meshlib.Quaternionf.setD ( float value)

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

Calls MR_Quaternionf_Set_d().

◆ slerp() [1/3]

meshlib.AffineXf3f meshlib.Quaternionf.slerp ( meshlib.AffineXf3f xf0,
meshlib.AffineXf3f xf1,
float t,
meshlib.Vector3f p )
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().

◆ slerp() [2/3]

meshlib.Matrix3f meshlib.Quaternionf.slerp ( meshlib.Matrix3f m0,
meshlib.Matrix3f m1,
float t )
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/3]

meshlib.Quaternionf meshlib.Quaternionf.slerp ( meshlib.Quaternionf q0,
meshlib.Quaternionf q1,
float t )
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().

◆ Quaternionf()

Quaternionf ( meshlib.Vector3f axis,
float angle )
related

Generated from constructor MR::Quaternionf::Quaternionf. The reference to the parameter axis might be preserved in the constructed object.

Calls MR_Quaternionf_Construct_2_const_MR_Vector3f_ref_float().


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