source:
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlViewer.h
@
2743
Revision 2743, 1.1 KB checked in by mattausch, 16 years ago (diff) |
---|
Rev | Line | |
---|---|---|
[1931] | 1 | #ifndef __QTGLVIEWER_H |
2 | #define __QTGLVIEWER_H | |
3 | ||
4 | #include <QtOpenGL> | |
[2566] | 5 | #include "Vector3.h" |
[2567] | 6 | #include "Matrix4x4.h" |
[1931] | 7 | |
[2567] | 8 | |
[2562] | 9 | namespace GtpVisibilityPreprocessor |
10 | { | |
[1931] | 11 | |
12 | class QtGlRendererWidget; | |
13 | ||
[2562] | 14 | |
[2657] | 15 | class QtGlViewer : public QGLWidget |
[1931] | 16 | { |
[2562] | 17 | //Q_OBJECT |
[1984] | 18 | |
[1931] | 19 | friend class QtGlRendererWidget; |
20 | friend class GlRenderer; | |
21 | ||
22 | public: | |
23 | QtGlRendererWidget *mRenderer; | |
[2562] | 24 | |
[1931] | 25 | QtGlViewer(QWidget *parent, |
[2566] | 26 | QtGlRendererWidget *renderer); |
[2562] | 27 | |
28 | virtual ~QtGlViewer(){}; | |
29 | ||
30 | QSize minimumSizeHint() const; | |
31 | QSize sizeHint() const; | |
32 | ||
33 | // This method has to be rendefined by all renderer implementations | |
34 | virtual void RenderScene(); | |
35 | ||
36 | void timerEvent(QTimerEvent *event); | |
37 | ||
[1931] | 38 | protected: |
[2562] | 39 | void initializeGL(); |
40 | void paintGL(); | |
41 | void resizeGL(int width, int height); | |
42 | void mousePressEvent(QMouseEvent *event); | |
43 | void mouseMoveEvent(QMouseEvent *event); | |
[1931] | 44 | |
[2566] | 45 | void keyPressEvent(QKeyEvent * e); |
[1931] | 46 | |
[2562] | 47 | |
[2743] | 48 | /////////////// |
49 | ||
50 | bool mWireFrame; | |
51 | ||
[2562] | 52 | int timerId; |
53 | ||
[2566] | 54 | Vector3 mDummyViewPoint; |
55 | ||
[2567] | 56 | Matrix4x4 mModelMatrix; |
57 | ||
[1931] | 58 | private: |
59 | ||
60 | float manipulatorLastQuat[4]; | |
[2562] | 61 | float scale; |
62 | QPoint lastPos; | |
[1931] | 63 | }; |
64 | ||
65 | } | |
66 | ||
67 | #endif |
Note: See TracBrowser
for help on using the repository browser.