Developer Documentation

Public Member Functions | Protected Attributes | List of all members
ACG::Matrix4x4T< Scalar > Class Template Reference

`#include <OpenFlipper/libs_required/ACG/Math/Matrix4x4T.hh>`

Inheritance diagram for ACG::Matrix4x4T< Scalar >:

## Public Member Functions
| Matrix4x4T ()
| constructor: uninitialized values
template<class OtherScalar >
| Matrix4x4T (const Matrix4x4T< OtherScalar > &_rhs)
| construct from other matrix type
| Matrix4x4T (const Scalar _array[16])
| ~Matrix4x4T ()
| destructor
template<typename otherScalar >
Matrix4x4T< Scalar > & | operator= (const Matrix4x4T< otherScalar > &_rhs)
| assignment from other matrix type
Scalar & | operator() (unsigned int row, unsigned int col)
| access operator (read and write)
const Scalar & | operator() (unsigned int row, unsigned int col) const
| access operator (read only)
bool | operator== (const Matrix4x4T< Scalar > &_rhs) const
| compare two matrices (up to some epsilon)
bool | operator!= (const Matrix4x4T< Scalar > &_rhs) const
| compare two matrices
Matrix4x4T | operator+ (Matrix4x4T< Scalar > _rhs) const
| self + _rhs
Matrix4x4T | operator- (Matrix4x4T< Scalar > _rhs) const
| self - _rhs
Matrix4x4T | operator* (const Matrix4x4T< Scalar > &inst) const
| self * _rhs
Matrix4x4T | operator* (const Scalar &scalar)
| self * scalar
Matrix4x4T & | operator+= (const Matrix4x4T< Scalar > &_rhs)
| self += _rhs
Matrix4x4T & | operator-= (const Matrix4x4T< Scalar > &_rhs)
| self -= _rhs
Matrix4x4T & | operator*= (const Matrix4x4T< Scalar > &_rhs)
| self *= _rhs
Matrix4x4T & | leftMult (const Matrix4x4T< Scalar > &_rhs)
| multiply from left: self = _rhs * self
template<typename T >
VectorT< T, 4 > | operator* (const VectorT< T, 4 > &_v) const
| matrix by vector multiplication
template<typename T >
VectorT< T, 3 > | transform_point (const VectorT< T, 3 > &_v) const
| transform point (x',y',z',1) = M * (x,y,z,1)
template<typename T >
VectorT< T, 3 > | transform_vector (const VectorT< T, 3 > &_v) const
| transform vector (x',y',z',0) = A * (x,y,z,0)
void | clear ()
| sets all elements to zero
void | identity ()
| setup an identity matrix
bool | is_identity () const
| check if the matrix is the identity ( up to an epsilon )
void | transpose ()
| transpose matrix
bool | invert ()
| matrix inversion (returns true on success)
Scalar | determinant () const
const Scalar * | get_raw_data () const
const Scalar * | raw () const
const Scalar * | data () const

## Protected Attributes
Scalar | mat_ [16]

## Detailed Description

### template<class Scalar>
class ACG::Matrix4x4T< Scalar >

Simple 4x4 Matrix. Inherited by GLMatrix.

Definition at line 92 of file Matrix4x4T.hh.

## Constructor & Destructor Documentation

## ◆ Matrix4x4T()

template<class Scalar>

ACG::Matrix4x4T< Scalar >::Matrix4x4T | ( | const Scalar | _array[16] | ) |
| inline

setup matrix using an array of N*N scalar values. elements are ordered 'column first' (like OpenGL)

Definition at line 107 of file Matrix4x4T.hh.

## Member Function Documentation

## ◆ get_raw_data()

template<class Scalar>

const Scalar* ACG::Matrix4x4T< Scalar >::get_raw_data | ( |  | ) | const
| inline

access to data array. not very nice, but in case of 4x4 matrices this member can be used to pass matrices to OpenGL e.g. glLoadMatrixf(m.get_raw_data());

Definition at line 256 of file Matrix4x4T.hh.

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

- OpenFlipper/libs_required/ACG/Math/Matrix4x4T.hh
- OpenFlipper/libs_required/ACG/Math/Matrix4x4T_impl.hh