X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FCamera.hpp;h=d1fa508da3136a5fa8a68a6f7f5f13a3a218c997;hb=3185bad87c06739e4ec19b456c7158437ba9621f;hp=2fabfc6a66a9e77dd1d8c9458d277ef8f811aeb0;hpb=b7d09e1e35ef90282c97509e0020b20db3c7ea9f;p=blank.git diff --git a/src/graphics/Camera.hpp b/src/graphics/Camera.hpp index 2fabfc6..d1fa508 100644 --- a/src/graphics/Camera.hpp +++ b/src/graphics/Camera.hpp @@ -1,7 +1,7 @@ #ifndef BLANK_GRAPHICS_CAMERA_HPP_ #define BLANK_GRAPHICS_CAMERA_HPP_ -#include +#include "glm.hpp" namespace blank { @@ -11,16 +11,15 @@ class Camera { public: Camera() noexcept; - void Viewport(int width, int height) noexcept; - void Viewport(int x, int y, int width, int height) noexcept; - /// FOV in radians void FOV(float f) noexcept; void Aspect(float r) noexcept; void Aspect(float w, float h) noexcept; void Clip(float near, float far) noexcept; - const glm::mat4 &Projection() noexcept { return projection; } + const glm::mat4 &Projection() const noexcept { return projection; } + const glm::mat4 &View() const noexcept { return view; } + void View(const glm::mat4 &v) noexcept; private: void UpdateProjection() noexcept; @@ -28,10 +27,11 @@ private: private: float fov; float aspect; - float near_clip; - float far_clip; + float near; + float far; glm::mat4 projection; + glm::mat4 view; };