Revision 1936,
962 bytes
checked in by mattausch, 18 years ago
(diff) |
cleaned up solution
|
Line | |
---|
1 | #ifndef __QTGLVIEWER_H
|
---|
2 | #define __QTGLVIEWER_H
|
---|
3 |
|
---|
4 | #ifdef USE_QT
|
---|
5 | #include <QtOpenGL>
|
---|
6 |
|
---|
7 |
|
---|
8 | namespace GtpVisibilityPreprocessor {
|
---|
9 |
|
---|
10 | class QtGlRendererWidget;
|
---|
11 |
|
---|
12 | class QtGlViewer : public QGLWidget
|
---|
13 | {
|
---|
14 |
|
---|
15 | //Q_OBJECT
|
---|
16 |
|
---|
17 | friend class QtGlRendererWidget;
|
---|
18 | friend class GlRenderer;
|
---|
19 |
|
---|
20 | public:
|
---|
21 | QtGlRendererWidget *mRenderer;
|
---|
22 |
|
---|
23 | QtGlViewer(QWidget *parent,
|
---|
24 | QtGlRendererWidget *renderer);
|
---|
25 |
|
---|
26 | virtual ~QtGlViewer(){};
|
---|
27 |
|
---|
28 | QSize minimumSizeHint() const;
|
---|
29 | QSize sizeHint() const;
|
---|
30 |
|
---|
31 | // This method has to be rendefined by all renderer implementations
|
---|
32 | virtual void RenderScene();
|
---|
33 |
|
---|
34 | protected:
|
---|
35 | void initializeGL();
|
---|
36 | void paintGL();
|
---|
37 | void resizeGL(int width, int height);
|
---|
38 | void mousePressEvent(QMouseEvent *event);
|
---|
39 | void mouseMoveEvent(QMouseEvent *event);
|
---|
40 |
|
---|
41 | void keyPressEvent ( QKeyEvent * e );
|
---|
42 |
|
---|
43 | bool mWireframe;
|
---|
44 |
|
---|
45 | private:
|
---|
46 |
|
---|
47 | float manipulatorLastQuat[4];
|
---|
48 | float scale;
|
---|
49 | QPoint lastPos;
|
---|
50 |
|
---|
51 | };
|
---|
52 |
|
---|
53 | }
|
---|
54 |
|
---|
55 | #endif
|
---|
56 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.