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

4x4 matrix implementing OpenGL commands. More...

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

List of all members.

Public Types

typedef VectorT< Scalar, 3 > Vec3

Public Member Functions

 GLMatrixT ()
 constructor: uninitialized values
template<class OtherScalar >
 GLMatrixT (const GLMatrixT< OtherScalar > _rhs)
 construct from other matrix type
 GLMatrixT (const Scalar _array[16])
 ~GLMatrixT ()
 destructor
template<typename otherScalar >
GLMatrixT< Scalar > & operator= (const GLMatrixT< otherScalar > &_rhs)
 assignement from other matrix type
template<typename otherScalar >
GLMatrixT< Scalar > & operator= (const Matrix4x4T< otherScalar > &_rhs)
 assignement from other matrix type
void scale (Scalar _x, Scalar _y, Scalar _z, MultiplyFrom _mult_from=MULT_FROM_RIGHT)
 multiply self with scaling matrix (x,y,z)
void scale (const Vec3 &_v, MultiplyFrom _mult_from=MULT_FROM_RIGHT)
 multiply self with scaling matrix (x,y,z)
void translate (Scalar _x, Scalar _y, Scalar _z, MultiplyFrom _mult_from=MULT_FROM_RIGHT)
 multiply self with translation matrix (x,y,z)
void translate (const Vec3 &_v, MultiplyFrom _mult_from=MULT_FROM_RIGHT)
 multiply self with translation matrix (x,y,z)
void rotate (Scalar angle, Scalar x, Scalar y, Scalar z, MultiplyFrom _mult_from=MULT_FROM_RIGHT)
void rotate (Scalar _angle, const Vec3 &_axis, MultiplyFrom _mult_from=MULT_FROM_RIGHT)
void rotateX (Scalar _angle, MultiplyFrom _mult_from=MULT_FROM_RIGHT)
 multiply self with a rotation matrix (angle in degree, x-axis)
void rotateY (Scalar _angle, MultiplyFrom _mult_from=MULT_FROM_RIGHT)
 multiply self with a rotation matrix (angle in degree, y-axis)
void rotateZ (Scalar _angle, MultiplyFrom _mult_from=MULT_FROM_RIGHT)
 multiply self with a rotation matrix (angle in degree, z-axis)
void lookAt (const Vec3 &eye, const Vec3 &center, const Vec3 &up)
void inverse_lookAt (const Vec3 &eye, const Vec3 &center, const Vec3 &up)
 multiply self from left with inverse lookAt matrix
void perspective (Scalar fovY, Scalar aspect, Scalar near_plane, Scalar far_plane)
 multiply self with a perspective projection matrix
void inverse_perspective (Scalar fovY, Scalar aspect, Scalar near_plane, Scalar far_plane)
 multiply self from left with inverse of perspective projection matrix
void frustum (Scalar left, Scalar right, Scalar bottom, Scalar top, Scalar near_plane, Scalar far_plane)
 multiply self with a perspective projection matrix
void inverse_frustum (Scalar left, Scalar right, Scalar bottom, Scalar top, Scalar near_plane, Scalar far_plane)
 multiply self from left with inverse of perspective projection matrix
void ortho (Scalar left, Scalar right, Scalar bottom, Scalar top, Scalar near_plane, Scalar far_plane)
 multiply self with orthographic projection matrix
void inverse_ortho (Scalar left, Scalar right, Scalar bottom, Scalar top, Scalar near_plane, Scalar far_plane)
 multiply self from left with inverse orthographic projection matrix
GLMatrixToperator+= (const Matrix4x4T< Scalar > &_rhs)
 self += _rhs
GLMatrixToperator-= (const Matrix4x4T< Scalar > &_rhs)
 self -= _rhs
GLMatrixToperator*= (const Matrix4x4T< Scalar > &_rhs)
 self *= _rhs
GLMatrixTleftMult (const Matrix4x4T< Scalar > &_rhs)
 multiply from left: self = _rhs * self
GLMatrixT operator+ (const Matrix4x4T< Scalar > &_rhs) const
 self + _rhs
GLMatrixT operator- (const Matrix4x4T< Scalar > &_rhs) const
 self - _rhs
GLMatrixT operator* (const Matrix4x4T< Scalar > &_rhs) const
 self * _rhs
template<typename T >
VectorT< T, 4 > operator* (const VectorT< T, 4 > &_v) const
 matrix by vector multiplication

Private Types

enum  Axis { X, Y, Z }

Private Member Functions

void rotateXYZ (Axis _axis, Scalar _angle, MultiplyFrom _mult_from)

Detailed Description

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

4x4 matrix implementing OpenGL commands.

Definition at line 75 of file MeshNode2T.cc.


Constructor & Destructor Documentation

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


Member Function Documentation

template<class Scalar>
void ACG::SceneGraph::ACG::GLMatrixT< Scalar >::lookAt ( const Vec3 &  eye,
const Vec3 &  center,
const Vec3 &  up 
)

multiply self with a viewing transformation given by eye position, reference point (center) and an up vector. (similar to gluLookAt)

template<class Scalar>
void ACG::SceneGraph::ACG::GLMatrixT< Scalar >::rotate ( Scalar  _angle,
const Vec3 &  _axis,
MultiplyFrom  _mult_from = MULT_FROM_RIGHT 
) [inline]

multiply self with a rotation matrix (angle in degree, arbitrary axis given by xyz)

Definition at line 137 of file MeshNode2T.cc.

template<class Scalar>
void ACG::SceneGraph::ACG::GLMatrixT< Scalar >::rotate ( Scalar  angle,
Scalar  x,
Scalar  y,
Scalar  z,
MultiplyFrom  _mult_from = MULT_FROM_RIGHT 
)

multiply self with a rotation matrix (angle in degree, arbitrary axis given by xyz)


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

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