Krig Game Engine
Loading...
Searching...
No Matches
Matrix.h
Go to the documentation of this file.
1
8#ifndef _MATRIX_H_
9#define _MATRIX_H_
10
11#include <math.h>
12#include <stdio.h>
13
14#define NUM_CELLS 16 // 4 X 4
15
16class Matrix {
17 public:
18 float data[NUM_CELLS];
19
20 Matrix();
21 Matrix(const Matrix&);
23 Matrix(
24 const float &, const float &, const float &, const float &,
25 const float &, const float &, const float &, const float &,
26 const float &, const float &, const float &, const float &,
27 const float &, const float &, const float &, const float &
28 );
29
30 void loadIdentity();
31 void loadZero();
32
33 void operator =(const Matrix &);
34 Matrix operator *(const Matrix &);
35
36 void transpose(Matrix&);
37 void setTranslation(const float &, const float &, const float &);
38 void setScale(const float &, const float &, const float &);
39 void setShadow(float lightPos[4], float plane[4]);
40 void transformVertex(float* , float*);
41 void display();
42
43 void fix();
44};
45
46#endif