3D Matrix Class More...
#include <SGMatrix.hxx>
Public Member Functions | |
SGMatrix (void) | |
Default constructor. | |
SGMatrix (const T *data) | |
Constructor. | |
SGMatrix (T m00, T m01, T m02, T m03, T m10, T m11, T m12, T m13, T m20, T m21, T m22, T m23, T m30, T m31, T m32, T m33) | |
Constructor, build up a SGMatrix from given elements. | |
template<typename S > | |
SGMatrix (const SGVec3< S > &trans) | |
Constructor, build up a SGMatrix from a translation. | |
template<typename S > | |
SGMatrix (const SGQuat< S > &quat) | |
Constructor, build up a SGMatrix from a rotation and a translation. | |
SGMatrix (const TransNegRef< T > &tm) | |
Copy constructor for a transposed negated matrix. | |
template<typename S > | |
void | set (const SGVec3< S > &trans) |
Set from a tranlation. | |
template<typename S > | |
void | set (const SGQuat< S > &quat) |
Set from a scale/rotation and tranlation. | |
void | set (const TransNegRef< T > &tm) |
set from a transposed negated matrix | |
const T & | operator() (unsigned i, unsigned j) const |
Access by index, the index is unchecked. | |
T & | operator() (unsigned i, unsigned j) |
Access by index, the index is unchecked. | |
const T & | operator[] (unsigned i) const |
Access raw data by index, the index is unchecked. | |
T & | operator[] (unsigned i) |
Access by index, the index is unchecked. | |
const T * | data (void) const |
Get the data pointer. | |
T * | data (void) |
Get the data pointer. | |
const T(& | sg (void) const)[4] |
Readonly interface function to ssg's sgMat4/sgdMat4. | |
T(& | sg (void))[4] |
Interface function to ssg's sgMat4/sgdMat4. | |
SGMatrix & | operator+= (const SGMatrix &m) |
Inplace addition. | |
SGMatrix & | operator-= (const SGMatrix &m) |
Inplace subtraction. | |
template<typename S > | |
SGMatrix & | operator*= (S s) |
Inplace scalar multiplication. | |
template<typename S > | |
SGMatrix & | operator/= (S s) |
Inplace scalar multiplication by 1/s. | |
SGMatrix & | operator*= (const SGMatrix< T > &m2) |
Inplace matrix multiplication, post multiply. | |
Static Public Member Functions | |
static SGMatrix | zeros (void) |
Return an all zero matrix. | |
static SGMatrix | unit (void) |
Return a unit matrix. |
3D Matrix Class
Definition at line 27 of file SGMatrix.hxx.
Default constructor.
Does not initialize at all. If you need them zero initialized, use SGMatrix::zeros()
Initialize with nans in the debug build, that will guarantee to have a fast uninitialized default constructor in the release but shows up uninitialized values in the debug build very fast ...
Definition at line 34 of file SGMatrix.hxx.
Constructor.
Initialize by the content of a plain array, make sure it has at least 16 elements
Definition at line 46 of file SGMatrix.hxx.