|
Basic type: a real part quaternion and a dual part quaternion. More...
#include <dualQuath.h>
Public Types | |
typedef GfHalf | ScalarType |
Public Member Functions | |
GfDualQuath () | |
The default constructor leaves the dual quaternion undefined. | |
GfDualQuath (GfHalf realVal) | |
Initialize the real part to realVal and the imaginary part to zero quaternion. | |
GfDualQuath (const GfQuath &real) | |
Initialize the real part to real quaternion and the imaginary part to zero quaternion. | |
GfDualQuath (const GfQuath &real, const GfQuath &dual) | |
This constructor initializes the real and dual parts. | |
GfDualQuath (const GfQuath &rotation, const GfVec3h &translation) | |
This constructor initializes from a rotation and a translation components. | |
GF_API | GfDualQuath (const GfDualQuatd &other) |
Construct from GfDualQuatd. | |
GF_API | GfDualQuath (const GfDualQuatf &other) |
Construct from GfDualQuatf. | |
void | SetReal (const GfQuath &real) |
Sets the real part of the dual quaternion. | |
void | SetDual (const GfQuath &dual) |
Sets the dual part of the dual quaternion. | |
const GfQuath & | GetReal () const |
Returns the real part of the dual quaternion. | |
const GfQuath & | GetDual () const |
Returns the dual part of the dual quaternion. | |
GF_API std::pair< GfHalf, GfHalf > | GetLength () const |
Returns geometric length of this dual quaternion. | |
GF_API GfDualQuath | GetNormalized (GfHalf eps=GF_MIN_VECTOR_LENGTH) const |
Returns a normalized (unit-length) version of this dual quaternion. | |
GF_API std::pair< GfHalf, GfHalf > | Normalize (GfHalf eps=GF_MIN_VECTOR_LENGTH) |
Normalizes this dual quaternion in place. | |
GF_API GfDualQuath | GetConjugate () const |
Returns the conjugate of this dual quaternion. | |
GF_API GfDualQuath | GetInverse () const |
Returns the inverse of this dual quaternion. | |
GF_API void | SetTranslation (const GfVec3h &translation) |
Set the translation component of this dual quaternion. | |
GF_API GfVec3h | GetTranslation () const |
Get the translation component of this dual quaternion. | |
bool | operator== (const GfDualQuath &dq) const |
Component-wise dual quaternion equality test. | |
bool | operator!= (const GfDualQuath &dq) const |
Component-wise dual quaternion inequality test. | |
GfDualQuath & | operator+= (const GfDualQuath &dq) |
Component-wise unary sum operator. | |
GfDualQuath & | operator-= (const GfDualQuath &dq) |
Component-wise unary difference operator. | |
GF_API GfDualQuath & | operator*= (const GfDualQuath &dq) |
Post-multiplies dual quaternion dq into this dual quaternion. | |
GfDualQuath & | operator*= (GfHalf s) |
Scales this dual quaternion by s . | |
GfDualQuath & | operator/= (GfHalf s) |
Scales this dual quaternion by 1 / s . | |
GF_API GfVec3h | Transform (const GfVec3h &vec) const |
Transforms the row vector vec by the dual quaternion. | |
Static Public Member Functions | |
static GfDualQuath | GetZero () |
Returns the zero dual quaternion, which has a real part of (0,0,0,0) and a dual part of (0,0,0,0). | |
static GfDualQuath | GetIdentity () |
Returns the identity dual quaternion, which has a real part of (1,0,0,0) and a dual part of (0,0,0,0). | |
Friends | |
size_t | hash_value (const GfDualQuath &dq) |
Hash. | |
GfDualQuath | operator+ (const GfDualQuath &dq1, const GfDualQuath &dq2) |
Component-wise binary sum operator. | |
GfDualQuath | operator- (const GfDualQuath &dq1, const GfDualQuath &dq2) |
Component-wise binary difference operator. | |
GfDualQuath | operator* (const GfDualQuath &dq1, const GfDualQuath &dq2) |
Returns the product of dual quaternions dq1 and dq2 . | |
GfDualQuath | operator* (const GfDualQuath &dq, GfHalf s) |
Returns the product of dual quaternion dq and scalar s . | |
GfDualQuath | operator* (GfHalf s, const GfDualQuath &dq) |
Returns the product of dual quaternion dq and scalar s . | |
GfDualQuath | operator/ (const GfDualQuath &dq, GfHalf s) |
Returns the product of dual quaternion dq and scalar 1 / s . | |
Basic type: a real part quaternion and a dual part quaternion.
This class represents a generalized dual quaternion that has a real part and a dual part quaternions. Dual quaternions are used to represent a combination of rotation and translation.
References: https://www.cs.utah.edu/~ladislav/kavan06dual/kavan06dual.pdf https://faculty.sites.iastate.edu/jia/files/inline-files/dual-quaternion.pdf
Definition at line 50 of file dualQuath.h.
typedef GfHalf ScalarType |
Definition at line 53 of file dualQuath.h.
|
inline |
The default constructor leaves the dual quaternion undefined.
Definition at line 56 of file dualQuath.h.
|
inlineexplicit |
Initialize the real part to realVal
and the imaginary part to zero quaternion.
Since quaternions typically must be normalized, reasonable values for realVal
are -1, 0, or 1. Other values are legal but are likely to be meaningless.
Definition at line 65 of file dualQuath.h.
|
inlineexplicit |
Initialize the real part to real
quaternion and the imaginary part to zero quaternion.
Definition at line 70 of file dualQuath.h.
|
inline |
This constructor initializes the real and dual parts.
Definition at line 75 of file dualQuath.h.
|
inline |
This constructor initializes from a rotation and a translation components.
Definition at line 80 of file dualQuath.h.
|
explicit |
Construct from GfDualQuatd.
|
explicit |
Construct from GfDualQuatf.
GF_API GfDualQuath GetConjugate | ( | ) | const |
Returns the conjugate of this dual quaternion.
|
inline |
Returns the dual part of the dual quaternion.
Definition at line 108 of file dualQuath.h.
|
inlinestatic |
Returns the identity dual quaternion, which has a real part of (1,0,0,0) and a dual part of (0,0,0,0).
Definition at line 120 of file dualQuath.h.
GF_API GfDualQuath GetInverse | ( | ) | const |
Returns the inverse of this dual quaternion.
Returns geometric length of this dual quaternion.
GF_API GfDualQuath GetNormalized | ( | GfHalf | eps = GF_MIN_VECTOR_LENGTH | ) | const |
Returns a normalized (unit-length) version of this dual quaternion.
If the length of this dual quaternion is smaller than eps
, this returns the identity dual quaternion.
|
inline |
Returns the real part of the dual quaternion.
Definition at line 103 of file dualQuath.h.
GF_API GfVec3h GetTranslation | ( | ) | const |
Get the translation component of this dual quaternion.
|
inlinestatic |
Returns the zero dual quaternion, which has a real part of (0,0,0,0) and a dual part of (0,0,0,0).
Definition at line 114 of file dualQuath.h.
GF_API std::pair< GfHalf, GfHalf > Normalize | ( | GfHalf | eps = GF_MIN_VECTOR_LENGTH | ) |
Normalizes this dual quaternion in place.
Normalizes this dual quaternion in place to unit length, returning the length before normalization. If the length of this dual quaternion is smaller than eps
, this sets the dual quaternion to identity.
|
inline |
Component-wise dual quaternion inequality test.
The real and dual parts must match exactly for dual quaternions to be considered equal.
Definition at line 171 of file dualQuath.h.
GF_API GfDualQuath & operator*= | ( | const GfDualQuath & | dq | ) |
Post-multiplies dual quaternion dq
into this dual quaternion.
|
inline |
Scales this dual quaternion by s
.
Definition at line 194 of file dualQuath.h.
|
inline |
Component-wise unary sum operator.
Definition at line 176 of file dualQuath.h.
|
inline |
Component-wise unary difference operator.
Definition at line 183 of file dualQuath.h.
|
inline |
Scales this dual quaternion by 1 / s
.
Definition at line 201 of file dualQuath.h.
|
inline |
Component-wise dual quaternion equality test.
The real and dual parts must match exactly for dual quaternions to be considered equal.
Definition at line 164 of file dualQuath.h.
|
inline |
Sets the dual part of the dual quaternion.
Definition at line 98 of file dualQuath.h.
|
inline |
Sets the real part of the dual quaternion.
Definition at line 93 of file dualQuath.h.
GF_API void SetTranslation | ( | const GfVec3h & | translation | ) |
Set the translation component of this dual quaternion.
Transforms the row vector vec by the dual quaternion.
|
friend |
Hash.
Definition at line 158 of file dualQuath.h.
|
friend |
Returns the product of dual quaternion dq
and scalar s
.
Definition at line 227 of file dualQuath.h.
|
friend |
Returns the product of dual quaternions dq1
and dq2
.
Definition at line 220 of file dualQuath.h.
|
friend |
Returns the product of dual quaternion dq
and scalar s
.
Definition at line 233 of file dualQuath.h.
|
friend |
Component-wise binary sum operator.
Definition at line 206 of file dualQuath.h.
|
friend |
Component-wise binary difference operator.
Definition at line 213 of file dualQuath.h.
|
friend |
Returns the product of dual quaternion dq
and scalar 1 / s
.
Definition at line 239 of file dualQuath.h.