Free Electron
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
fe::Matrix< 3, 4, T > Class Template Reference

Matrix for 3D transformations. More...

#include <Matrix3x4.h>

Inheritance diagram for fe::Matrix< 3, 4, T >:
Inheritance graph
[legend]

Public Member Functions

 Matrix (const Matrix< 3, 4, T > &other)
 
template<int M, int N, class U >
 Matrix (const Matrix< M, N, U > &other)
 
 Matrix (const Quaternion< T > &quat)
 
Matrix< 3, 4, T > & operator= (const Matrix< 3, 4, T > &other)
 
template<int M, int N, class U >
Matrix< 3, 4, T > & operator= (const Matrix< M, N, U > &other)
 
bool operator== (const Matrix< 3, 4, T > &other) const
 
bool operator!= (const Matrix< 3, 4, T > &other) const
 
Matrix< 3, 4, T > & operator= (const Quaternion< T > &quat)
 
Matrix< 3, 4, T > & operator*= (const Matrix< 3, 4, T > &preMatrix)
 
template<class U >
void copy16 (U *array) const
 Populate a 16 element one dimensional array suitable for OpenGL operations. More...
 
template<class U >
void copyTranslation (U *array) const
 Populate a three element array with the current translation component. More...
 
Vector< 3, T > column (U32 index) const
 
Vector< 3, T > & column (U32 index)
 
Vector< 3, T > direction (void) const
 
Vector< 3, T > left (void) const
 
Vector< 3, T > up (void) const
 
Vector< 3, T > translation (void) const
 
Vector< 3, T > & direction (void)
 
Vector< 3, T > & left (void)
 
Vector< 3, T > & up (void)
 
Vector< 3, T > & translation (void)
 
operator() (unsigned int i, unsigned int j) const
 Column Major addressing. More...
 
T & operator() (unsigned int i, unsigned int j)
 Column Major addressing. More...
 

Static Public Member Functions

static const Matrix< 3, 4, T > identity (void)
 

Private Attributes

Vector< 3, T > m_vector [4]
 

Detailed Description

template<typename T>
class fe::Matrix< 3, 4, T >

Matrix for 3D transformations.

Indexes

    0   3   6   9
    1   4   7   10
    2   5   8   11

represent

    Rot Rot Rot Tx
    Rot Rot Rot Ty
    Rot Rot Rot Tz

with the columns

    Direction Left Up Translation

The operator(i,j) addressing for a 4x4 matrix is:
    00  01  02  03
    10  11  12  13
    20  21  22  23

For translation on the right as shown, this is stored column major. Note that a few references place translation on the bottom, so this would act like row major.

Member Function Documentation

◆ copy16()

template<typename T >
template<typename U >
void fe::Matrix< 3, 4, T >::copy16 ( U *  array) const
inline

Populate a 16 element one dimensional array suitable for OpenGL operations.

Translation is placed in elements 13, 14, and 15.

References fe::Matrix< M, N, T >::copy(), and fe::Matrix< M, N, T >::setIdentity().

◆ copyTranslation()

template<typename T >
template<typename U >
void fe::Matrix< 3, 4, T >::copyTranslation ( U *  array) const
inline

◆ operator()() [1/2]

template<typename T >
T fe::Matrix< 3, 4, T >::operator() ( unsigned int  i,
unsigned int  j 
) const
inline

Column Major addressing.

◆ operator()() [2/2]

template<typename T >
T& fe::Matrix< 3, 4, T >::operator() ( unsigned int  i,
unsigned int  j 
)
inline

Column Major addressing.


The documentation for this class was generated from the following file: