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.
|
Go to the documentation of this file.
17 #ifndef tf2_Transform_H
18 #define tf2_Transform_H
28 #define TransformData TransformDoubleData
64 : m_basis(other.m_basis),
65 m_origin(other.m_origin)
71 m_basis = other.m_basis;
72 m_origin = other.m_origin;
81 m_basis = t1.m_basis * t2.m_basis;
82 m_origin = t1(t2.m_origin);
95 return Vector3(m_basis[0].
dot(x) + m_origin.x(),
96 m_basis[1].dot(x) + m_origin.y(),
97 m_basis[2].dot(x) + m_origin.z());
137 m_origin.setValue(m[12],m[13],m[14]);
146 m[12] = m_origin.x();
147 m[13] = m_origin.y();
148 m[14] = m_origin.z();
188 m_origin += m_basis * t.m_origin;
189 m_basis *= t.m_basis;
216 return identityTransform;
240 Vector3 v = inVec - m_origin;
256 (*
this)(t.m_origin));
285 m_origin.serialize(dataOut.m_origin);
291 m_origin.serializeFloat(dataOut.
m_origin);
298 m_origin.deSerialize(dataIn.m_origin);
304 m_origin.deSerializeFloat(dataIn.
m_origin);
310 m_origin.deSerializeDouble(dataIn.
m_origin);
TF2SIMD_FORCE_INLINE tf2Scalar dot(const Quaternion &q1, const Quaternion &q2)
Calculate the dot product between two quaternions.
Definition: Quaternion.h:395
void deSerializeFloat(const struct Matrix3x3FloatData &dataIn)
Definition: Matrix3x3.h:690
void getRotation(Quaternion &q) const
Get the matrix represented as a quaternion.
Definition: Matrix3x3.h:247
Definition: Vector3.h:686
static const Matrix3x3 & getIdentity()
Definition: Matrix3x3.h:217
void getOpenGLSubMatrix(tf2Scalar *m) const
Fill the values of the matrix into a 9 element array.
Definition: Matrix3x3.h:228
void setRotation(const Quaternion &q)
Set the matrix from a quaternion.
Definition: Matrix3x3.h:155
Matrix3x3 transposeTimes(const Matrix3x3 &m) const
Definition: Matrix3x3.h:586
Definition: Vector3.h:681
for serialization
Definition: Matrix3x3.h:657
void deSerialize(const struct Matrix3x3Data &dataIn)
Definition: Matrix3x3.h:684
TF2SIMD_FORCE_INLINE bool operator==(const Matrix3x3 &m1, const Matrix3x3 &m2)
Equality operator between two matrices It will test all elements are equal.
Definition: Matrix3x3.h:649
void deSerializeDouble(const struct Matrix3x3DoubleData &dataIn)
Definition: Matrix3x3.h:696
#define TF2SIMD_FORCE_INLINE
Definition: Scalar.h:129
for serialization
Definition: Matrix3x3.h:663
void setIdentity()
Set the matrix to the identity.
Definition: Matrix3x3.h:209
Definition: buffer_core.h:55
void setFromOpenGLSubMatrix(const tf2Scalar *m)
Set from a carray of tf2Scalars.
Definition: Matrix3x3.h:125
void serializeFloat(struct Matrix3x3FloatData &dataOut) const
Definition: Matrix3x3.h:677
#define TF2_PUBLIC
Definition: visibility_control.h:58
The Quaternion implements quaternion to perform linear algebra rotations in combination with Matrix3x...
Definition: Quaternion.h:29
void serialize(struct Matrix3x3Data &dataOut) const
Definition: Matrix3x3.h:671
Matrix3x3 transpose() const
Return the transpose of the matrix.
Definition: Matrix3x3.h:558
double tf2Scalar
The tf2Scalar type abstracts floating point numbers, to easily switch between double and single float...
Definition: Scalar.h:159
The Matrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with Q...
Definition: Matrix3x3.h:33