95 template <
typename T> std::ostream&
operator<<(std::ostream& anOutputStream,
146 const T& a16 = 1.0f);
182 Matrix4x4(
const std::vector<double>& apMatrix);
339 void scale(T x, T y, T z);
385 const T*
get()
const;
458 void print(std::ostream& anOutputStream)
const;
484 #endif // __Matrix4x4_h static Matrix4x4 buildTranslationMatrix(const Vec3< T > &aVector)
Build a tranlation matrix.
void loadIdentity()
Load identity matrix.
void rotate(const double anAngle, const Vec3< T > &aVector)
Multiply the current matrix by a rotation matrix.
T m_p_4x4_data[4 *4]
the matrix data
Matrix4x4 getTranspose() const
Get the transpose of the current matrix.
void scale(T x, T y, T z)
Multiply the current matrix by a scaling matrix.
static Matrix4x4 buildYawPitchRollRotationMatrix(T yaw, T pitch, T roll)
Build a rotation matrix.
void setFromVector(const std::vector< double > &apMatrix)
Load the matrix.
T m_p_3x3_data[3 *3]
the matrix data
const T * get4x4() const
Accessor on the 4x4 matrix data.
Matrix4x4 & operator=(const Matrix4x4 &aMatrix)
Copy operator.
Matrix4x4(const T &a1=1.0f, const T &a2=0.0f, const T &a3=0.0f, const T &a4=0.0f, const T &a5=0.0f, const T &a6=1.0f, const T &a7=0.0f, const T &a8=0.0f, const T &a9=0.0f, const T &a10=0.0f, const T &a11=1.0f, const T &a12=0.0f, const T &a13=0.0f, const T &a14=0.0f, const T &a15=0.0f, const T &a16=1.0f)
Default Constructor (create an identity matrix).
Vec3 is a template class to handle a 3D vector.
Matrix4x4 & operator*=(const Matrix4x4 &aMatrix)
static Matrix4x4 buildIdentityMatrix()
Build an identity matrix.
void yawPitchRollRotate(double yaw, double pitch, double roll)
Multiply the current matrix by a yaw, pitch, roll rotation matrix.
Template class to handle 3D vectors.
static Matrix4x4 buildRotationMatrix(T anAngle, T x, T y, T z)
Build a rotation matrix.
Template class to handle 4x4 matrices.
std::vector< double > getAsVector() const
Accessor on the 4x4 matrix data.
const T * get3x3()
Accessor on the 3x3 matrix data.
void translate(const Vec3< T > &aVector)
Multiply the current matrix by a translation matrix.
Vec3< T > operator*(const Vec3< T > &aVector) const
Operator * to multiply the current matrix by a vector.
void print() const
Print the matrix in the console.
std::ostream & operator<<(std::ostream &anOutputSream, const gVirtualXRay::AtomicElement &anElement)
operator <<
static Matrix4x4 buildScaleMatrix(const Vec3< T > &aVector)
Build a scale matrix.
Matrix4x4 is a template class to handle a 4 by 4 matrix.
Matrix4x4 getInverse() const
Get the inverse of the current matrix.
T determinant() const
Compute the determinant of the current matrix.
bool m_small_matrix_up_to_date