Newer
Older
Niklas Yann Wettengel
committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*******************************************************************************
* mat3.h
*
* (C) 2007 AG Aktives Sehen <agas@uni-koblenz.de>
* Universitaet Koblenz-Landau
*
* Author: Frank Neuhaus, Susanne Maur
*******************************************************************************/
#define THIS CMat3
//----------------------------------------------------------------------------------------------------------
inline THIS::CMat3()
{
for(int i=0;i<9;i++) fMatrix[i]=0.0f;
}
//----------------------------------------------------------------------------------------------------------
inline THIS::CMat3( float xx, float xy, float xz, float yx, float yy, float yz, float zx, float zy, float zz )
{
fMatrix[0] = xx;
fMatrix[1] = xy;
fMatrix[2] = xz;
fMatrix[3] = yx;
fMatrix[4] = yy;
fMatrix[5] = yz;
fMatrix[6] = zx;
fMatrix[7] = zy;
fMatrix[8] = zz;
}
//----------------------------------------------------------------------------------------------------------
inline float& THIS::operator [](const unsigned value) {
return fMatrix[value];
}
//----------------------------------------------------------------------------------------------------------
inline float THIS::valueAt(unsigned i) const {
return fMatrix[i];
}
//----------------------------------------------------------------------------------------------------------
inline void THIS::setValue(unsigned line, unsigned column, float value) {
m[line][column] = value;
}
//----------------------------------------------------------------------------------------------------------
#undef THIS