-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSceneViewer.h
62 lines (43 loc) · 1.12 KB
/
SceneViewer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Copyright (C) Thorsten Thormaehlen 2010
#ifndef DEF_SCENEVIEWER_H
#define DEF_SCENEVIEWER_H
#include <QtGui/qwidget.h>
#include <QtGui/qapplication.h>
#include <QtOpenGL/qgl.h>
#include <QtGui/qlayout.h>
#include <QtGui/qcolordialog.h>
#include <QtGui/qcolor.h>
#include <QtGui/qcheckbox.h>
#include <QtGui/qlineedit.h>
#include <QtGui/qevent.h>
#include "CTMesh.h"
/*!
\class SceneViewer SceneViewer.h
\brief User Interface widget that renders the scene.
*/
class GLWidget : public QGLWidget
{
Q_OBJECT
public:
GLWidget(CMesh *imesh, QWidget *parent = 0);
~GLWidget();
QSize minimumSizeHint() const;
QSize sizeHint() const;
void setXRotation(int angle);
void setYRotation(int angle);
void setZRotation(int angle);
void paintGL(CMesh *mesh);
protected:
void initializeGL();
void resizeGL(int width, int height);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
private:
void normalizeAngle(int *angle);
int xRot, yRot, zRot;
QPoint lastPos;
QColor qtGreen;
QColor qtPurple;
CMesh *glmesh;
};
#endif