Morph-SynRJ

view trans_explode.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_EXPLODE_H
2 #define TRANS_EXPLODE_H
4 #include "mth_vector3.h"
5 #include "gl_header.h"
7 typedef struct transExplodeQuad
8 {
9 mth::Vector3_t Position; // Position for one quad
10 mth::Vector3_t Rotation; // Rotation for one quad
11 mth::Vector3_t Velocity; // Velocity for one quad
12 mth::Vector3_t Uvs; // Uv for one quad ... Uvs[2] will be always at 0.f !
14 float alpha; // Alpha for one quad
16 // Size for a quad - Size is computed from the center of quad to one border, so the real
17 // quad size is size*2
18 float size;
21 }transExplodeQuad;
23 class trans_Explode_t
24 {
26 public:
28 GLuint explode_map;
29 int res_x, res_y;
31 transExplodeQuad *quads;
33 trans_Explode_t(int max_x_quads, int max_y_quads);
34 ~trans_Explode_t();
36 GLuint CreateTextureTransition(int x, int y);
37 void PutOneQuad(float size, float px, float py, float pz, float u, float v, float rx, float ry, float rz);
38 void GetScene(GLuint texture);
39 void SetQuadsProperty(void);
40 void Draw(float speed);
41 void Animate(float start, float end, float speed);
43 };
45 #endif