src/gl/partrenderer.h

changeset 73
97df974b5ed5
parent 71
198d25fe4e21
child 86
4bec0525ef1b
equal deleted inserted replaced
72:7c27cda03747 73:97df974b5ed5
21 const ldraw::ColorTable& colorTable, 21 const ldraw::ColorTable& colorTable,
22 QWidget* parent = nullptr); 22 QWidget* parent = nullptr);
23 ~PartRenderer() override; 23 ~PartRenderer() override;
24 void setRenderPreferences(const gl::RenderPreferences& newPreferences); 24 void setRenderPreferences(const gl::RenderPreferences& newPreferences);
25 protected: 25 protected:
26 ldraw::Id pick(const QPoint& where); 26 ldraw::id_t pick(const QPoint& where);
27 void initializeGL() override; 27 void initializeGL() override;
28 void resizeGL(int width, int height) override; 28 void resizeGL(int width, int height) override;
29 void paintGL() override; 29 void paintGL() override;
30 void mouseMoveEvent(QMouseEvent* event) override; 30 void mouseMoveEvent(QMouseEvent* event) override;
31 void wheelEvent(QWheelEvent* event) override; 31 void wheelEvent(QWheelEvent* event) override;
32 Model* const model; 32 Model* const model;
33 DocumentManager* const documents; 33 DocumentManager* const documents;
34 const ldraw::ColorTable& colorTable; 34 const ldraw::ColorTable& colorTable;
35 gl::Compiler* const compiler; 35 gl::Compiler* const compiler;
36 ldraw::Id highlighted = ldraw::NULL_ID; 36 ldraw::id_t highlighted = ldraw::NULL_ID;
37 std::optional<glm::vec3> screenToModelCoordinates(const QPoint& point, const geom::Plane& plane) const; 37 std::optional<glm::vec3> screenToModelCoordinates(const QPoint& point, const geom::Plane& plane) const;
38 QPointF modelToScreenCoordinates(const glm::vec3& point) const; 38 QPointF modelToScreenCoordinates(const glm::vec3& point) const;
39 geom::Line<3> cameraLine(const QPoint& point) const; 39 geom::Line<3> cameraLine(const QPoint& point) const;
40 glm::vec3 unproject(const glm::vec3& win) const; 40 glm::vec3 unproject(const glm::vec3& win) const;
41 glm::mat4 projectionMatrix; 41 glm::mat4 projectionMatrix;

mercurial