Morph-SynRJ
view efx_screen1.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 EFX_SCREEN1_H
2 #define EFX_SCREEN1_H
5 #include "cmn_texture.h"
6 #include "efx_equa.h"
7 #include "efx_harmonics.h"
8 #include "mth_hermite.h"
9 #include "cmn_design.h"
11 // sync
12 #include "fxSync.h"
14 #define WAVE
16 class efxScreen1_t
17 {
18 double internalTime;
20 GLuint texture;
22 efxEqua_t* fxEqua;
23 float equaLightIntensity;
24 int equaResX;
25 int equaResY;
26 uchar* mapOfNoise;
27 int equaCenter;
28 bool equaTransition;
29 bool equaTransitionFinished;
30 float equaAlpha;
32 void InitDesign();
33 void InitEquaLand(int _sizex,int sizey,uchar* _map,int _mapSizeX,int _mapSizeY);
34 void DrawEquaOnce(int _i/*,GLenum _mode=GL_QUADS*/);
35 void DrawEquaFullExceptCenter();
36 void DrawEquaCenter();
39 #ifdef WAVE
40 int currentWaveBuffer;
41 float* waveSimulation[2];
42 float speedOfWave;
43 float viscosity;
44 float timeStepSimulation;
45 float counterSimulation;
46 float f1;
47 float f2;
48 float k1;
49 float k2;
50 float k3;
52 void InitSimulation(float _timeStep,float _speedOfWave,float _viscosity,float _sizeCell);
53 void Simulate();
54 void UpdateWave();
55 void UpdateWaveBuffer();
57 #endif
59 // camera
60 mth::Hermite_t* cameraPath;
61 mth::HermiteKey_t* cameraKeyData;
62 mth::Vector3_t cameraLookAt;
63 mth::Vector3_t cameraPosition;
64 mth::Vector3_t cameraUp;
65 float cameraRestoreAngle;
69 void DisplayBackground();
70 void DrawEqua();
71 void DisplayDesign();
75 cmnDesign_t design;
76 cmnDesignElementTexturedQuad_t* designElements;
77 int nbDesignElements;
80 public:
82 efxScreen1_t();
85 void Init();
87 void Update();
88 void Draw();
90 efxEqua_t * GetFxEqua() { return &fxEqua[equaCenter];}
91 efxSpherical_t * GetFxSpherical() { return 0;}
94 };
97 #endif
