Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
starsystemcamera.h
Go to the documentation of this file.
1/* Conquer Space
2 * Copyright (C) 2021-2025 Conquer Space
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17#pragma once
18
19#include <glm/glm.hpp>
20
21#include "common/universe.h"
22#include "engine/application.h"
23
24namespace cqsp::client::systems {
29 public:
31 void CalculateCameraMatrix(int window_width, int window_height);
32
33 glm::vec3 cam_pos;
34 const glm::vec3 cam_up = glm::vec3(0.0f, 0.0f, 1.0f);
35 glm::mat4 camera_matrix;
36 glm::mat4 projection;
37 glm::vec4 viewport;
38 glm::vec3 view_center;
39 double scroll;
40
41 // The angle the camera is looking from
42 float view_x = 0;
43 // The angle the camera is looking away from
44 float view_y = 0;
45};
46} // namespace cqsp::client::systems
Definition: imguidebugger.cpp:19
Definition: starsystemcamera.h:28
double scroll
Definition: starsystemcamera.h:39
glm::vec3 cam_pos
Definition: starsystemcamera.h:33
StarSystemCamera()
Definition: starsystemcamera.cpp:22
glm::mat4 camera_matrix
Definition: starsystemcamera.h:35
const glm::vec3 cam_up
Definition: starsystemcamera.h:34
float view_x
Definition: starsystemcamera.h:42
void CalculateCameraMatrix(int window_width, int window_height)
Definition: starsystemcamera.cpp:24
float view_y
Definition: starsystemcamera.h:44
glm::mat4 projection
Definition: starsystemcamera.h:36
glm::vec3 view_center
Definition: starsystemcamera.h:38
glm::vec4 viewport
Definition: starsystemcamera.h:37