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