17#ifndef TF2__LINEARMATH__TRANSFORM_HPP
18#define TF2__LINEARMATH__TRANSFORM_HPP
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());
126 m_basis.getRotation(q);
136 m_basis.setFromOpenGLSubMatrix(m);
137 m_origin.setValue(m[12],m[13],m[14]);
145 m_basis.getOpenGLSubMatrix(m);
146 m[12] = m_origin.x();
147 m[13] = m_origin.y();
148 m[14] = m_origin.z();
171 m_basis.setRotation(q);
179 m_basis.setIdentity();
188 m_origin += m_basis * t.m_origin;
189 m_basis *= t.m_basis;
216 return identityTransform;
241 return (m_basis.transpose() * v);
248 return Transform(m_basis.transposeTimes(t.m_basis),
256 (*
this)(t.m_origin));
284 m_basis.serialize(dataOut.m_basis);
285 m_origin.serialize(dataOut.m_origin);
290 m_basis.serializeFloat(dataOut.
m_basis);
291 m_origin.serializeFloat(dataOut.
m_origin);
297 m_basis.deSerialize(dataIn.m_basis);
298 m_origin.deSerialize(dataIn.m_origin);
303 m_basis.deSerializeFloat(dataIn.
m_basis);
304 m_origin.deSerializeFloat(dataIn.
m_origin);
309 m_basis.deSerializeDouble(dataIn.
m_basis);
310 m_origin.deSerializeDouble(dataIn.
m_origin);
#define TF2SIMD_FORCE_INLINE
Definition Scalar.hpp:129
double tf2Scalar
The tf2Scalar type abstracts floating point numbers, to easily switch between double and single float...
Definition Scalar.hpp:159
The Matrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with Q...
Definition Matrix3x3.hpp:33
static const Matrix3x3 & getIdentity()
Definition Matrix3x3.hpp:217
Matrix3x3 transpose() const
Return the transpose of the matrix.
Definition Matrix3x3.hpp:559
The Quaternion implements quaternion to perform linear algebra rotations in combination with Matrix3x...
Definition Quaternion.hpp:30
tf2::Vector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16...
Definition Vector3.hpp:40
Definition buffer_core.hpp:58
tf2Scalar dot(const Quaternion &q1, const Quaternion &q2)
Calculate the dot product between two quaternions.
Definition Quaternion.hpp:456
bool operator==(const Matrix3x3 &m1, const Matrix3x3 &m2)
Equality operator between two matrices It will test all elements are equal.
Definition Matrix3x3.hpp:650
for serialization
Definition Matrix3x3.hpp:665
for serialization
Definition Matrix3x3.hpp:659
Definition Vector3.hpp:676
Definition Vector3.hpp:671
#define TF2_PUBLIC
Definition visibility_control.h:57