28 #ifndef PXR_BASE_GF_DUALQUATH_H
29 #define PXR_BASE_GF_DUALQUATH_H
88 : _real( real ), _dual( 0 ) {
93 : _real( real ), _dual( dual ) {
143 std::pair<GfHalf, GfHalf>
GetLength()
const;
189 return ! (*
this == dq);
219 return (*
this) *= 1.0 /
s;
284 #endif // PXR_BASE_GF_DUALQUATH_H
GF_API GfDualQuath & operator*=(const GfDualQuath &dq)
Post-multiplies dual quaternion dq into this dual quaternion.
const GfQuath & GetReal() const
Returns the real part of the dual quaternion.
friend size_t hash_value(const GfDualQuath &dq)
Hash.
GF_API std::pair< GfHalf, GfHalf > Normalize(GfHalf eps=GF_MIN_VECTOR_LENGTH)
GfDualQuath(const GfQuath &real)
friend GfDualQuath operator+(const GfDualQuath &dq1, const GfDualQuath &dq2)
Component-wise binary sum operator.
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
void SetDual(const GfQuath &dual)
Sets the dual part of the dual quaternion.
GfDualQuath(const GfQuath &real, const GfQuath &dual)
This constructor initializes the real and dual parts.
bool operator==(const GfDualQuath &dq) const
GF_API GfVec3h Transform(const GfVec3h &vec) const
Transforms the row vector vec by the dual quaternion.
GfHalf GfDot(const GfDualQuath &dq1, const GfDualQuath &dq2)
Return the dot (inner) product of two dual quaternions.
GF_API GfVec3h GetTranslation() const
Get the translation component of this dual quaternion.
static GfQuath GetIdentity()
GfDualQuath(const GfQuath &rotation, const GfVec3h &translation)
This constructor initializes from a rotation and a translation components.
GF_API GfDualQuath GetConjugate() const
Returns the conjugate of this dual quaternion.
const GfQuath & GetDual() const
Returns the dual part of the dual quaternion.
GF_API GfDualQuath GetNormalized(GfHalf eps=GF_MIN_VECTOR_LENGTH) const
friend GfDualQuath operator/(const GfDualQuath &dq, GfHalf s)
Returns the product of dual quaternion dq and scalar 1 / s.
SIM_API const UT_StringHolder rotation
friend GfDualQuath operator-(const GfDualQuath &dq1, const GfDualQuath &dq2)
Component-wise binary difference operator.
void SetReal(const GfQuath &real)
Sets the real part of the dual quaternion.
GF_API GfDualQuath GetInverse() const
Returns the inverse of this dual quaternion.
GfDualQuath()
The default constructor leaves the dual quaternion undefined.
GF_API void SetTranslation(const GfVec3h &translation)
Set the translation component of this dual quaternion.
static size_t Combine(Args &&...args)
Produce a hash code by combining the hash codes of several objects.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
GfDualQuath & operator+=(const GfDualQuath &dq)
Component-wise unary sum operator.
GF_API std::pair< GfHalf, GfHalf > GetLength() const
Returns geometric length of this dual quaternion.
friend GfDualQuath operator*(const GfDualQuath &dq1, const GfDualQuath &dq2)
Returns the product of dual quaternions dq1 and dq2.
GF_API std::ostream & operator<<(std::ostream &out, const GfDualQuath &dq)
#define PXR_NAMESPACE_CLOSE_SCOPE
static GfDualQuath GetZero()
bool operator!=(const GfDualQuath &dq) const
GfDualQuath & operator/=(GfHalf s)
Scales this dual quaternion by 1 / s.
GfDualQuath(GfHalf realVal)
GfDualQuath & operator-=(const GfDualQuath &dq)
Component-wise unary difference operator.
#define GF_MIN_VECTOR_LENGTH
static GfDualQuath GetIdentity()