![]() |
Radium Engine
1.5.0
|
#include <Core/Math/DualQuaternion.hpp>
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. | |
DualQuaternion & | operator= (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 |
DualQuaternion & | operator+= (const DualQuaternion &other) |
DualQuaternion & | operator*= (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. | |
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.
|
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.
|
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.
|
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.
|
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.