File: GLMatrix.h

package info (click to toggle)
blockout2 2.4%2Bdfsg1-7
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 5,492 kB
  • sloc: cpp: 8,694; ansic: 147; makefile: 106
file content (40 lines) | stat: -rw-r--r-- 917 bytes parent folder | download | duplicates (4)
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
// -------------------------------------
// 3x3 Matrix class
// -------------------------------------
#include <SDL_opengl.h>

#ifndef _GLMATRIXH_
#define _GLMATRIXH_

class GLMatrix {

public:

  GLMatrix();

  void Init33(float _11,float _12,float _13,
              float _21,float _22,float _23,
              float _31,float _32,float _33);

  void Identity();
  void RotateX(float angle);
  void RotateY(float angle);
  void RotateZ(float angle);
  void Translate(float x,float y,float z);

  void Multiply(GLMatrix *m1,GLMatrix *m2);
  void Multiply(GLMatrix *m2);

  void TransfomVec(float x,float y,float z,float w,float *rx,float *ry,float *rz,float *rw);

  GLfloat *GetGL();
  void FromGL(GLfloat *m);

  float _11;float _12;float _13;float _14;
  float _21;float _22;float _23;float _24;
  float _31;float _32;float _33;float _34;
  float _41;float _42;float _43;float _44;

};

#endif /* _GLMATRIXH_ */