-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglwidget.h
More file actions
46 lines (36 loc) · 950 Bytes
/
glwidget.h
File metadata and controls
46 lines (36 loc) · 950 Bytes
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
#ifndef GLWIDGET_H
#define GLWIDGET_H
#include <QGLWidget>
#include "plyloader.h"
class GLWidget : public QGLWidget
{
Q_OBJECT
public:
explicit GLWidget(QWidget *parent = 0);
~GLWidget();
int pointSize;
void setPoint(int psize);
protected:
void initializeGL();
void resizeGL(int width = 300, int height =300);
void paintGL();
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseDoubleClickEvent(QMouseEvent *event);
void wheelEvent(QWheelEvent *event);
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
private:
void draw();
void SetupLights();
void createGradient();
void drawBackground(QPainter *painter);
GLfloat rotationX;
GLfloat rotationY;
GLfloat rotationZ;
QPoint lastPos;
PlyLoader *plyloader;
QRadialGradient gradient;
QColor backColor;
};
#endif // GLWIDGET_H