PageRenderTime 33ms CodeModel.GetById 15ms app.highlight 15ms RepoModel.GetById 1ms app.codeStats 0ms

/xbmc/visualizations/XBMCProjectM/libprojectM/PresetFrameIO.hpp

http://github.com/xbmc/xbmc
C++ Header | 194 lines | 140 code | 42 blank | 12 comment | 0 complexity | 13dd8a6cb6589599fe5135599bd72a9d MD5 | raw file
  1#ifndef PRESET_FRAME_IO_HPP
  2#define PRESET_FRAME_IO_HPP
  3#include <vector>
  4class CustomWave;
  5class CustomShape;
  6
  7
  8/// Container class for all preset writeable engine variables. This is the important glue 
  9/// between the presets and renderer to facilitate smooth preset switching
 10/// Every preset object needs a reference to one of these.
 11class PresetOutputs {
 12public:
 13    typedef std::vector<CustomWave*> cwave_container;
 14    typedef std::vector<CustomShape*> cshape_container;
 15
 16    cwave_container customWaves;
 17    cshape_container customShapes;
 18
 19    void Initialize(int gx, int gy);
 20    PresetOutputs();
 21    ~PresetOutputs();
 22    /* PER FRAME VARIABLES BEGIN */
 23    float zoom;
 24    float zoomexp;
 25    float rot;
 26    float warp;
 27
 28    float sx;
 29    float sy;
 30    float dx;
 31    float dy;
 32    float cx;
 33    float cy;
 34
 35    float decay;
 36
 37    float wave_r;
 38    float wave_g;
 39    float wave_b;
 40    float wave_o;
 41    float wave_x;
 42    float wave_y;
 43    float wave_mystery;
 44
 45    float ob_size;
 46    float ob_r;
 47    float ob_g;
 48    float ob_b;
 49    float ob_a;
 50
 51    float ib_size;
 52    float ib_r;
 53    float ib_g;
 54    float ib_b;
 55    float ib_a;
 56
 57    float mv_a ;
 58    float mv_r ;
 59    float mv_g ;
 60    float mv_b ;
 61    float mv_l;
 62    float mv_x;
 63    float mv_y;
 64    float mv_dy;
 65    float mv_dx;
 66
 67    int gy,gx;
 68    /* PER_FRAME VARIABLES END */
 69
 70    float fRating;
 71    float fGammaAdj;
 72    float fVideoEchoZoom;
 73    float fVideoEchoAlpha;
 74
 75    int nVideoEchoOrientation;
 76    int nWaveMode;
 77
 78    bool bAdditiveWaves;
 79    bool bWaveDots;
 80    bool bWaveThick;
 81    bool bModWaveAlphaByVolume;
 82    bool bMaximizeWaveColor;
 83    bool bTexWrap;
 84    bool bDarkenCenter;
 85    bool bRedBlueStereo;
 86    bool bBrighten;
 87    bool bDarken;
 88    bool bSolarize;
 89    bool bInvert;
 90    bool bMotionVectorsOn;
 91
 92
 93    float fWaveAlpha ;
 94    float fWaveScale;
 95    float fWaveSmoothing;
 96    float fWaveParam;
 97    float fModWaveAlphaStart;
 98    float fModWaveAlphaEnd;
 99    float fWarpAnimSpeed;
100    float fWarpScale;
101    float fShader;
102
103    /* Q VARIABLES START */
104
105    float q1;
106    float q2;
107    float q3;
108    float q4;
109    float q5;
110    float q6;
111    float q7;
112    float q8;
113
114
115    /* Q VARIABLES END */
116
117    float **zoom_mesh;
118    float **zoomexp_mesh;
119    float **rot_mesh;
120
121    float **sx_mesh;
122    float **sy_mesh;
123    float **dx_mesh;
124    float **dy_mesh;
125    float **cx_mesh;
126    float **cy_mesh;
127    float **warp_mesh;
128
129
130    float **x_mesh;
131    float **y_mesh;
132
133  float wavearray[2048][2];
134  float wavearray2[2048][2];
135 
136  int wave_samples;
137  bool two_waves;
138  bool draw_wave_as_loop;
139  double wave_rot;
140  double wave_scale;
141  
142
143};
144
145/// Container for all *read only* engine variables a preset requires to 
146/// evaluate milkdrop equations. Every preset object needs a reference to one of these.
147class PresetInputs {
148
149public:
150    /* PER_PIXEL VARIBLES BEGIN */
151
152    float x_per_pixel;
153    float y_per_pixel;
154    float rad_per_pixel;
155    float ang_per_pixel;
156
157    /* PER_PIXEL VARIBLES END */
158
159    int fps;
160
161
162    float time;
163    float bass;
164    float mid;
165    float treb;
166    float bass_att;
167    float mid_att;
168    float treb_att;
169    int frame;
170    float progress;
171
172
173    /* variables were added in milkdrop 1.04 */
174    int gx,gy;
175
176    float **x_mesh;
177    float **y_mesh;
178    float **rad_mesh;
179    float **theta_mesh;
180
181    float **origtheta;  //grid containing interpolated mesh reference values
182    float **origrad;
183    float **origx;  //original mesh
184    float **origy;
185
186    float mood_r, mood_g, mood_b;
187
188    void ResetMesh();
189    ~PresetInputs();
190    PresetInputs();
191    void Initialize(int gx, int gy);
192};
193
194#endif