Untold Engine  Beta v0.0.16
docs
U4DEngine::U4DDualQuaternion Class Reference

The U4DDualQuaternion class implements a Dual-Quaternion mathematical entity used for storing rotation and translations as real and pure quaternions, respectively. More...

Public Member Functions

 U4DDualQuaternion ()
 Dual quaternion constructor. The constructor creates a Real and a Pure Quaternion used for rotation and translation.
 
 U4DDualQuaternion (const U4DQuaternion &q, U4DVector3n &v)
 Dual quaternion constructor which constructs a dualquaternion from a quaternion and a 3D vector.
 
 U4DDualQuaternion (const U4DQuaternion &q, U4DQuaternion &v)
 Dual quaternion constructor that constructs a dualquaternion from two quaternions representing rotation and translation, respectively.
 
 U4DDualQuaternion (const U4DDualQuaternion &value)
 Copy constructor for a dual quaternion.
 
U4DDualQuaternionoperator= (const U4DDualQuaternion &value)
 Copy constructor for a dual quaternion. More...
 
 ~U4DDualQuaternion ()
 Dual quaternion destructor.
 
void operator+= (const U4DDualQuaternion &q)
 Method to add two dual quaternions. More...
 
U4DDualQuaternion operator+ (const U4DDualQuaternion &q) const
 Method to add two dual quaternions. More...
 
void operator*= (const U4DDualQuaternion &q)
 Method to multiply two dual quaternions. More...
 
U4DDualQuaternion operator* (const U4DDualQuaternion &q) const
 Method to multiply two dual quaternions. More...
 
U4DDualQuaternion multiply (const U4DDualQuaternion &q) const
 Method to multiply two dual quaternions. More...
 
U4DDualQuaternion operator* (const float value)
 Method to multiply a dual quaternion times a scalar value. More...
 
float dot (U4DDualQuaternion &q)
 Method which determines the dot product between two dual quaternions. More...
 
U4DDualQuaternion normalize ()
 Method to normalize the dual quaternions. More...
 
U4DDualQuaternion conjugate ()
 Method to conjugate the dual quaternion. More...
 
U4DQuaternion getRealQuaternionPart ()
 Method to get the Real part of the dual quaternion. That is, it gets the quaternion that represents the orientation. More...
 
U4DQuaternion getPureQuaternionPart ()
 Method to get the Pure part of the dual quaternion. That is, it gets the quaternion that represents translation. More...
 
U4DMatrix4n transformDualQuaternionToMatrix4n ()
 Method which transforms a Dual quaternion into its 4x4 matrix representation. More...
 
void transformMatrix4nToDualQuaternion (U4DMatrix4n &uMatrix)
 Method which transforms a 4x4 matrix into its dual quaternion representation. More...
 
void setRealQuaternionPart (U4DQuaternion &uqReal)
 Method which sets the Real part of the dual quaternion. More...
 
void setPureQuaternionPart (U4DQuaternion &uqPure)
 Method which sets the Pure part of the dual quaternion. More...
 
U4DDualQuaternion sclerp (U4DDualQuaternion &uToDualQuaternion, float t)
 Method which computes the sclerp between two dual quaternions. More...
 
void show ()
 Method which prints the Real and Pure parts of the dual quaternion.
 

Public Attributes

U4DQuaternion qReal
 real part of dual quaternion. This quaternion represents Orientation
 
U4DQuaternion qPure
 pure part of dual quaternion- This quaternion represents Translation
 

Detailed Description

The U4DDualQuaternion class implements a Dual-Quaternion mathematical entity used for storing rotation and translations as real and pure quaternions, respectively.

Member Function Documentation

◆ conjugate()

U4DDualQuaternion U4DEngine::U4DDualQuaternion::conjugate ( )

Method to conjugate the dual quaternion.

Returns
Conjugates the dual quaternion

◆ dot()

float U4DEngine::U4DDualQuaternion::dot ( U4DDualQuaternion q)

Method which determines the dot product between two dual quaternions.

Parameters
qDual quaternion to find the dot product with
Returns
Returns the dot product of the dual quaternions

◆ getPureQuaternionPart()

U4DQuaternion U4DEngine::U4DDualQuaternion::getPureQuaternionPart ( )

Method to get the Pure part of the dual quaternion. That is, it gets the quaternion that represents translation.

Returns
Returns the quaternion representing translation

◆ getRealQuaternionPart()

U4DQuaternion U4DEngine::U4DDualQuaternion::getRealQuaternionPart ( )

Method to get the Real part of the dual quaternion. That is, it gets the quaternion that represents the orientation.

Returns
Returns the quaternion representing the orientation

◆ multiply()

U4DDualQuaternion U4DEngine::U4DDualQuaternion::multiply ( const U4DDualQuaternion q) const

Method to multiply two dual quaternions.

Parameters
qDual quaternion to multiply
Returns
Returns the product of two dual quaternions

◆ normalize()

U4DDualQuaternion U4DEngine::U4DDualQuaternion::normalize ( )

Method to normalize the dual quaternions.

Returns
Normalizes the dual quaternion

◆ operator*() [1/2]

U4DDualQuaternion U4DEngine::U4DDualQuaternion::operator* ( const float  value)

Method to multiply a dual quaternion times a scalar value.

Parameters
valueScalar value to multiply the dual quaternion
Returns
Returns the product of a dual quaternion and a scalar

◆ operator*() [2/2]

U4DDualQuaternion U4DEngine::U4DDualQuaternion::operator* ( const U4DDualQuaternion q) const

Method to multiply two dual quaternions.

Parameters
qDual quaternion to multiply
Returns
Returns the product of two dual quaternions

◆ operator*=()

void U4DEngine::U4DDualQuaternion::operator*= ( const U4DDualQuaternion q)

Method to multiply two dual quaternions.

Parameters
qDual quaternion to multiply
Returns
Returns the product of two dual quaternions

◆ operator+()

U4DDualQuaternion U4DEngine::U4DDualQuaternion::operator+ ( const U4DDualQuaternion q) const

Method to add two dual quaternions.

Parameters
qDual quaternion to add
Returns
Returns the addition of two dual quaternions

◆ operator+=()

void U4DEngine::U4DDualQuaternion::operator+= ( const U4DDualQuaternion q)

Method to add two dual quaternions.

Parameters
qDual quaternion to add
Returns
Returns the addition of two dual quaternions

◆ operator=()

U4DDualQuaternion & U4DEngine::U4DDualQuaternion::operator= ( const U4DDualQuaternion value)

Copy constructor for a dual quaternion.

Parameters
valueDualquaternion to copy
Returns
Returns a copy of the dual quaternion

◆ sclerp()

U4DDualQuaternion U4DEngine::U4DDualQuaternion::sclerp ( U4DDualQuaternion uToDualQuaternion,
float  t 
)

Method which computes the sclerp between two dual quaternions.

Parameters
uToDualQuaternionDual quaternion to compute sclerp with
tScalar time value
Returns
Returns the sclerp between the two dual quaternions

◆ setPureQuaternionPart()

void U4DEngine::U4DDualQuaternion::setPureQuaternionPart ( U4DQuaternion uqPure)

Method which sets the Pure part of the dual quaternion.

Parameters
uqPurePure part of the Dual quaternion

◆ setRealQuaternionPart()

void U4DEngine::U4DDualQuaternion::setRealQuaternionPart ( U4DQuaternion uqReal)

Method which sets the Real part of the dual quaternion.

Parameters
uqRealReal part of the Dual quaternion

◆ transformDualQuaternionToMatrix4n()

U4DMatrix4n U4DEngine::U4DDualQuaternion::transformDualQuaternionToMatrix4n ( )

Method which transforms a Dual quaternion into its 4x4 matrix representation.

Returns
Returns a 4x4 matrix representation

◆ transformMatrix4nToDualQuaternion()

void U4DEngine::U4DDualQuaternion::transformMatrix4nToDualQuaternion ( U4DMatrix4n uMatrix)

Method which transforms a 4x4 matrix into its dual quaternion representation.

Parameters
uMatrix4x4 matrix to use to compute the dual quaternion representation