31 void mouseMoveEvent(QMouseEvent* event) override; |
31 void mouseMoveEvent(QMouseEvent* event) override; |
32 void wheelEvent(QWheelEvent* event) override; |
32 void wheelEvent(QWheelEvent* event) override; |
33 Model* const model; |
33 Model* const model; |
34 DocumentManager* const documents; |
34 DocumentManager* const documents; |
35 const ldraw::ColorTable& colorTable; |
35 const ldraw::ColorTable& colorTable; |
36 gl::Compiler* const compiler; |
36 BoundingBox boundingBox; |
|
37 gl::ModelShaders shaders; |
37 ldraw::id_t highlighted = ldraw::NULL_ID; |
38 ldraw::id_t highlighted = ldraw::NULL_ID; |
38 std::optional<glm::vec3> screenToModelCoordinates(const QPoint& point, const geom::Plane& plane) const; |
39 std::optional<glm::vec3> screenToModelCoordinates(const QPoint& point, const geom::Plane& plane) const; |
39 QPointF modelToScreenCoordinates(const glm::vec3& point) const; |
40 QPointF modelToScreenCoordinates(const glm::vec3& point) const; |
40 geom::Line<3> cameraLine(const QPoint& point) const; |
41 geom::Line<3> cameraLine(const QPoint& point) const; |
41 glm::vec3 unproject(const glm::vec3& win) const; |
42 glm::vec3 unproject(const glm::vec3& win) const; |
51 void modelMatrixChanged(const glm::mat4& newMatrix); |
52 void modelMatrixChanged(const glm::mat4& newMatrix); |
52 void viewMatrixChanged(const glm::mat4& newMatrix); |
53 void viewMatrixChanged(const glm::mat4& newMatrix); |
53 void renderPreferencesChanged(); |
54 void renderPreferencesChanged(); |
54 private: |
55 private: |
55 void setFragmentStyle(gl::FragmentStyle fragStyle); |
56 void setFragmentStyle(gl::FragmentStyle fragStyle); |
56 void renderAllArrays(); |
|
57 void renderScene(); |
57 void renderScene(); |
58 void updateViewMatrix(); |
58 void updateViewMatrix(); |
59 void updateModelMatrix(); |
59 void updateModelMatrix(); |
60 void setupBackgroundColor(); |
|
61 Q_SLOT void build(); |
60 Q_SLOT void build(); |
62 double zoom = 1.0; |
61 double zoom = 1.0; |
63 bool initialized = false; |
62 bool initialized = false; |
64 bool needBuild = true; |
63 bool needBuild = true; |
65 void renderVao(const gl::ArrayClass arrayClass); |
64 void renderVao(const gl::ArrayClass arrayClass); |