diff -r a4055f67b9c7 -r cb81ecb5fb23 src/gl/partrenderer.h --- a/src/gl/partrenderer.h Thu Feb 13 15:25:01 2020 +0200 +++ b/src/gl/partrenderer.h Wed Feb 26 02:21:07 2020 +0200 @@ -35,15 +35,20 @@ const ldraw::ColorTable& colorTable; gl::Compiler* const compiler; ldraw::Id highlighted = ldraw::NULL_ID; + std::optional cameraToGrid(const QPoint& point); + QPointF worldToCamera(const glm::vec3& point); private: void setFragmentStyle(gl::FragmentStyle fragStyle); void renderAllArrays(); void renderScene(); void updateViewMatrix(); + void updateModelMatrix(); + void setupBackgroundColor(); QPointF lastMousePosition; gl::RenderPreferences renderPreferences; glm::mat4 projectionMatrix; glm::mat4 viewMatrix; + glm::mat3 viewportMatrix; glm::quat modelQuaternion; std::optional gridProgram; static constexpr double MIN_ZOOM = 0.0;