diff options
author | Aki <please@ignore.pl> | 2022-05-03 20:47:59 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-05-03 20:47:59 +0200 |
commit | 313b7a531106c623a28883db515f245a74a5fafb (patch) | |
tree | c839eb081a45310cf30d44849bf85097797f944e /View.h | |
parent | c610c4b94eda867a3f0b083038502dccb8116170 (diff) | |
download | derelict-313b7a531106c623a28883db515f245a74a5fafb.zip derelict-313b7a531106c623a28883db515f245a74a5fafb.tar.gz derelict-313b7a531106c623a28883db515f245a74a5fafb.tar.bz2 |
Moved view functionality into own class
Diffstat (limited to 'View.h')
-rw-r--r-- | View.h | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -0,0 +1,27 @@ +#pragma once + +#include <memory> +#include <vector> + +#include <raylib.h> + +#include "Source.h" + + +class View +{ +public: + explicit View(std::unique_ptr<Source> source); + void update(float dt); + void draw() const; +private: + struct Projected + { + Vector2 pos; + Vector2 base; + float depth; + }; + Camera m_camera; + std::unique_ptr<Source> m_source; + std::vector<Projected> m_projected; +}; |