MeshLib Python Docs
Loading...
Searching...
No Matches
meshlib.mrmeshpy.Quaterniond Class Reference

Public Member Functions

Vector3d __call__ (self, Vector3d p)
 
Quaterniond __imatmul__ (self, float s)
 
None __init__ (self)
 
None __init__ (self, float a, float b, float c, float d)
 
None __init__ (self, Vector3d axis, float angle)
 
None __init__ (self, float real, Vector3d im)
 
None __init__ (self, Matrix3d m)
 
None __init__ (self, Vector3d from_, Vector3d to)
 
None __init__ (self, Quaterniond arg0)
 
Quaterniond __itruediv__ (self, float s)
 
Quaterniond __neg__ (self)
 
float angle (self)
 
Vector3d axis (self)
 
Quaterniond conjugate (self)
 
Vector3d im (self)
 
Quaterniond inverse (self)
 
float norm (self)
 
float normSq (self)
 
None normalize (self)
 
Quaterniond 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

Quaterniond lerp (Quaterniond q0, Quaterniond q1, float t)
 
Quaterniond slerp (Quaterniond q0, Quaterniond q1, float t)
 
Matrix3d slerp (Matrix3d m0, Matrix3d m1, float t)
 
AffineXf3d slerp (AffineXf3d xf0, AffineXf3d xf1, float t, Vector3d p='MR::Vector3< double >{}')
 

Protected Member Functions

Matrix3d _convert_to_Matrix3_double (self)
 

Detailed Description

Generated from:  MR::Quaterniond
Aliases:  Quaternion_double

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

Constructor & Destructor Documentation

◆ __init__() [1/7]

None meshlib.mrmeshpy.Quaterniond.__init__ ( self)

◆ __init__() [2/7]

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

◆ __init__() [3/7]

None meshlib.mrmeshpy.Quaterniond.__init__ ( self,
Vector3d axis,
float angle )
\\related Quaternion
\\{

◆ __init__() [4/7]

None meshlib.mrmeshpy.Quaterniond.__init__ ( self,
float real,
Vector3d im )

◆ __init__() [5/7]

None meshlib.mrmeshpy.Quaterniond.__init__ ( self,
Matrix3d m )

◆ __init__() [6/7]

None meshlib.mrmeshpy.Quaterniond.__init__ ( self,
Vector3d from_,
Vector3d to )
finds shorter arc rotation quaternion from one vector to another

◆ __init__() [7/7]

None meshlib.mrmeshpy.Quaterniond.__init__ ( self,
Quaterniond arg0 )
Implicit copy constructor.

Member Function Documentation

◆ __call__()

Vector3d meshlib.mrmeshpy.Quaterniond.__call__ ( self,
Vector3d 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__()

Quaterniond meshlib.mrmeshpy.Quaterniond.__imatmul__ ( self,
float s )

◆ __itruediv__()

Quaterniond meshlib.mrmeshpy.Quaterniond.__itruediv__ ( self,
float s )

◆ __neg__()

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

◆ _convert_to_Matrix3_double()

Matrix3d meshlib.mrmeshpy.Quaterniond._convert_to_Matrix3_double ( self)
protected
converts this into 3x3 rotation matrix

◆ a() [1/2]

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

◆ a() [2/2]

None meshlib.mrmeshpy.Quaterniond.a ( self,
float arg1 )

◆ angle()

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

◆ axis()

Vector3d meshlib.mrmeshpy.Quaterniond.axis ( self)
returns axis of rotation encoded in this quaternion

◆ b() [1/2]

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

◆ b() [2/2]

None meshlib.mrmeshpy.Quaterniond.b ( self,
float arg1 )

◆ c() [1/2]

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

◆ c() [2/2]

None meshlib.mrmeshpy.Quaterniond.c ( self,
float arg1 )

◆ conjugate()

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

◆ d() [1/2]

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

◆ d() [2/2]

None meshlib.mrmeshpy.Quaterniond.d ( self,
float arg1 )

◆ im()

Vector3d meshlib.mrmeshpy.Quaterniond.im ( self)
returns imaginary part of the quaternion as a vector

◆ inverse()

Quaterniond meshlib.mrmeshpy.Quaterniond.inverse ( self)
computes reciprocal quaternion

◆ lerp()

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

◆ norm()

float meshlib.mrmeshpy.Quaterniond.norm ( self)

◆ normalize()

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

◆ normalized()

Quaterniond meshlib.mrmeshpy.Quaterniond.normalized ( self)

◆ normSq()

float meshlib.mrmeshpy.Quaterniond.normSq ( self)

◆ slerp() [1/3]

AffineXf3d meshlib.mrmeshpy.Quaterniond.slerp ( AffineXf3d xf0,
AffineXf3d xf1,
float t,
Vector3d p = 'MR::Vector3<double>{}' )
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]

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

◆ slerp() [3/3]

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

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