29 |
41 |
30 public: |
42 public: |
31 // This is used to construct the free camera |
43 // This is used to construct the free camera |
32 enum FreeToken { FreeCamera }; |
44 enum FreeToken { FreeCamera }; |
33 |
45 |
34 GLCamera(int glRotateX, int glRotateY, int glRotateZ, Axis localX, Axis localY, bool negatedX, bool negatedY, bool negatedDepth); |
46 GLCamera(QString name, FixedCameraParameters&& bag); |
35 GLCamera(FreeToken); |
47 GLCamera(QString name, FreeToken); |
36 |
48 |
37 Axis axisX() const; |
49 Axis axisX() const; |
38 Axis axisY() const; |
50 Axis axisY() const; |
39 Axis axisZ() const; |
51 Axis axisZ() const; |
|
52 Vertex convert2dTo3d(const QPoint& pos2d, Grid* grid = nullptr) const; |
|
53 QPoint convert3dTo2d(const Vertex& pos3d) const; |
40 double depth() const; |
54 double depth() const; |
41 int glRotate(Axis axis) const; |
55 int glRotate(Axis axis) const; |
42 bool isAxisNegated(Axis axis) const; |
56 bool isAxisNegated(Axis axis) const; |
43 Q_SLOT void rendererResized(int width, int height); |
57 const QString& name() const; |
44 const QSizeF& virtualSize() const; |
58 void pan(int xMove, int yMove); |
45 Vertex convert2dTo3d(const QPoint& pos2d, Grid* grid = nullptr) const; |
|
46 QPoint convert3dTo2d(const Vertex& pos3d) const; |
|
47 double panningX() const; |
59 double panningX() const; |
48 double panningY() const; |
60 double panningY() const; |
|
61 Q_SLOT void rendererResized(int width, int height); |
|
62 void setPanning(double x, double y); |
|
63 void setZoom(double zoom); |
|
64 const QSizeF& virtualSize() const; |
49 double zoom() const; |
65 double zoom() const; |
50 void setPanning(double x, double y); |
|
51 void pan(int xMove, int yMove); |
|
52 void zoomNotch(bool inward); |
66 void zoomNotch(bool inward); |
53 void setZoom(double zoom); |
|
54 |
67 |
55 private: |
68 private: |
|
69 QString m_name; |
56 double m_panningX = 0; |
70 double m_panningX = 0; |
57 double m_panningY = 0; |
71 double m_panningY = 0; |
58 double m_depth = 0; |
72 double m_depth = 0; |
59 double m_zoom = 30; |
73 double m_zoom = 30; |
60 QSize m_size; |
74 QSize m_size; |