blob: 00a22a4fdf2b4062cce3ea4f996e9e028cd2e54a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#pragma once
#include <glm/glm.hpp>
namespace amalgine {
class ThirdPersonCamera {
public:
ThirdPersonCamera();
void zoom(float distance);
void rotate_horizontal(float radians);
void rotate_vertical(float radians);
void set_target_position(const glm::vec3 &target_pos);
glm::mat4 get_matrix() const;
glm::vec3 get_forward_vector() const;
glm::vec3 get_right_vector() const;
private:
glm::vec3 target_pos;
float camera_distance;
float angle_horizontal;
float angle_vertical;
};
}
|