Morph-SynRJ

view trans_puzzle.h @ 0:22de913c2d84

morph-synrj intro
author "Cedric Pinson <cedric.pinson@alcove.fr> <mornifle@plopbyte.net>"
date Tue Nov 27 15:23:52 2007 +0100 (2007-11-27)
parents
children
line source
1 #ifndef TRANS_PUZZLE_H
2 #define TRANS_PUZZLE_H
4 #include "gl_header.h"
5 #include "cmn_texture.h"
6 #include "mth_vector3.h"
7 #include "mth_vector2.h"
9 struct transPuzzleElement_t
10 {
11 mth::Vector2_t uvs;
12 mth::Vector2_t uvsVec;
13 mth::Vector3_t position;
14 mth::Vector3_t rotation;
15 float angle;
16 float size[2];
17 float start;
19 void Draw(bool _reverse=false);
20 };
25 class transPuzzle_t
26 {
27 double internalTime;
29 GLuint texture[2];
31 transPuzzleElement_t* elements;
32 int nbElements;
34 int resX;
35 int resY;
37 bool started;
39 public:
41 transPuzzle_t(){}
42 void Init(int _xsection,int _ysection);
45 void GetBuffer1();
46 void GetBuffer2();
47 void Draw();
48 void Update(float _time);
50 bool Started() { return started;}
51 void Start() { started=true;}
53 };
55 #endif