HDK
|
#include <dualQuatf.h>
Public Types | |
typedef float | ScalarType |
Public Member Functions | |
GfDualQuatf () | |
The default constructor leaves the dual quaternion undefined. More... | |
GfDualQuatf (float realVal) | |
GfDualQuatf (const GfQuatf &real) | |
GfDualQuatf (const GfQuatf &real, const GfQuatf &dual) | |
This constructor initializes the real and dual parts. More... | |
GfDualQuatf (const GfQuatf &rotation, const GfVec3f &translation) | |
This constructor initializes from a rotation and a translation components. More... | |
GF_API | GfDualQuatf (const GfDualQuatd &other) |
Construct from GfDualQuatd. More... | |
GF_API | GfDualQuatf (const GfDualQuath &other) |
Implicitly convert from GfDualQuath. More... | |
void | SetReal (const GfQuatf &real) |
Sets the real part of the dual quaternion. More... | |
void | SetDual (const GfQuatf &dual) |
Sets the dual part of the dual quaternion. More... | |
const GfQuatf & | GetReal () const |
Returns the real part of the dual quaternion. More... | |
const GfQuatf & | GetDual () const |
Returns the dual part of the dual quaternion. More... | |
GF_API std::pair< float, float > | GetLength () const |
Returns geometric length of this dual quaternion. More... | |
GF_API GfDualQuatf | GetNormalized (float eps=GF_MIN_VECTOR_LENGTH) const |
GF_API std::pair< float, float > | Normalize (float eps=GF_MIN_VECTOR_LENGTH) |
GF_API GfDualQuatf | GetConjugate () const |
Returns the conjugate of this dual quaternion. More... | |
GF_API GfDualQuatf | GetInverse () const |
Returns the inverse of this dual quaternion. More... | |
GF_API void | SetTranslation (const GfVec3f &translation) |
Set the translation component of this dual quaternion. More... | |
GF_API GfVec3f | GetTranslation () const |
Get the translation component of this dual quaternion. More... | |
bool | operator== (const GfDualQuatf &dq) const |
bool | operator!= (const GfDualQuatf &dq) const |
GfDualQuatf & | operator+= (const GfDualQuatf &dq) |
Component-wise unary sum operator. More... | |
GfDualQuatf & | operator-= (const GfDualQuatf &dq) |
Component-wise unary difference operator. More... | |
GF_API GfDualQuatf & | operator*= (const GfDualQuatf &dq) |
Post-multiplies dual quaternion dq into this dual quaternion. More... | |
GfDualQuatf & | operator*= (float s) |
Scales this dual quaternion by s . More... | |
GfDualQuatf & | operator/= (float s) |
Scales this dual quaternion by 1 / s . More... | |
GF_API GfVec3f | Transform (const GfVec3f &vec) const |
Transforms the row vector vec by the dual quaternion. More... | |
Static Public Member Functions | |
static GfDualQuatf | GetZero () |
static GfDualQuatf | GetIdentity () |
Friends | |
size_t | hash_value (const GfDualQuatf &dq) |
Hash. More... | |
GfDualQuatf | operator+ (const GfDualQuatf &dq1, const GfDualQuatf &dq2) |
Component-wise binary sum operator. More... | |
GfDualQuatf | operator- (const GfDualQuatf &dq1, const GfDualQuatf &dq2) |
Component-wise binary difference operator. More... | |
GfDualQuatf | operator* (const GfDualQuatf &dq1, const GfDualQuatf &dq2) |
Returns the product of dual quaternions dq1 and dq2 . More... | |
GfDualQuatf | operator* (const GfDualQuatf &dq, float s) |
Returns the product of dual quaternion dq and scalar s . More... | |
GfDualQuatf | operator* (float s, const GfDualQuatf &dq) |
Returns the product of dual quaternion dq and scalar s . More... | |
GfDualQuatf | operator/ (const GfDualQuatf &dq, float s) |
Returns the product of dual quaternion dq and scalar 1 / s . More... | |
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 http://web.cs.iastate.edu/~cs577/handouts/dual-quaternion.pdf
Definition at line 66 of file dualQuatf.h.
typedef float GfDualQuatf::ScalarType |
Definition at line 69 of file dualQuatf.h.
|
inline |
The default constructor leaves the dual quaternion undefined.
Definition at line 72 of file dualQuatf.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 81 of file dualQuatf.h.
|
inlineexplicit |
Initialize the real part to real
quaternion and the imaginary part to zero quaternion.
Definition at line 86 of file dualQuatf.h.
This constructor initializes the real and dual parts.
Definition at line 91 of file dualQuatf.h.
This constructor initializes from a rotation and a translation components.
Definition at line 96 of file dualQuatf.h.
|
explicit |
Construct from GfDualQuatd.
GF_API GfDualQuatf::GfDualQuatf | ( | const GfDualQuath & | other | ) |
Implicitly convert from GfDualQuath.
GF_API GfDualQuatf GfDualQuatf::GetConjugate | ( | ) | const |
Returns the conjugate of this dual quaternion.
|
inline |
Returns the dual part of the dual quaternion.
Definition at line 124 of file dualQuatf.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 136 of file dualQuatf.h.
GF_API GfDualQuatf GfDualQuatf::GetInverse | ( | ) | const |
Returns the inverse of this dual quaternion.
Returns geometric length of this dual quaternion.
GF_API GfDualQuatf GfDualQuatf::GetNormalized | ( | float | 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 119 of file dualQuatf.h.
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 130 of file dualQuatf.h.
GF_API std::pair<float, float> GfDualQuatf::Normalize | ( | float | 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 187 of file dualQuatf.h.
GF_API GfDualQuatf& GfDualQuatf::operator*= | ( | const GfDualQuatf & | dq | ) |
Post-multiplies dual quaternion dq
into this dual quaternion.
|
inline |
Scales this dual quaternion by s
.
Definition at line 210 of file dualQuatf.h.
|
inline |
Component-wise unary sum operator.
Definition at line 192 of file dualQuatf.h.
|
inline |
Component-wise unary difference operator.
Definition at line 199 of file dualQuatf.h.
|
inline |
Scales this dual quaternion by 1 / s
.
Definition at line 217 of file dualQuatf.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 180 of file dualQuatf.h.
Sets the dual part of the dual quaternion.
Definition at line 114 of file dualQuatf.h.
Sets the real part of the dual quaternion.
Definition at line 109 of file dualQuatf.h.
Set the translation component of this dual quaternion.
Transforms the row vector vec by the dual quaternion.
|
friend |
Hash.
Definition at line 174 of file dualQuatf.h.
|
friend |
Returns the product of dual quaternions dq1
and dq2
.
Definition at line 236 of file dualQuatf.h.
|
friend |
Returns the product of dual quaternion dq
and scalar s
.
Definition at line 243 of file dualQuatf.h.
|
friend |
Returns the product of dual quaternion dq
and scalar s
.
Definition at line 249 of file dualQuatf.h.
|
friend |
Component-wise binary sum operator.
Definition at line 222 of file dualQuatf.h.
|
friend |
Component-wise binary difference operator.
Definition at line 229 of file dualQuatf.h.
|
friend |
Returns the product of dual quaternion dq
and scalar 1 / s
.
Definition at line 255 of file dualQuatf.h.