MeshLib Python Docs
Loading...
Searching...
No Matches
mrmeshpy.Quaternionf Class Reference

Public Member Functions

Vector3f __call__ (self, Vector3f p)
 
Quaternionf __imatmul__ (self, float s)
 
None __init__ (self)
 
None __init__ (self, float a, float b, float c, float d)
 
None __init__ (self, Vector3f axis, float angle)
 
None __init__ (self, float real, Vector3f im)
 
None __init__ (self, Matrix3f m)
 
None __init__ (self, Vector3f from_, Vector3f to)
 
Quaternionf __itruediv__ (self, float s)
 
Quaternionf __neg__ (self)
 
float angle (self)
 
Vector3f axis (self)
 
Quaternionf conjugate (self)
 
Vector3f im (self)
 
Quaternionf inverse (self)
 
float norm (self)
 
float normSq (self)
 
None normalize (self)
 
Quaternionf normalized (self)
 
float a (self)
 
None a (self, float arg1)
 
float b (self)
 
None b (self, float arg1)
 
float c (self)
 
None c (self, float arg1)
 
float d (self)
 
None d (self, float arg1)
 

Static Public Member Functions

None __init__ (*args, **kwargs)
 
Quaternionf lerp (Quaternionf q0, Quaternionf q1, float t)
 
Quaternionf operator (*args, **kwargs)
 
Quaternionf operator (*args, **kwargs)
 
Quaternionf slerp (Quaternionf q0, Quaternionf q1, float t)
 
Matrix3f slerp (Matrix3f m0, Matrix3f m1, float t)
 
AffineXf3f slerp (AffineXf3f xf0, AffineXf3f xf1, float t, Vector3f p='{}')
 

Static Protected Attributes

typing _offsetof_a = 0
 
typing _offsetof_b = 4
 
typing _offsetof_c = 8
 
typing _offsetof_d = 12
 

Detailed Description

Generated from:  MR::Quaternionf

Represents a quaternion following the notations from
https://en.wikipedia.org/wiki/Quaternion
\\ingroup MathGroup

Constructor & Destructor Documentation

◆ __init__() [1/7]

None mrmeshpy.Quaternionf.__init__ ( * args,
** kwargs )
static

◆ __init__() [2/7]

None mrmeshpy.Quaternionf.__init__ ( self)

◆ __init__() [3/7]

None mrmeshpy.Quaternionf.__init__ ( self,
float a,
float b,
float c,
float d )

◆ __init__() [4/7]

None mrmeshpy.Quaternionf.__init__ ( self,
Vector3f axis,
float angle )
\\related Quaternion
\\{

◆ __init__() [5/7]

None mrmeshpy.Quaternionf.__init__ ( self,
float real,
Vector3f im )

◆ __init__() [6/7]

None mrmeshpy.Quaternionf.__init__ ( self,
Matrix3f m )

◆ __init__() [7/7]

None mrmeshpy.Quaternionf.__init__ ( self,
Vector3f from_,
Vector3f to )
finds shorter arc rotation quaternion from one vector to another

Member Function Documentation

◆ __call__()

Vector3f mrmeshpy.Quaternionf.__call__ ( self,
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

◆ __imatmul__()

Quaternionf mrmeshpy.Quaternionf.__imatmul__ ( self,
float s )

◆ __itruediv__()

Quaternionf mrmeshpy.Quaternionf.__itruediv__ ( self,
float s )

◆ __neg__()

Quaternionf mrmeshpy.Quaternionf.__neg__ ( self)
returns quaternion representing the same rotation, using the opposite rotation direction and opposite angle

◆ a() [1/2]

float mrmeshpy.Quaternionf.a ( self)
real part of the quaternion

◆ a() [2/2]

None mrmeshpy.Quaternionf.a ( self,
float arg1 )

◆ angle()

float mrmeshpy.Quaternionf.angle ( self)
returns angle of rotation encoded in this quaternion

◆ axis()

Vector3f mrmeshpy.Quaternionf.axis ( self)
returns axis of rotation encoded in this quaternion

◆ b() [1/2]

float mrmeshpy.Quaternionf.b ( self)
imaginary part: b*i + c*j + d*k

◆ b() [2/2]

None mrmeshpy.Quaternionf.b ( self,
float arg1 )

◆ c() [1/2]

float mrmeshpy.Quaternionf.c ( self)
imaginary part: b*i + c*j + d*k

◆ c() [2/2]

None mrmeshpy.Quaternionf.c ( self,
float arg1 )

◆ conjugate()

Quaternionf mrmeshpy.Quaternionf.conjugate ( self)
computes conjugate quaternion, which for unit quaternions encodes the opposite rotation

◆ d() [1/2]

float mrmeshpy.Quaternionf.d ( self)
imaginary part: b*i + c*j + d*k

◆ d() [2/2]

None mrmeshpy.Quaternionf.d ( self,
float arg1 )

◆ im()

Vector3f mrmeshpy.Quaternionf.im ( self)
returns imaginary part of the quaternion as a vector

◆ inverse()

Quaternionf mrmeshpy.Quaternionf.inverse ( self)
computes reciprocal quaternion

◆ lerp()

Quaternionf mrmeshpy.Quaternionf.lerp ( Quaternionf q0,
Quaternionf q1,
float t )
static
given t in [0,1], interpolates linearly two quaternions giving in general not-unit quaternion

◆ norm()

float mrmeshpy.Quaternionf.norm ( self)

◆ normalize()

None mrmeshpy.Quaternionf.normalize ( self)
scales this quaternion to make its norm unit

◆ normalized()

Quaternionf mrmeshpy.Quaternionf.normalized ( self)

◆ normSq()

float mrmeshpy.Quaternionf.normSq ( self)

◆ operator() [1/2]

Quaternionf mrmeshpy.Quaternionf.operator ( * args,
** kwargs )
static

◆ operator() [2/2]

Quaternionf mrmeshpy.Quaternionf.operator ( * args,
** kwargs )
static

◆ slerp() [1/3]

AffineXf3f mrmeshpy.Quaternionf.slerp ( AffineXf3f xf0,
AffineXf3f xf1,
float t,
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

◆ slerp() [2/3]

Matrix3f mrmeshpy.Quaternionf.slerp ( Matrix3f m0,
Matrix3f m1,
float t )
static
given t in [0,1] and two rotation matrices, interpolates them spherically and produces another rotation matrix

◆ slerp() [3/3]

Quaternionf mrmeshpy.Quaternionf.slerp ( Quaternionf q0,
Quaternionf q1,
float t )
static
given t in [0,1] and two unit quaternions, interpolates them spherically and produces another unit quaternion

Member Data Documentation

◆ _offsetof_a

typing mrmeshpy.Quaternionf._offsetof_a = 0
staticprotected

◆ _offsetof_b

typing mrmeshpy.Quaternionf._offsetof_b = 4
staticprotected

◆ _offsetof_c

typing mrmeshpy.Quaternionf._offsetof_c = 8
staticprotected

◆ _offsetof_d

typing mrmeshpy.Quaternionf._offsetof_d = 12
staticprotected

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