Template Class Matrix4
Defined in File Matrix4.hpp
Class Documentation
-
template<typename BaseVecT>
class Matrix4 A 4x4 matrix class implementation for use with the provided vertex types.
Public Functions
-
inline Matrix4()
Default constructor. Initializes a identity matrix.
-
template<typename T>
inline Matrix4(T *matrix) Initializes a matrix wit the given data array. Ensure that the array has exactly 16 fields.
-
template<typename T>
inline Matrix4(T axis, ValueType angle) Constructs a matrix from given axis and angle. Trys to avoid a gimbal lock.
-
Matrix4(string filename)
-
inline ~Matrix4()
-
inline Eigen::Matrix4d toEigenMatrix()
-
inline Matrix4<BaseVecT> operator*(const ValueType &scale) const
Scales the matrix elemnts by the given factor.
-
template<typename T>
inline Matrix4<BaseVecT> operator*(const Matrix4<T> &other) const Matrix-Matrix multiplication. Returns the new matrix.
-
template<typename T>
inline Matrix4<BaseVecT> operator+(const Matrix4<T> &other) const Matrix addition operator. Returns a new matrix.
-
template<typename T>
inline Matrix4<BaseVecT> operator+=(const Matrix4<T> &other) Matrix addition operator.
-
template<typename T>
inline Matrix4<BaseVecT> operator*(const T *&other) const Matrix-Matrix multiplication (array based). Mainly implemented for compatibility with other math libs. ensure that the used array has at least 16 elements to avoid memory access violations.
-
template<typename T>
inline T operator*(const T &v) const Multiplication of Matrix and Vertex types.
-
template<typename T>
inline Normal<T> operator*(const Normal<T> &v) const Multiplication of Matrix and Vertex types.
-
inline void set(int i, ValueType value)
Sets the given index of the Matrix’s data field to the provided value.
- Parameters:
i – Field index of the matrix
value – new value
-
inline void transpose()
Transposes the current matrix.
-
inline void toPostionAngle(ValueType pose[6])
Computes an Euler representation (x, y, z) plus three rotation values in rad. Rotations are with respect to the x, y, z axes.
-
inline void loadFromFile(string filename)
Loads matrix values from a given file.
-
template<typename T>
inline void operator*=(const Matrix4<T> &other) Matrix-Matrix multiplication with self assigment.
-
template<typename T>
inline void operator*=(const T *other) Matrix-Matrix multiplication (array based). See operator*}.
-
inline Matrix4()