1 #ifndef BLOBS_GRAPHICS_VIEWPORT_HPP_
2 #define BLOBS_GRAPHICS_VIEWPORT_HPP_
4 #include "../math/geometry.hpp"
13 Viewport(int width, int height);
16 Viewport(const Viewport &) = delete;
17 Viewport &operator =(const Viewport &) = delete;
19 Viewport(Viewport &&) = delete;
20 Viewport &operator =(Viewport &&) = delete;
29 void Resize(int w, int h);
31 math::Ray ShootPixel(int x, int y) const noexcept {
33 ((double(x) / double(width)) * 2.0) - 1.0,
34 1.0 - ((double(y) / double(height)) * 2.0),
35 -1.0 }, { 0.0, 0.0, 1.0 });