#include <Core/Math/DualQuaternion.hpp>
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.
◆ DualQuaternion() [1/3]
Ra::Core::DualQuaternion::DualQuaternion |
( |
| ) |
|
|
inline |
◆ DualQuaternion() [2/3]
Ra::Core::DualQuaternion::DualQuaternion |
( |
const Quaternion & | q0, |
|
|
const Quaternion & | qe ) |
|
inline |
◆ 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.
◆ getQ0()
const Quaternion & Ra::Core::DualQuaternion::getQ0 |
( |
| ) |
const |
|
inline |
◆ getQe()
const Quaternion & Ra::Core::DualQuaternion::getQe |
( |
| ) |
const |
|
inline |
◆ 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.
◆ 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 |
◆ operator*=()
DualQuaternion & Ra::Core::DualQuaternion::operator*= |
( |
Scalar | scalar | ) |
|
|
inline |
◆ operator+()
◆ operator+=()
◆ 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.
◆ 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 |
◆ setQe()
void Ra::Core::DualQuaternion::setQe |
( |
const Quaternion & | qe | ) |
|
|
inline |
◆ 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.
◆ 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:
- /home/runner/work/Radium-Engine/Radium-Engine/src/Radium-Engine/src/Core/Math/DualQuaternion.hpp