ACG::SceneGraph::ACG::Matrix4x4T< Scalar > Class Template Reference

Inheritance diagram for ACG::SceneGraph::ACG::Matrix4x4T< Scalar >:
Inheritance graph
[legend]
Collaboration diagram for ACG::SceneGraph::ACG::Matrix4x4T< Scalar >:
Collaboration graph
[legend]

List of all members.

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+ (const Matrix4x4T< Scalar > &_rhs) const
 self + _rhs
Matrix4x4T operator- (const Matrix4x4T< Scalar > &_rhs) const
 self - _rhs
Matrix4x4T operator* (const Matrix4x4T< Scalar > &inst) const
 self * _rhs
Matrix4x4Toperator+= (const Matrix4x4T< Scalar > &_rhs)
 self += _rhs
Matrix4x4Toperator-= (const Matrix4x4T< Scalar > &_rhs)
 self -= _rhs
Matrix4x4Toperator*= (const Matrix4x4T< Scalar > &_rhs)
 self *= _rhs
Matrix4x4TleftMult (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)
const Scalar * get_raw_data () const
const Scalar * raw () const
const Scalar * data () const

Private Attributes

Scalar mat_ [16]

Detailed Description

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

Simple 4x4 Matrix. Inherited by GLMatrix.

Definition at line 95 of file MeshNode2T.cc.


Constructor & Destructor Documentation

template<class Scalar>
ACG::SceneGraph::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 110 of file MeshNode2T.cc.


Member Function Documentation

template<class Scalar>
const Scalar* ACG::SceneGraph::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 242 of file MeshNode2T.cc.


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

acg pic Project OpenFlipper, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .