Debian Codegraph @

src/context/applets/analyzer/plugin/DiscoAnalyzer.h

raw
1 /****************************************************************************************
2 * Copyright (c) 2004 Enrico Ros <[email protected]> *
3 * *
4 * This program is free software; you can redistribute it and/or modify it under *
5 * the terms of the GNU General Public License as published by the Free Software *
6 * Foundation; either version 2 of the License, or (at your option) any later *
7 * version. *
8 * *
9 * This program is distributed in the hope that it will be useful, but WITHOUT ANY *
10 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A *
11 * PARTICULAR PURPOSE. See the GNU General Public License for more details. *
12 * *
13 * You should have received a copy of the GNU General Public License along with *
14 * this program. If not, see <http://www.gnu.org/licenses/>. *
15 ****************************************************************************************/
16
17 #ifndef DISCO_ANALYZER_H
18 #define DISCO_ANALYZER_H
19
20
21 #include "AnalyzerBase.h"
22
23
24
25 class DiscoAnalyzer : public Analyzer::Base
26 {
27 public:
28 explicit DiscoAnalyzer( QWidget * );
29 ~DiscoAnalyzer();
30 void analyze( const QVector<float>& );
31
32 protected:
33 void demo();
34 void initializeGL();
35 void resizeGL( int w, int h );
36 void paintGL();
37
38 private:
39 struct ShowProperties
40 {
41 bool paused;
42 double timeStamp;
43 double dT;
44 double pauseTimer;
45 float rotDegrees;
46 } m_show;
47
48 struct FrameProperties
49 {
50 float energy;
51 float dEnergy;
52 float meanBand;
53 float rotDegrees;
54 bool silence;
55 } m_frame;
56
57 GLuint m_dotTexture;
58 GLuint m_w1Texture;
59 GLuint m_w2Texture;
60 float m_unitX, m_unitY;
61
62 void drawDot( float x, float y, float size );
63 void drawFullDot( float r, float g, float b, float a );
64 void setTextureMatrix( float rot, float scale );
65 };
66
67 #endif