source: GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlViewer.h @ 2657

Revision 2657, 1.1 KB checked in by mattausch, 17 years ago (diff)
Line 
1#ifndef __QTGLVIEWER_H
2#define __QTGLVIEWER_H
3
4#include <QtOpenGL>
5#include "Vector3.h"
6#include "Matrix4x4.h"
7
8
9namespace GtpVisibilityPreprocessor
10{
11
12class QtGlRendererWidget;
13
14
15class QtGlViewer : public QGLWidget
16{
17        //Q_OBJECT
18
19        friend class QtGlRendererWidget;
20        friend class GlRenderer;
21
22public:
23        QtGlRendererWidget *mRenderer;
24
25        QtGlViewer(QWidget *parent,
26                       QtGlRendererWidget *renderer);
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
38protected:
39        void initializeGL();
40        void paintGL();
41        void resizeGL(int width, int height);
42        void mousePressEvent(QMouseEvent *event);
43        void mouseMoveEvent(QMouseEvent *event);
44
45        void keyPressEvent(QKeyEvent * e);
46
47        bool mWireframe;
48
49        int timerId;
50
51        Vector3 mDummyViewPoint;
52
53        Matrix4x4 mModelMatrix;
54
55private:
56
57        float manipulatorLastQuat[4];
58        float scale;
59        QPoint lastPos;
60};
61
62}
63
64#endif
Note: See TracBrowser for help on using the repository browser.