aboutsummaryrefslogtreecommitdiff
path: root/source/Camera.hpp
blob: 8cfcd0d94714b990e2a89e233c5562792a6c27f8 (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
#pragma once

#include <glm/glm.hpp>
#include <string>

class Camera {
public:
	std::string name;
	glm::vec3 eye;
	glm::vec3 target;
	bool perspective;

public:
	Camera();

	void SetEyePos(glm::vec3 pos);
	void SetTargetPos(glm::vec3 pos);
	void SetTargetDirection(glm::vec3 lookVector);

	bool HasPerspective() const { return perspective; }
	void SetHasPerspective(bool perspective);

	glm::mat4 CalcViewMatrix() const;
	glm::mat4 CalcProjectionMatrix() const;
};