forked from ghlingjun/microseismic-data-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcoordsyswidget.h
57 lines (46 loc) · 1.21 KB
/
coordsyswidget.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
#ifndef COORDSYSWIDGET_H
#define COORDSYSWIDGET_H
#include <QtOpenGL>
#define POINTSNUM 100
#define MAXCOORD 10
class CoordSysWidget : public QGLWidget
{
Q_OBJECT
public:
CoordSysWidget(QWidget *parent = 0);
CoordSysWidget(QWidget *parent, GLfloat vertexs[POINTSNUM][3], QString names[]);
public slots:
void setXRotation(int angle);
void setYRotation(int angle);
void setZRotation(int angle);
signals:
void xRotationChanged(int angle);
void yRotationChanged(int angle);
void zRotationChanged(int angle);
protected:
void initializeGL();
void resizeGL(int width, int height);
void paintGL();
void timerEvent(QTimerEvent *);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
private slots:
// void advenceCoord();
private:
// GLuint makeCoords(const GLfloat *reflectanc);
void display();
void drawCoords(); //GLdouble angle
void drawPoints();
void drawGrid();
void normalizeAngle(int *angle);
void move();
GLfloat points[POINTSNUM][3];
QString pointNames[POINTSNUM];
// int pointNum;
int xRot;
int yRot;
int zRot;
int coordRot;
QPoint lastPos;
};
#endif // COORDSYSWIDGET_H