source:
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlViewer.h
@
2657
Revision 2657, 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 | bool mWireframe; |
48 | ||
49 | int timerId; | |
50 | ||
[2566] | 51 | Vector3 mDummyViewPoint; |
52 | ||
[2567] | 53 | Matrix4x4 mModelMatrix; |
54 | ||
[1931] | 55 | private: |
56 | ||
57 | float manipulatorLastQuat[4]; | |
[2562] | 58 | float scale; |
59 | QPoint lastPos; | |
[1931] | 60 | }; |
61 | ||
62 | } | |
63 | ||
64 | #endif |
Note: See TracBrowser
for help on using the repository browser.