-
Notifications
You must be signed in to change notification settings - Fork 6
/
camera.hpp
48 lines (38 loc) · 887 Bytes
/
camera.hpp
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// camera.hpp
// Simpleton Engine
//
// Created by Indi Kernick on 15/11/17.
// Copyright © 2017 Indi Kernick. All rights reserved.
//
#ifndef engine_camera_2d_camera_hpp
#define engine_camera_2d_camera_hpp
#include <tuple>
#include <memory>
#include <utility>
#include "target.hpp"
#include "animate.hpp"
#include "transform.hpp"
namespace Cam2D {
class Camera {
public:
Camera() = default;
void setPos(glm::vec2);
void setZoom(float);
void setAngle(float);
template <typename... Args>
void update(Params, Args &&...);
Transform transform;
private:
Props props;
template <size_t... TARGET_IDX, size_t... ANIM_IDX, typename Tuple>
void updateImpl(
Params,
std::index_sequence<TARGET_IDX...>,
std::index_sequence<ANIM_IDX...>,
const Tuple &
);
};
}
#include "camera.inl"
#endif