src/glrenderer.h

changeset 1171
430ffa371d2a
parent 1170
2045a395213a
child 1176
07b574a4e31d
equal deleted inserted replaced
1170:2045a395213a 1171:430ffa371d2a
76 public: 76 public:
77 GLRenderer(const Model* model, QWidget* parent = nullptr); 77 GLRenderer(const Model* model, QWidget* parent = nullptr);
78 ~GLRenderer(); 78 ~GLRenderer();
79 79
80 Camera camera() const; 80 Camera camera() const;
81 QByteArray capturePixels();
82 GLCamera& currentCamera(); 81 GLCamera& currentCamera();
83 const GLCamera& currentCamera() const; 82 const GLCamera& currentCamera() const;
84 Qt::KeyboardModifiers keyboardModifiers() const; 83 Qt::KeyboardModifiers keyboardModifiers() const;
85 const Model* model() const; 84 const Model* model() const;
86 QPoint const& mousePosition() const; 85 QPoint const& mousePosition() const;
88 LDObject* objectAtCursor() const; 87 LDObject* objectAtCursor() const;
89 QSet<LDObject*> pick(const QRect& range); 88 QSet<LDObject*> pick(const QRect& range);
90 LDObject* pick(int mouseX, int mouseY); 89 LDObject* pick(int mouseX, int mouseY);
91 void resetAllAngles(); 90 void resetAllAngles();
92 void resetAngles(); 91 void resetAngles();
92 QImage screenCapture();
93 void setBackground(); 93 void setBackground();
94 void setCamera(Camera cam); 94 void setCamera(Camera cam);
95 QPen textPen() const; 95 QPen textPen() const;
96 96
97 static const QPen thinBorderPen; 97 static const QPen thinBorderPen;
143 Qt::MouseButtons m_lastButtons; 143 Qt::MouseButtons m_lastButtons;
144 Qt::KeyboardModifiers m_currentKeyboardModifiers; 144 Qt::KeyboardModifiers m_currentKeyboardModifiers;
145 QGenericMatrix<4, 4, GLfloat> m_rotationMatrix; 145 QGenericMatrix<4, 4, GLfloat> m_rotationMatrix;
146 GLCamera m_cameras[7]; 146 GLCamera m_cameras[7];
147 bool m_useDarkBackground = false; 147 bool m_useDarkBackground = false;
148 bool m_takingScreenCapture = false;
149 bool m_panning = false; 148 bool m_panning = false;
150 bool m_initialized = false; 149 bool m_initialized = false;
151 bool m_isDrawingSelectionScene = false; 150 bool m_isDrawingSelectionScene = false;
152 bool m_isCameraMoving = false; 151 bool m_isCameraMoving = false;
153 bool m_needZoomToFit = true; 152 bool m_needZoomToFit = true;

mercurial