summaryrefslogtreecommitdiffhomepage
path: root/View.h
blob: 56a50ca1242a838eb0b59330be4e3d9c290ec35b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#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;
    int m_grid;
    float m_timer;
};