17 #ifndef tf2_Transform_H 18 #define tf2_Transform_H 27 #define TransformData TransformDoubleData 62 : m_basis(other.m_basis),
63 m_origin(other.m_origin)
93 return Vector3(m_basis[0].
dot(x) + m_origin.x(),
94 m_basis[1].dot(x) + m_origin.y(),
95 m_basis[2].dot(x) + m_origin.z());
133 m_origin.setValue(m[12],m[13],m[14]);
141 m[12] = m_origin.x();
142 m[13] = m_origin.y();
143 m[14] = m_origin.z();
205 return identityTransform;
269 m_origin.serialize(dataOut.m_origin);
275 m_origin.serializeFloat(dataOut.
m_origin);
282 m_origin.deSerialize(dataIn.m_origin);
288 m_origin.deSerializeFloat(dataIn.
m_origin);
294 m_origin.deSerializeDouble(dataIn.
m_origin);
#define TF2SIMD_FORCE_INLINE
static const Matrix3x3 & getIdentity()
TF2SIMD_FORCE_INLINE bool operator==(const Matrix3x3 &m1, const Matrix3x3 &m2)
Equality operator between two matrices It will test all elements are equal.
Matrix3x3 transposeTimes(const Matrix3x3 &m) const
void serialize(struct Matrix3x3Data &dataOut) const
Matrix3x3 transpose() const
Return the transpose of the matrix.
void setFromOpenGLSubMatrix(const tf2Scalar *m)
Set from a carray of tf2Scalars.
void deSerialize(const struct Matrix3x3Data &dataIn)
void deSerializeDouble(const struct Matrix3x3DoubleData &dataIn)
double tf2Scalar
The tf2Scalar type abstracts floating point numbers, to easily switch between double and single float...
TF2SIMD_FORCE_INLINE tf2Scalar dot(const Quaternion &q1, const Quaternion &q2)
Calculate the dot product between two quaternions.
The Matrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with Q...
void deSerializeFloat(const struct Matrix3x3FloatData &dataIn)
void serializeFloat(struct Matrix3x3FloatData &dataOut) const
void setRotation(const Quaternion &q)
Set the matrix from a quaternion.
void getRotation(Quaternion &q) const
Get the matrix represented as a quaternion.
The Quaternion implements quaternion to perform linear algebra rotations in combination with Matrix3x...
void getOpenGLSubMatrix(tf2Scalar *m) const
Fill the values of the matrix into a 9 element array.
void setIdentity()
Set the matrix to the identity.