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