HDK
|
Quaternion class. More...
#include <GEO_Detail.h>
Public Types | |
typedef T | value_type |
typedef UT_QuaternionT< T > | ThisType |
Static Public Member Functions | |
static int | entries () |
Static Public Attributes | |
static constexpr int | tuple_size = 4 |
Protected Member Functions | |
void | initialize (T qx=0, T qy=0, T qz=0, T qw=0) |
Friends | |
std::ostream & | operator<< (std::ostream &os, const UT_QuaternionT< T > &v) |
Quaternion class.
Definition at line 48 of file GEO_Detail.h.
typedef UT_QuaternionT<T> UT_QuaternionT< T >::ThisType |
Definition at line 88 of file UT_Quaternion.h.
typedef T UT_QuaternionT< T >::value_type |
Definition at line 55 of file UT_Quaternion.h.
|
inline |
Definition at line 58 of file UT_Quaternion.h.
|
inline |
Definition at line 64 of file UT_Quaternion.h.
|
inline |
Definition at line 69 of file UT_Quaternion.h.
|
inline |
Definition at line 74 of file UT_Quaternion.h.
|
inline |
Definition at line 363 of file UT_Quaternion.h.
|
inline |
Definition at line 82 of file UT_Quaternion.h.
|
default |
|
default |
|
inline |
Definition at line 96 of file UT_Quaternion.h.
Definition at line 159 of file UT_Quaternion.h.
UT_Vector3T<T> UT_QuaternionT< T >::computeAngVel | ( | const UT_QuaternionT< T > & | dest, |
T | time | ||
) | const |
void UT_QuaternionT< T >::computeDerivative | ( | const UT_Vector3T< T > & | omega, |
UT_QuaternionT< T > & | q_prime | ||
) |
UT_Vector3T<T> UT_QuaternionT< T >::computeRotations | ( | const UT_XformOrder & | ) | const |
|
inline |
Definition at line 170 of file UT_Quaternion.h.
|
inline |
Definition at line 324 of file UT_Quaternion.h.
|
inline |
Definition at line 325 of file UT_Quaternion.h.
|
inlinenoexcept |
Definition at line 331 of file UT_Quaternion.h.
|
inlinenoexcept |
Definition at line 327 of file UT_Quaternion.h.
|
inlinestatic |
Definition at line 336 of file UT_Quaternion.h.
UT_QuaternionT<T> UT_QuaternionT< T >::exp | ( | ) | const |
void UT_QuaternionT< T >::getAngleAxis | ( | T & | angle, |
UT_Vector3T< T > & | axis | ||
) | const |
void UT_QuaternionT< T >::getInverseRotationMatrix | ( | UT_Matrix3 & | mat | ) | const |
void UT_QuaternionT< T >::getInverseRotationMatrix | ( | UT_DMatrix3 & | mat | ) | const |
void UT_QuaternionT< T >::getLogMap | ( | UT_Vector3T< T > & | v | ) | const |
void UT_QuaternionT< T >::getRotationMatrix | ( | UT_Matrix3 & | mat | ) | const |
void UT_QuaternionT< T >::getRotationMatrix | ( | UT_DMatrix3 & | mat | ) | const |
void UT_QuaternionT< T >::getTransformMatrix | ( | UT_Matrix4 & | mat | ) | const |
void UT_QuaternionT< T >::getTransformMatrix | ( | UT_DMatrix4 & | mat | ) | const |
|
inline |
Compute a hash.
Definition at line 339 of file UT_Quaternion.h.
|
inline |
Definition at line 165 of file UT_Quaternion.h.
|
inlineprotected |
Definition at line 342 of file UT_Quaternion.h.
void UT_QuaternionT< T >::integrate | ( | const UT_Vector3T< T > & | angvel, |
T | timestep, | ||
bool | accurate = true |
||
) |
UT_QuaternionT<T> UT_QuaternionT< T >::interpolate | ( | const UT_QuaternionT< T > & | target, |
T | t, | ||
T | b = 0.0f |
||
) | const |
Interpolates between this quat (t==0) and the target (t==1)
void UT_QuaternionT< T >::interpolate | ( | const UT_QuaternionT< T > * | q, |
const T * | w, | ||
exint | n, | ||
T | tol = T(1e-6) |
||
) |
Interpolates between the n quaternions in q, with weights w, to within tolerance tol. NOTE: The q's must be normalized, and the weights may need to sum to 1.
|
inline |
Definition at line 204 of file UT_Quaternion.h.
|
inline |
Does a comparison with a tolerance. This also returns true if quat.negated() is equal to us, unlike operator==().
Definition at line 388 of file UT_Quaternion.h.
|
inline |
Definition at line 200 of file UT_Quaternion.h.
|
inline |
Do component-wise lerp between this quat (t=0) and the target (t=1).
Definition at line 141 of file UT_Quaternion.h.
|
inline |
Do component-wise lerp between this src (t=0) and dst (t=1).
Definition at line 149 of file UT_Quaternion.h.
UT_QuaternionT<T> UT_QuaternionT< T >::ln | ( | ) | const |
bool UT_QuaternionT< T >::load | ( | UT_IStream & | is | ) |
bool UT_QuaternionT< T >::load | ( | UT_JSONParser & | p | ) |
Methods to serialize to a JSON stream. The vector is stored as an array of 4 reals.
|
inline |
Definition at line 220 of file UT_Quaternion.h.
void UT_QuaternionT< T >::multAngle | ( | T | s | ) |
|
inline |
Definition at line 176 of file UT_Quaternion.h.
|
inline |
Definition at line 183 of file UT_Quaternion.h.
|
inline |
Definition at line 190 of file UT_Quaternion.h.
|
inline |
Definition at line 381 of file UT_Quaternion.h.
|
inline |
Definition at line 109 of file UT_Quaternion.h.
|
inline |
Definition at line 111 of file UT_Quaternion.h.
|
inline |
Definition at line 478 of file UT_Quaternion.h.
|
inline |
Definition at line 496 of file UT_Quaternion.h.
|
inline |
Definition at line 426 of file UT_Quaternion.h.
|
inline |
Definition at line 529 of file UT_Quaternion.h.
|
inline |
Definition at line 541 of file UT_Quaternion.h.
|
default |
|
default |
|
inline |
Definition at line 99 of file UT_Quaternion.h.
|
inline |
Definition at line 371 of file UT_Quaternion.h.
|
inline |
Definition at line 113 of file UT_Quaternion.h.
|
inline |
Definition at line 115 of file UT_Quaternion.h.
|
inline |
Rotates a vector by this quaternion Requires that this is normalized.
Definition at line 555 of file UT_Quaternion.h.
|
inline |
rotates a vector by the inverse of this quaternion. Requires that this is normalized.
Definition at line 565 of file UT_Quaternion.h.
void UT_QuaternionT< T >::save | ( | std::ostream & | os, |
int | binary = 0 |
||
) | const |
bool UT_QuaternionT< T >::save | ( | UT_JSONWriter & | w | ) | const |
Methods to serialize to a JSON stream. The vector is stored as an array of 4 reals.
bool UT_QuaternionT< T >::save | ( | UT_JSONValue & | v | ) | const |
Methods to serialize to a JSON stream. The vector is stored as an array of 4 reals.
void UT_QuaternionT< T >::swingTwistDecompose | ( | const UT_Vector3T< T > & | axis, |
UT_QuaternionT< T > & | swing, | ||
UT_QuaternionT< T > & | twist, | ||
const bool | reverse = false |
||
) | const |
void UT_QuaternionT< T >::updateFromAngleAxis | ( | T | angle, |
const UT_Vector3T< T > & | axis, | ||
int | normalize = 1 |
||
) |
void UT_QuaternionT< T >::updateFromArbitraryMatrix | ( | const UT_Matrix3 & | ) |
Form the quaternion from the rotation component of an arbitrary 3x3 matrix.
void UT_QuaternionT< T >::updateFromArbitraryMatrix | ( | const UT_Matrix3D & | ) |
void UT_QuaternionT< T >::updateFromEuler | ( | const UT_Vector3T< T > & | rot, |
const UT_XformOrder & | order | ||
) |
void UT_QuaternionT< T >::updateFromLogMap | ( | const UT_Vector3T< T > & | v | ) |
void UT_QuaternionT< T >::updateFromRotationMatrix | ( | const UT_Matrix3 & | ) |
Form the quaternion from a rotation matrix WARNING: This will produce incorrect results if given a non-rotation matrix! Use updateFromArbitraryMatrix if you may have a non-rotation matrix.
void UT_QuaternionT< T >::updateFromRotationMatrix | ( | const UT_Matrix3D & | ) |
void UT_QuaternionT< T >::updateFromVectors | ( | const UT_Vector3T< T > & | v1, |
const UT_Vector3T< T > & | v2 | ||
) |
|
inline |
Definition at line 306 of file UT_Quaternion.h.
|
inline |
Definition at line 311 of file UT_Quaternion.h.
|
inline |
Definition at line 303 of file UT_Quaternion.h.
|
inline |
Definition at line 308 of file UT_Quaternion.h.
|
inline |
Definition at line 304 of file UT_Quaternion.h.
|
inline |
Definition at line 309 of file UT_Quaternion.h.
|
inline |
Definition at line 305 of file UT_Quaternion.h.
|
inline |
Definition at line 310 of file UT_Quaternion.h.
|
friend |
Definition at line 350 of file UT_Quaternion.h.
|
static |
Definition at line 56 of file UT_Quaternion.h.