Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Core::DualQuaternion Class Reference

#include <Core/Math/DualQuaternion.hpp>

+ Collaboration diagram for Ra::Core::DualQuaternion:

Public Member Functions

 DualQuaternion ()
 Construct an uninitialized dual quaternion.
 
 DualQuaternion (const Quaternion &q0, const Quaternion &qe)
 Construct a dual-quaternion from two quaternions.
 
 DualQuaternion (const Core::Transform &tr)
 
 DualQuaternion (const DualQuaternion &other)=default
 Default copy constructor and assignment operator.
 
DualQuaternionoperator= (const DualQuaternion &)=default
 
const Quaternion & getQ0 () const
 Getters and setters.
 
void setQ0 (const Quaternion &q0)
 
const Quaternion & getQe () const
 
void setQe (const Quaternion &qe)
 
DualQuaternion operator+ (const DualQuaternion &other) const
 Operators.
 
DualQuaternion operator* (Scalar scalar) const
 
DualQuaternionoperator+= (const DualQuaternion &other)
 
DualQuaternionoperator*= (Scalar scalar)
 
void setFromTransform (const Transform &t)
 Other methods.
 
Transform getTransform () const
 Return the corresponding rigid transform. Assume a unit dual quaternion.
 
void normalize ()
 
Vector3 transform (const Vector3 &p) const
 
Vector3 rotate (const Vector3 &p) const
 Apply only the rotational part of the dual quaternion to the given vector.
 
Vector3 translate (const Vector3 &p) const
 Apply only the translational part of the dual quaternion to the given vector.
 

Detailed Description

Dual quaternions are based on the dual-numbers algebra, somewhat analogous to complex numbers, but with the imaginary unit e defined such as e*e = 0 ; and using quaternions as the non-dual and dual part. Unit dual quaternions can represent any rigid transformation (rotation + translation). A good reference. http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/other/dualQuaternion/index.htm

Definition at line 18 of file DualQuaternion.hpp.

Constructor & Destructor Documentation

◆ DualQuaternion() [1/3]

Ra::Core::DualQuaternion::DualQuaternion ( )
inline

Construct an uninitialized dual quaternion.

Definition at line 23 of file DualQuaternion.hpp.

◆ DualQuaternion() [2/3]

Ra::Core::DualQuaternion::DualQuaternion ( const Quaternion & q0,
const Quaternion & qe )
inline

Construct a dual-quaternion from two quaternions.

Definition at line 26 of file DualQuaternion.hpp.

◆ DualQuaternion() [3/3]

Ra::Core::DualQuaternion::DualQuaternion ( const Core::Transform & tr)
inlineexplicit

Construct a dual-quaternion from a rigid transform Any non-rigid component (e.g. scale and shear) will be ignored.

Definition at line 143 of file DualQuaternion.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ getQ0()

const Quaternion & Ra::Core::DualQuaternion::getQ0 ( ) const
inline

Getters and setters.

Definition at line 84 of file DualQuaternion.hpp.

◆ getQe()

const Quaternion & Ra::Core::DualQuaternion::getQe ( ) const
inline

Definition at line 92 of file DualQuaternion.hpp.

◆ getTransform()

Transform Ra::Core::DualQuaternion::getTransform ( ) const
inline

Return the corresponding rigid transform. Assume a unit dual quaternion.

Definition at line 147 of file DualQuaternion.hpp.

+ Here is the call graph for this function:

◆ normalize()

void Ra::Core::DualQuaternion::normalize ( )
inline

Normalize the quaternion with the dual-number norm (divides q0 and qe by q0's norm). Will assert if the norm is zero in debug builds.

Definition at line 118 of file DualQuaternion.hpp.

◆ operator*()

DualQuaternion Ra::Core::DualQuaternion::operator* ( Scalar scalar) const
inline

Definition at line 104 of file DualQuaternion.hpp.

◆ operator*=()

DualQuaternion & Ra::Core::DualQuaternion::operator*= ( Scalar scalar)
inline

Definition at line 113 of file DualQuaternion.hpp.

◆ operator+()

DualQuaternion Ra::Core::DualQuaternion::operator+ ( const DualQuaternion & other) const
inline

Operators.

Definition at line 100 of file DualQuaternion.hpp.

+ Here is the call graph for this function:

◆ operator+=()

DualQuaternion & Ra::Core::DualQuaternion::operator+= ( const DualQuaternion & other)
inline

Definition at line 108 of file DualQuaternion.hpp.

◆ rotate()

Vector3 Ra::Core::DualQuaternion::rotate ( const Vector3 & p) const
inline

Apply only the rotational part of the dual quaternion to the given vector.

Definition at line 131 of file DualQuaternion.hpp.

+ Here is the call graph for this function:

◆ setFromTransform()

void Ra::Core::DualQuaternion::setFromTransform ( const Transform & t)
inline

Other methods.

Set the dual-quaternion from a rigid transform. Any non-rigid component (e.g. scale and shear) will be ignored.

Definition at line 158 of file DualQuaternion.hpp.

◆ setQ0()

void Ra::Core::DualQuaternion::setQ0 ( const Quaternion & q0)
inline

Definition at line 88 of file DualQuaternion.hpp.

◆ setQe()

void Ra::Core::DualQuaternion::setQe ( const Quaternion & qe)
inline

Definition at line 96 of file DualQuaternion.hpp.

◆ transform()

Vector3 Ra::Core::DualQuaternion::transform ( const Vector3 & p) const
inline

Apply the transform represented by the dual quaternion to given vector. equivalent to translate( rotate (p)).

Definition at line 125 of file DualQuaternion.hpp.

+ Here is the call graph for this function:

◆ translate()

Vector3 Ra::Core::DualQuaternion::translate ( const Vector3 & p) const
inline

Apply only the translational part of the dual quaternion to the given vector.

Definition at line 137 of file DualQuaternion.hpp.


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