28 #ifndef PXR_BASE_GF_QUATH_H
29 #define PXR_BASE_GF_QUATH_H
80 : _imaginary(i, j, k), _real(real)
86 : _imaginary(imaginary), _real(real)
116 _imaginary = imaginary;
121 _imaginary.
Set(i, j, k);
184 return !(*
this ==
q);
208 _imaginary += q._imaginary;
215 _imaginary -= q._imaginary;
264 _GetLengthSquared()
const {
265 return GfDot(*
this, *
this);
291 #endif // PXR_BASE_GF_QUATH_H
void SetImaginary(GfHalf i, GfHalf j, GfHalf k)
Set the imaginary coefficients.
friend GfQuath operator+(const GfQuath &q1, const GfQuath &q2)
Component-wise binary sum operator.
GfHalf GetLength() const
Return geometric length of this 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
bool operator!=(const GfQuath &q) const
GfQuath(GfHalf real, GfHalf i, GfHalf j, GfHalf k)
Initialize the real and imaginary coefficients.
void SetImaginary(const GfVec3h &imaginary)
Set the imaginary coefficients.
GF_API std::ostream & operator<<(std::ostream &, GfQuath const &)
friend GfQuath operator*(const GfQuath &q1, const GfQuath &q2)
Returns the product of quaternions q1 and q2.
GfQuath & operator/=(GfHalf s)
Divide this quaternion's coefficients by s.
GLdouble GLdouble GLdouble q
static GfQuath GetIdentity()
bool operator==(const GfQuath &q) const
GfQuath()
Default constructor leaves the quaternion undefined.
GfQuath & operator-=(const GfQuath &q)
Component-wise unary difference operator.
GfHalf GetReal() const
Return the real coefficient.
GfQuath(GfHalf real, const GfVec3h &imaginary)
Initialize the real and imaginary coefficients.
const GfVec3h & GetImaginary() const
Return the imaginary coefficient.
friend size_t hash_value(const GfQuath &q)
Hash.
friend GfQuath operator/(const GfQuath &q, GfHalf s)
Returns the product of quaternion q and scalar 1 / s.
GfQuath GetConjugate() const
GF_API GfVec3h Transform(const GfVec3h &point) const
GLfloat GLfloat GLfloat alpha
GfQuath GetInverse() const
GF_API GfHalf Normalize(GfHalf eps=GF_MIN_VECTOR_LENGTH)
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
GfQuath operator-() const
Component-wise negation.
GfHalf GfDot(const GfQuath &q1, const GfQuath &q2)
Return the dot (inner) product of two quaternions.
GF_API GfQuath GfSlerp(double alpha, const GfQuath &q0, const GfQuath &q1)
void SetReal(GfHalf real)
Set the real coefficient.
#define PXR_NAMESPACE_CLOSE_SCOPE
GfQuath GetNormalized(GfHalf eps=GF_MIN_VECTOR_LENGTH) const
GF_API GfQuath & operator*=(const GfQuath &q)
Post-multiply quaternion q into this quaternion.
GfVec3h & Set(GfHalf s0, GfHalf s1, GfHalf s2)
Set all elements with passed arguments.
#define GF_MIN_VECTOR_LENGTH
GfQuath & operator+=(const GfQuath &q)
Add quaternion q to this quaternion.