PanoramaViewer
 All Classes Namespaces Files Functions Variables Macros Pages
LayerSceneGraph::Matrix4 Class Reference

#include <Matrix4.h>

Public Member Functions

 Matrix4 ()
 
 Matrix4 (GLfloat *v)
 
 Matrix4 (const Matrix4 *copy)
 
virtual ~Matrix4 ()
 
GLfloat * getValues ()
 
void setValues (GLfloat *v)
 
void scale (GLfloat x, GLfloat y, GLfloat z)
 
void translate (GLfloat x, GLfloat y, GLfloat z)
 
void rotate (GLfloat alpha, GLfloat beta, GLfloat gamma)
 
Matrix4 operator+ (Matrix4 m)
 
Matrix4 operator- (Matrix4 m)
 
Matrix4 operator* (Matrix4 m)
 
Matrix4 operator* (GLfloat n)
 
GLfloat operator[] (int i)
 

Private Attributes

GLfloat * values
 

Constructor & Destructor Documentation

LayerSceneGraph::Matrix4::Matrix4 ( )

Default constructor. Instances a identity matrix.

LayerSceneGraph::Matrix4::Matrix4 ( GLfloat *  v)

Instances a matrix with values given by the parameter.

LayerSceneGraph::Matrix4::Matrix4 ( const Matrix4 copy)

Copy constructor

LayerSceneGraph::Matrix4::~Matrix4 ( )
virtual

Member Function Documentation

GLfloat * LayerSceneGraph::Matrix4::getValues ( )

Returns a float pointer with the 16 values of this matrix

Matrix4 LayerSceneGraph::Matrix4::operator* ( Matrix4  m)

Canonical multiplication of matrices

Matrix4 LayerSceneGraph::Matrix4::operator* ( GLfloat  n)

This method multiplies this matrix for a given float number. Each value in the matrix is multiplied by the float number.

Matrix4 LayerSceneGraph::Matrix4::operator+ ( Matrix4  m)

This method adds elements of this matrix with elements of another given matrix in equivalent positions

Matrix4 LayerSceneGraph::Matrix4::operator- ( Matrix4  m)

This method subtracts elements of this matrix with elements of another given matrix in equivalent positions

GLfloat LayerSceneGraph::Matrix4::operator[] ( int  i)

Returns the value in "i" position inside the matrix. The matrix is column packed so Matrix[5] is equivalent to matrix[1][0].

void LayerSceneGraph::Matrix4::rotate ( GLfloat  alpha,
GLfloat  beta,
GLfloat  gamma 
)
void LayerSceneGraph::Matrix4::scale ( GLfloat  x,
GLfloat  y,
GLfloat  z 
)
void LayerSceneGraph::Matrix4::setValues ( GLfloat *  v)
void LayerSceneGraph::Matrix4::translate ( GLfloat  x,
GLfloat  y,
GLfloat  z 
)

Member Data Documentation

GLfloat* LayerSceneGraph::Matrix4::values
private

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