Symphony Of Empires
|
#include <orbit_camera.hpp>
Public Member Functions | |
OrbitCamera (glm::vec2 _screen_size, glm::vec2 _map_size, float _radius) | |
OrbitCamera (const Camera &_camera, float _radius) | |
void | move (float x_dir, float y_dir, float z_dir) override |
Move the camera in the specified direction. Uses the map coordinate system, where the Z-axis is the map zoom. More... | |
void | update () override |
Update the movement of the camera. Used for smooth camera movement. More... | |
void | set_pos (float x, float y) override |
Set the map position of the camera. More... | |
glm::mat4 | get_view () const override |
Get the view matrix. More... | |
glm::vec3 | get_map_pos () const override |
Get the map position of the camera. More... | |
bool | get_cursor_map_pos (glm::ivec2 mouse_pos, glm::ivec2 &out_pos) const override |
Get the cursors position on the map. More... | |
glm::vec3 | get_tile_world_pos (glm::vec2 tile_pos) const override |
Get the tiles world position. More... | |
Public Member Functions inherited from Eng3D::Camera | |
constexpr | Camera (glm::vec2 _screen_size, glm::vec2 _map_size) |
Camera (const Camera &camera) | |
virtual | ~Camera ()=default |
void | set_screen (const int width, const int height) |
Set the width and height of the screen. More... | |
glm::vec3 | get_world_pos () const |
Get the world positions of the camera. More... | |
glm::vec2 | get_map_size () const |
Get the size of the map. More... | |
virtual glm::mat4 | get_projection () const |
Get the projection matrix. More... | |
virtual glm::vec2 | get_tile_screen_pos (glm::vec2 tile_pos) const |
Get the tiles position on the screen. More... | |
Public Attributes | |
float | radius |
float | circumference |
float | zoom_dist |
glm::vec3 | target |
ValueChase< glm::vec3 > | chase { 0.2f } |
Public Attributes inherited from Eng3D::Camera | |
float | fov = 45.0f |
float | near_plane = 1.0f |
float | far_plane = 20000.0f |
Additional Inherited Members | |
Protected Attributes inherited from Eng3D::Camera | |
glm::vec3 | map_position |
glm::vec3 | world_position |
glm::vec2 | screen_size |
glm::vec2 | map_size |
Definition at line 37 of file orbit_camera.hpp.
|
inline |
Definition at line 45 of file orbit_camera.hpp.
|
inline |
Definition at line 53 of file orbit_camera.hpp.
|
inlineoverridevirtual |
Get the cursors position on the map.
mouse_pos | the cursor position on the screen |
out_pos | where the cursor position on the map is written to |
Implements Eng3D::Camera.
Definition at line 123 of file orbit_camera.hpp.
|
inlineoverridevirtual |
Get the map position of the camera.
Implements Eng3D::Camera.
Definition at line 117 of file orbit_camera.hpp.
|
inlineoverridevirtual |
Get the tiles world position.
Implements Eng3D::Camera.
Definition at line 157 of file orbit_camera.hpp.
|
inlineoverridevirtual |
Get the view matrix.
Implements Eng3D::Camera.
Definition at line 96 of file orbit_camera.hpp.
|
inlineoverridevirtual |
Move the camera in the specified direction. Uses the map coordinate system, where the Z-axis is the map zoom.
Implements Eng3D::Camera.
Definition at line 61 of file orbit_camera.hpp.
|
inlineoverridevirtual |
Set the map position of the camera.
Implements Eng3D::Camera.
Definition at line 89 of file orbit_camera.hpp.
|
inlineoverridevirtual |
Update the movement of the camera. Used for smooth camera movement.
Implements Eng3D::Camera.
Definition at line 70 of file orbit_camera.hpp.
ValueChase<glm::vec3> Eng3D::OrbitCamera::chase { 0.2f } |
Definition at line 43 of file orbit_camera.hpp.
float Eng3D::OrbitCamera::circumference |
Definition at line 40 of file orbit_camera.hpp.
float Eng3D::OrbitCamera::radius |
Definition at line 39 of file orbit_camera.hpp.
glm::vec3 Eng3D::OrbitCamera::target |
Definition at line 42 of file orbit_camera.hpp.
float Eng3D::OrbitCamera::zoom_dist |
Definition at line 41 of file orbit_camera.hpp.