28 #ifndef PXR_BASE_GF_DUALQUATD_H
29 #define PXR_BASE_GF_DUALQUATD_H
81 explicit GfDualQuatd(
double realVal ) : _real( realVal ), _dual( 0 ) {}
87 : _real( real ), _dual( 0 ) {
92 : _real( real ), _dual( dual ) {
142 std::pair<double, double>
GetLength()
const;
188 return ! (*
this == dq);
218 return (*
this) *= 1.0 /
s;
283 #endif // PXR_BASE_GF_DUALQUATD_H
GF_API std::pair< double, double > Normalize(double eps=GF_MIN_VECTOR_LENGTH)
friend size_t hash_value(const GfDualQuatd &dq)
Hash.
GfDualQuatd & operator/=(double s)
Scales this dual quaternion by 1 / s.
friend GfDualQuatd operator/(const GfDualQuatd &dq, double s)
Returns the product of dual quaternion dq and scalar 1 / s.
GF_API GfDualQuatd & operator*=(const GfDualQuatd &dq)
Post-multiplies dual quaternion dq into this dual quaternion.
GF_API void SetTranslation(const GfVec3d &translation)
Set the translation component of this dual quaternion.
GF_API GfDualQuatd GetInverse() const
Returns the inverse of this dual quaternion.
*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
GF_API GfDualQuatd GetNormalized(double eps=GF_MIN_VECTOR_LENGTH) const
GfDualQuatd(const GfQuatd &real)
GfDualQuatd & operator-=(const GfDualQuatd &dq)
Component-wise unary difference operator.
GfDualQuatd & operator+=(const GfDualQuatd &dq)
Component-wise unary sum operator.
GfDualQuatd()
The default constructor leaves the dual quaternion undefined.
GfDualQuatd(double realVal)
static GfDualQuatd GetIdentity()
friend GfDualQuatd operator+(const GfDualQuatd &dq1, const GfDualQuatd &dq2)
Component-wise binary sum operator.
static GfQuatd GetIdentity()
GF_API GfDualQuatd GetConjugate() const
Returns the conjugate of this dual quaternion.
const GfQuatd & GetDual() const
Returns the dual part of the dual quaternion.
void SetDual(const GfQuatd &dual)
Sets the dual part of the dual quaternion.
static GfDualQuatd GetZero()
SIM_API const UT_StringHolder rotation
void SetReal(const GfQuatd &real)
Sets the real part of the dual quaternion.
const GfQuatd & GetReal() const
Returns the real part of the dual quaternion.
double GfDot(const GfDualQuatd &dq1, const GfDualQuatd &dq2)
Return the dot (inner) product of two dual quaternions.
GF_API std::pair< double, double > GetLength() const
Returns geometric length of this dual quaternion.
GfDualQuatd(const GfQuatd &rotation, const GfVec3d &translation)
This constructor initializes from a rotation and a translation components.
friend GfDualQuatd operator-(const GfDualQuatd &dq1, const GfDualQuatd &dq2)
Component-wise binary difference operator.
GF_API std::ostream & operator<<(std::ostream &out, const GfDualQuatd &dq)
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
bool operator!=(const GfDualQuatd &dq) const
friend GfDualQuatd operator*(const GfDualQuatd &dq1, const GfDualQuatd &dq2)
Returns the product of dual quaternions dq1 and dq2.
GF_API GfVec3d Transform(const GfVec3d &vec) const
Transforms the row vector vec by the dual quaternion.
#define PXR_NAMESPACE_CLOSE_SCOPE
GF_API GfVec3d GetTranslation() const
Get the translation component of this dual quaternion.
bool operator==(const GfDualQuatd &dq) const
#define GF_MIN_VECTOR_LENGTH
GfDualQuatd(const GfQuatd &real, const GfQuatd &dual)
This constructor initializes the real and dual parts.