tf2
master
tf2 maintains the relationship between coordinate frames in a tree structure buffered in time, and lets the user transform points, vectors, etc between any two coordinate frames at any desired point in time.
|
The Transform class supports rigid transforms with only translation and rotation and no scaling/shear. It can be used in combination with Vector3, Quaternion and Matrix3x3 linear algebra classes. More...
#include <Transform.h>
Public Member Functions | |
Transform () | |
No initialization constructor. More... | |
TF2SIMD_FORCE_INLINE | Transform (const Quaternion &q, const Vector3 &c=Vector3(tf2Scalar(0), tf2Scalar(0), tf2Scalar(0))) |
Constructor from Quaternion (optional Vector3 ) More... | |
TF2SIMD_FORCE_INLINE | Transform (const Matrix3x3 &b, const Vector3 &c=Vector3(tf2Scalar(0), tf2Scalar(0), tf2Scalar(0))) |
Constructor from Matrix3x3 (optional Vector3) More... | |
TF2SIMD_FORCE_INLINE | Transform (const Transform &other) |
Copy constructor. More... | |
TF2SIMD_FORCE_INLINE Transform & | operator= (const Transform &other) |
Assignment Operator. More... | |
TF2SIMD_FORCE_INLINE void | mult (const Transform &t1, const Transform &t2) |
Set the current transform as the value of the product of two transforms. More... | |
TF2SIMD_FORCE_INLINE Vector3 | operator() (const Vector3 &x) const |
Return the transform of the vector. More... | |
TF2SIMD_FORCE_INLINE Vector3 | operator* (const Vector3 &x) const |
Return the transform of the vector. More... | |
TF2SIMD_FORCE_INLINE Quaternion | operator* (const Quaternion &q) const |
Return the transform of the Quaternion. More... | |
TF2SIMD_FORCE_INLINE Matrix3x3 & | getBasis () |
Return the basis matrix for the rotation. More... | |
const TF2SIMD_FORCE_INLINE Matrix3x3 & | getBasis () const |
Return the basis matrix for the rotation. More... | |
TF2SIMD_FORCE_INLINE Vector3 & | getOrigin () |
Return the origin vector translation. More... | |
const TF2SIMD_FORCE_INLINE Vector3 & | getOrigin () const |
Return the origin vector translation. More... | |
Quaternion | getRotation () const |
Return a quaternion representing the rotation. More... | |
void | setFromOpenGLMatrix (const tf2Scalar *m) |
Set from an array. More... | |
void | getOpenGLMatrix (tf2Scalar *m) const |
Fill an array representation. More... | |
TF2SIMD_FORCE_INLINE void | setOrigin (const Vector3 &origin) |
Set the translational element. More... | |
TF2SIMD_FORCE_INLINE Vector3 | invXform (const Vector3 &inVec) const |
TF2SIMD_FORCE_INLINE void | setBasis (const Matrix3x3 &basis) |
Set the rotational element by Matrix3x3. More... | |
TF2SIMD_FORCE_INLINE void | setRotation (const Quaternion &q) |
Set the rotational element by Quaternion. More... | |
void | setIdentity () |
Set this transformation to the identity. More... | |
Transform & | operator*= (const Transform &t) |
Multiply this Transform by another(this = this * another) More... | |
Transform | inverse () const |
Return the inverse of this transform. More... | |
Transform | inverseTimes (const Transform &t) const |
Return the inverse of this transform times the other transform. More... | |
Transform | operator* (const Transform &t) const |
Return the product of this transform and the other. More... | |
void | serialize (struct TransformData &dataOut) const |
void | serializeFloat (struct TransformFloatData &dataOut) const |
void | deSerialize (const struct TransformData &dataIn) |
void | deSerializeDouble (const struct TransformDoubleData &dataIn) |
void | deSerializeFloat (const struct TransformFloatData &dataIn) |
Static Public Member Functions | |
static const Transform & | getIdentity () |
Return an identity transform. More... | |
The Transform class supports rigid transforms with only translation and rotation and no scaling/shear. It can be used in combination with Vector3, Quaternion and Matrix3x3 linear algebra classes.
|
inline |
No initialization constructor.
|
inlineexplicit |
Constructor from Quaternion (optional Vector3 )
q | Rotation from quaternion |
c | Translation from Vector (default 0,0,0) |
|
inlineexplicit |
Constructor from Matrix3x3 (optional Vector3)
b | Rotation from Matrix |
c | Translation from Vector default (0,0,0) |
|
inline |
Copy constructor.
|
inline |
Assignment Operator.
|
inline |
|
inline |
Return the transform of the vector.
|
inline |
Return the transform of the vector.
|
inline |
Return the transform of the Quaternion.
|
inline |
Return the basis matrix for the rotation.
|
inline |
Return the basis matrix for the rotation.
|
inline |
Return the origin vector translation.
|
inline |
Return the origin vector translation.
|
inline |
Return a quaternion representing the rotation.
|
inline |
Set from an array.
m | A pointer to a 15 element array (12 rotation(row major padded on the right by 1), and 3 translation |
|
inline |
Fill an array representation.
m | A pointer to a 15 element array (12 rotation(row major padded on the right by 1), and 3 translation |
|
inline |
Set the translational element.
origin | The vector to set the translation to |
TF2SIMD_FORCE_INLINE Vector3 tf2::Transform::invXform | ( | const Vector3 & | inVec | ) | const |
|
inline |
Set the rotational element by Matrix3x3.
|
inline |
Set the rotational element by Quaternion.
|
inline |
Set this transformation to the identity.
Multiply this Transform by another(this = this * another)
t | The other transform |
|
inline |
Return the inverse of this transform.
TF2SIMD_FORCE_INLINE Transform tf2::Transform::inverseTimes | ( | const Transform & | t | ) | const |
Return the inverse of this transform times the other transform.
t | The other transform return this.inverse() * the other |
TF2SIMD_FORCE_INLINE Transform tf2::Transform::operator* | ( | const Transform & | t | ) | const |
Return the product of this transform and the other.
|
inlinestatic |
Return an identity transform.
TF2SIMD_FORCE_INLINE void tf2::Transform::serialize | ( | struct TransformData & | dataOut | ) | const |
TF2SIMD_FORCE_INLINE void tf2::Transform::serializeFloat | ( | struct TransformFloatData & | dataOut | ) | const |
TF2SIMD_FORCE_INLINE void tf2::Transform::deSerialize | ( | const struct TransformData & | dataIn | ) |
TF2SIMD_FORCE_INLINE void tf2::Transform::deSerializeDouble | ( | const struct TransformDoubleData & | dataIn | ) |
TF2SIMD_FORCE_INLINE void tf2::Transform::deSerializeFloat | ( | const struct TransformFloatData & | dataIn | ) |