Public Member Functions | Static Public Member Functions | Private Attributes
tf2::Transform Class Reference

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>

List of all members.

Public Member Functions

void deSerialize (const struct TransformData &dataIn)
void deSerializeDouble (const struct TransformDoubleData &dataIn)
void deSerializeFloat (const struct TransformFloatData &dataIn)
TF2SIMD_FORCE_INLINE Matrix3x3getBasis ()
 Return the basis matrix for the rotation.
TF2SIMD_FORCE_INLINE const
Matrix3x3
getBasis () const
 Return the basis matrix for the rotation.
void getOpenGLMatrix (tf2Scalar *m) const
 Fill an array representation.
TF2SIMD_FORCE_INLINE Vector3 & getOrigin ()
 Return the origin vector translation.
TF2SIMD_FORCE_INLINE const
Vector3 & 
getOrigin () const
 Return the origin vector translation.
Quaternion getRotation () const
 Return a quaternion representing the rotation.
Transform inverse () const
 Return the inverse of this transform.
Transform inverseTimes (const Transform &t) const
 Return the inverse of this transform times the other transform.
TF2SIMD_FORCE_INLINE Vector3 invXform (const Vector3 &inVec) const
TF2SIMD_FORCE_INLINE void mult (const Transform &t1, const Transform &t2)
 Set the current transform as the value of the product of two transforms.
TF2SIMD_FORCE_INLINE Vector3 operator() (const Vector3 &x) const
 Return the transform of the vector.
TF2SIMD_FORCE_INLINE Vector3 operator* (const Vector3 &x) const
 Return the transform of the vector.
TF2SIMD_FORCE_INLINE Quaternion operator* (const Quaternion &q) const
 Return the transform of the Quaternion.
Transform operator* (const Transform &t) const
 Return the product of this transform and the other.
Transformoperator*= (const Transform &t)
 Multiply this Transform by another(this = this * another)
TF2SIMD_FORCE_INLINE Transformoperator= (const Transform &other)
 Assignment Operator.
void serialize (struct TransformData &dataOut) const
void serializeFloat (struct TransformFloatData &dataOut) const
TF2SIMD_FORCE_INLINE void setBasis (const Matrix3x3 &basis)
 Set the rotational element by Matrix3x3.
void setFromOpenGLMatrix (const tf2Scalar *m)
 Set from an array.
void setIdentity ()
 Set this transformation to the identity.
TF2SIMD_FORCE_INLINE void setOrigin (const Vector3 &origin)
 Set the translational element.
TF2SIMD_FORCE_INLINE void setRotation (const Quaternion &q)
 Set the rotational element by Quaternion.
 Transform ()
 No initialization constructor.
TF2SIMD_FORCE_INLINE Transform (const Quaternion &q, const Vector3 &c=Vector3(tf2Scalar(0), tf2Scalar(0), tf2Scalar(0)))
 Constructor from Quaternion (optional Vector3 )
TF2SIMD_FORCE_INLINE Transform (const Matrix3x3 &b, const Vector3 &c=Vector3(tf2Scalar(0), tf2Scalar(0), tf2Scalar(0)))
 Constructor from Matrix3x3 (optional Vector3)
TF2SIMD_FORCE_INLINE Transform (const Transform &other)
 Copy constructor.

Static Public Member Functions

static const TransformgetIdentity ()
 Return an identity transform.

Private Attributes

Matrix3x3 m_basis
 Storage for the rotation.
Vector3 m_origin
 Storage for the translation.

Detailed Description

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.

Definition at line 32 of file Transform.h.


Constructor & Destructor Documentation

No initialization constructor.

Definition at line 42 of file Transform.h.

TF2SIMD_FORCE_INLINE tf2::Transform::Transform ( const Quaternion q,
const Vector3 &  c = Vector3(tf2Scalar(0), tf2Scalar(0), tf2Scalar(0)) 
) [inline, explicit]

Constructor from Quaternion (optional Vector3 )

Parameters:
qRotation from quaternion
cTranslation from Vector (default 0,0,0)

Definition at line 46 of file Transform.h.

TF2SIMD_FORCE_INLINE tf2::Transform::Transform ( const Matrix3x3 b,
const Vector3 &  c = Vector3(tf2Scalar(0), tf2Scalar(0), tf2Scalar(0)) 
) [inline, explicit]

Constructor from Matrix3x3 (optional Vector3)

Parameters:
bRotation from Matrix
cTranslation from Vector default (0,0,0)

Definition at line 55 of file Transform.h.

Copy constructor.

Definition at line 61 of file Transform.h.


Member Function Documentation

Definition at line 279 of file Transform.h.

Definition at line 291 of file Transform.h.

Definition at line 285 of file Transform.h.

Return the basis matrix for the rotation.

Definition at line 111 of file Transform.h.

Return the basis matrix for the rotation.

Definition at line 113 of file Transform.h.

static const Transform& tf2::Transform::getIdentity ( ) [inline, static]

Return an identity transform.

Definition at line 202 of file Transform.h.

void tf2::Transform::getOpenGLMatrix ( tf2Scalar m) const [inline]

Fill an array representation.

Parameters:
mA pointer to a 15 element array (12 rotation(row major padded on the right by 1), and 3 translation

Definition at line 138 of file Transform.h.

Return the origin vector translation.

Definition at line 116 of file Transform.h.

TF2SIMD_FORCE_INLINE const Vector3& tf2::Transform::getOrigin ( ) const [inline]

Return the origin vector translation.

Definition at line 118 of file Transform.h.

Return a quaternion representing the rotation.

Definition at line 121 of file Transform.h.

Transform tf2::Transform::inverse ( ) const [inline]

Return the inverse of this transform.

Definition at line 187 of file Transform.h.

Return the inverse of this transform times the other transform.

Parameters:
tThe other transform return this.inverse() * the other

Definition at line 229 of file Transform.h.

TF2SIMD_FORCE_INLINE Vector3 tf2::Transform::invXform ( const Vector3 &  inVec) const

Definition at line 222 of file Transform.h.

TF2SIMD_FORCE_INLINE void tf2::Transform::mult ( const Transform t1,
const Transform t2 
) [inline]

Set the current transform as the value of the product of two transforms.

Parameters:
t1Transform 1
t2Transform 2 This = Transform1 * Transform2

Definition at line 78 of file Transform.h.

TF2SIMD_FORCE_INLINE Vector3 tf2::Transform::operator() ( const Vector3 &  x) const [inline]

Return the transform of the vector.

Definition at line 91 of file Transform.h.

TF2SIMD_FORCE_INLINE Vector3 tf2::Transform::operator* ( const Vector3 &  x) const [inline]

Return the transform of the vector.

Definition at line 99 of file Transform.h.

TF2SIMD_FORCE_INLINE Quaternion tf2::Transform::operator* ( const Quaternion q) const [inline]

Return the transform of the Quaternion.

Definition at line 105 of file Transform.h.

TF2SIMD_FORCE_INLINE Transform tf2::Transform::operator* ( const Transform t) const

Return the product of this transform and the other.

Definition at line 237 of file Transform.h.

Transform& tf2::Transform::operator*= ( const Transform t) [inline]

Multiply this Transform by another(this = this * another)

Parameters:
tThe other transform

Definition at line 179 of file Transform.h.

TF2SIMD_FORCE_INLINE Transform& tf2::Transform::operator= ( const Transform other) [inline]

Assignment Operator.

Definition at line 67 of file Transform.h.

Definition at line 266 of file Transform.h.

Definition at line 272 of file Transform.h.

TF2SIMD_FORCE_INLINE void tf2::Transform::setBasis ( const Matrix3x3 basis) [inline]

Set the rotational element by Matrix3x3.

Definition at line 158 of file Transform.h.

void tf2::Transform::setFromOpenGLMatrix ( const tf2Scalar m) [inline]

Set from an array.

Parameters:
mA pointer to a 15 element array (12 rotation(row major padded on the right by 1), and 3 translation

Definition at line 130 of file Transform.h.

void tf2::Transform::setIdentity ( ) [inline]

Set this transformation to the identity.

Definition at line 171 of file Transform.h.

TF2SIMD_FORCE_INLINE void tf2::Transform::setOrigin ( const Vector3 &  origin) [inline]

Set the translational element.

Parameters:
originThe vector to set the translation to

Definition at line 149 of file Transform.h.

Set the rotational element by Quaternion.

Definition at line 164 of file Transform.h.


Member Data Documentation

Storage for the rotation.

Definition at line 35 of file Transform.h.

Vector3 tf2::Transform::m_origin [private]

Storage for the translation.

Definition at line 37 of file Transform.h.


The documentation for this class was generated from the following file:


tf2
Author(s): Tully Foote, Eitan Marder-Eppstein, Wim Meeussen
autogenerated on Mon Oct 2 2017 02:24:35