-
Notifications
You must be signed in to change notification settings - Fork 0
/
InspectorCanvas.h
80 lines (71 loc) · 1.65 KB
/
InspectorCanvas.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
* InspectorCanvas.h
*
* Created on: Jun 2, 2010
* Author: Vincent
*/
#ifndef INSPECTORCANVAS_H_
#define INSPECTORCANVAS_H_
#include <QGLWidget>
#include <QBitmap>
#include "Matrix.h"
#include "Processor.h"
class InspectorCanvas: public QGLWidget {
Q_OBJECT
public:
InspectorCanvas(QWidget * parent = 0);
virtual ~InspectorCanvas();
double getSensitivity() const;
double getImageScale() const;
bool isImageShown() const;
public slots:
void setEye(double x, double y, double z);
void setFocus(double x, double y, double z);
void resetView();
void setSensitivity(double sensitivity);
void setUnitScale(double scale);
void setLookDownZ(bool lookZ);
void setOrthoView(bool ortho);
void setMatrix(const RealMatrix * matrix);
void setMaxColor(int color);
void setMinColor(int color);
void setUpperBorder(int color);
void setLowerBorder(int color);
protected:
void initializeGL();
void paintGL();
void resizeGL(int width, int height);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void wheelEvent(QWheelEvent * event);
signals:
void sensitivityChanged(double sensitivity);
void unitScaleChanged(double scale);
private:
QPoint lastPos;
double eyeX;
double eyeY;
double eyeZ;
double focusX;
double focusY;
double focusZ;
double sensitivity;
double imageScale;
bool imageShown;
bool lookZ;
bool ortho;
const RealMatrix * renderingMatrix;
double guideLimit;
double axisLimit;
double tickInterval;
GLfloat axisXColor[3];
GLfloat axisYColor[3];
GLfloat axisZColor[3];
int colorMax;
int colorMin;
int borderUpper;
int borderLower;
private:
void renderImage();
};
#endif /* INSPECTORCANVAS_H_ */