class Matrix

3x3 transformation matrix. More...

Definition#include <raytracer/matrix.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods

Public Members


Detailed Description

3x3 transformation matrix.

DBL a[3][3]

a[3][3]

 Matrix ()

Matrix

Create uninitialized matrix.

 Matrix (DBL d[3][3])

Matrix

Create matrix from array.

Parameters:
d3x3 array holding the matrix entries

 Matrix (int d)

Matrix

Create matrix with same entries.

Parameters:
dvalue for all elements

void  zero ()

zero

Set all matrix entries to zero.

void  transpose ()

transpose

Transpose matrix.

void  applyFromLeft (const Matrix &m)

applyFromLeft

Matrix multiplication. Calculate A = M*A.

Parameters:
mthe matrix M

Matrix  generateScaleMatrix (const Vector3 &v)

generateScaleMatrix

[static]

Create scaling matrix. Elements of v on the diagonal and zeros elsewhere.

Parameters:
vx,y,z scaling value

Matrix  generateRotationMatrix (Vector3 v)

generateRotationMatrix

[static]

Create rotation matrix.

Parameters:
vx,y,z rotation values in degrees. Rotating is first done around x then around y and finally around z axe