HDK
|
#include <UT_DualQuaternion.h>
Public Member Functions | |
SYS_FORCE_INLINE | UT_DualQuaternionT ()=default |
Trivial constructor. If called, it initializes to all zeroes. More... | |
UT_DualQuaternionT (const UT_QuaternionT< T > &real, const UT_QuaternionT< T > &dual) | |
Construct from orthogonal real and dual parts. More... | |
UT_DualQuaternionT (T real_qx, T real_qy, T real_qz, T real_qw, T dual_qx, T dual_qy, T dual_qz, T dual_qw) | |
Construct from components of orthogonal real and dual parts. More... | |
UT_DualQuaternionT (const UT_QuaternionT< T > &r, const UT_Vector3T< T > &t) | |
Construct from rotation unit quaternion and translation vector. More... | |
UT_DualQuaternionT (const UT_Matrix4T< T > &xform) | |
Construct from a transform matrix. More... | |
SYS_FORCE_INLINE | UT_DualQuaternionT (const UT_DualQuaternionT &dq)=default |
Default copy constructor. More... | |
SYS_FORCE_INLINE UT_DualQuaternionT< T > & | operator= (const UT_DualQuaternionT &v)=default |
Default assignment. More... | |
void | updateFromXform (const UT_Matrix4T< T > &xform) |
Assign from UT_Matrix4. More... | |
void | updateFromXform (const UT_Matrix3T< T > &xform) |
Assign from UT_Matrix3. More... | |
void | updateFromRotTransPair (const UT_QuaternionT< T > &r, const UT_Vector3T< T > &t) |
void | updateFromRotTransPair (const UT_QuaternionT< T > &r, T tx, T ty, T tz) |
T | length2 () const |
Methods. More... | |
T | length () const |
Length. More... | |
void | normalize () |
Normalizes the dual quaternion to have length of 1. More... | |
void | conjugate () |
Changes dual quaternion into its conjugate. More... | |
void | invert () |
Invert this dual quaternion. Does not exist if getReal() is zero. More... | |
void | invertNormalized () |
void | identity () |
Change dual quaternion into an 0 rotation and 0 translation components. More... | |
void | transform (const UT_Vector3T< T > &vec, UT_Vector3T< T > &dst) const |
Method implementations. More... | |
void | rotate (const UT_Vector3T< T > &vec, UT_Vector3T< T > &dst) const |
UT_Matrix4T< T > | convertToXform () const |
UT_DualQuaternionT< T > & | operator*= (T scalar) |
Operators. More... | |
UT_DualQuaternionT< T > & | operator*= (const UT_DualQuaternionT< T > &dq) |
UT_DualQuaternionT< T > & | operator+= (const UT_DualQuaternionT< T > &dq) |
Operator implementations. More... | |
UT_DualQuaternionT< T > & | operator-= (const UT_DualQuaternionT< T > &dq) |
bool | operator== (const UT_DualQuaternionT< T > &dq) const |
bool | operator!= (const UT_DualQuaternionT< T > &dq) const |
bool | isEqual (const UT_DualQuaternionT< T > &quat, T tol=T(SYS_FTOLERANCE)) const |
Like operator==() but using a tolerance. More... | |
const T * | realData () const |
Getters. More... | |
T * | realData () |
const T * | dualData () const |
T * | dualData () |
const UT_QuaternionT< T > & | getReal () const |
const UT_QuaternionT< T > & | getDual () const |
const UT_QuaternionT< T > & | getTranslation () const |
const UT_QuaternionT< T > & | getRotation () const |
Protected Member Functions | |
UT_API void | outTo (std::ostream &os) const |
template<> | |
UT_API void | outTo (std::ostream &os) const |
template<> | |
UT_API void | outTo (std::ostream &os) const |
Friends | |
std::ostream & | operator<< (std::ostream &os, const UT_DualQuaternionT< T > &dq) |
Dual quaternion class
Definition at line 39 of file UT_DualQuaternion.h.
|
default |
Trivial constructor. If called, it initializes to all zeroes.
|
inline |
Construct from orthogonal real and dual parts.
Construct implementations.
Definition at line 195 of file UT_DualQuaternion.h.
|
inline |
Construct from components of orthogonal real and dual parts.
Definition at line 204 of file UT_DualQuaternion.h.
|
inline |
Construct from rotation unit quaternion and translation vector.
Definition at line 214 of file UT_DualQuaternion.h.
|
inline |
Construct from a transform matrix.
Definition at line 223 of file UT_DualQuaternion.h.
|
default |
Default copy constructor.
|
inline |
Changes dual quaternion into its conjugate.
Definition at line 368 of file UT_DualQuaternion.h.
|
inline |
Returns a xform that is represented by the dual quaternion Requires this is normalized
Definition at line 303 of file UT_DualQuaternion.h.
|
inline |
Definition at line 152 of file UT_DualQuaternion.h.
|
inline |
Definition at line 153 of file UT_DualQuaternion.h.
|
inline |
Definition at line 156 of file UT_DualQuaternion.h.
|
inline |
Definition at line 155 of file UT_DualQuaternion.h.
|
inline |
Definition at line 158 of file UT_DualQuaternion.h.
|
inline |
Definition at line 157 of file UT_DualQuaternion.h.
|
inline |
Change dual quaternion into an 0 rotation and 0 translation components.
Definition at line 396 of file UT_DualQuaternion.h.
|
inline |
Invert this dual quaternion. Does not exist if getReal() is zero.
Definition at line 376 of file UT_DualQuaternion.h.
|
inline |
Invert this dual quaternion, assuming that its already normalized. Does not exist if getReal() is zero.
Definition at line 386 of file UT_DualQuaternion.h.
|
inline |
Like operator==() but using a tolerance.
Definition at line 453 of file UT_DualQuaternion.h.
|
inline |
Length.
Definition at line 339 of file UT_DualQuaternion.h.
|
inline |
|
inline |
Normalizes the dual quaternion to have length of 1.
Definition at line 346 of file UT_DualQuaternion.h.
|
inline |
Definition at line 467 of file UT_DualQuaternion.h.
|
inline |
Operators.
Definition at line 418 of file UT_DualQuaternion.h.
|
inline |
Definition at line 427 of file UT_DualQuaternion.h.
|
inline |
Operator implementations.
Definition at line 409 of file UT_DualQuaternion.h.
|
inline |
Definition at line 436 of file UT_DualQuaternion.h.
|
default |
Default assignment.
|
inline |
Definition at line 445 of file UT_DualQuaternion.h.
|
protected |
|
protected |
|
protected |
|
inline |
Getters.
Definition at line 149 of file UT_DualQuaternion.h.
|
inline |
Definition at line 150 of file UT_DualQuaternion.h.
|
inline |
Returns a vector that has only the rotation component applied Requires this is normalized
Definition at line 293 of file UT_DualQuaternion.h.
|
inline |
Method implementations.
Returns a vector that is transformed by the dual quaternion Requires this is normalized
Definition at line 273 of file UT_DualQuaternion.h.
|
inline |
Definition at line 323 of file UT_DualQuaternion.h.
|
inline |
Definition at line 252 of file UT_DualQuaternion.h.
|
inline |
Assign from UT_Matrix4.
Definition at line 230 of file UT_DualQuaternion.h.
|
inline |
Assign from UT_Matrix3.
Definition at line 244 of file UT_DualQuaternion.h.
|
friend |
Definition at line 139 of file UT_DualQuaternion.h.