Loading [MathJax]/extensions/TeX/AMSmath.js
Radium Engine  1.5.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Ra::Core::DualQuaternion Class Reference

#include <Core/Math/DualQuaternion.hpp>

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

Public Member Functions

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

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 145 of file DualQuaternion.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ 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 120 of file DualQuaternion.hpp.

◆ 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 160 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 127 of file DualQuaternion.hpp.

+ Here is the call graph for this function:

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