30#include "entt/entt.hpp"
54 void Render(
float deltaTime);
57 void Update(
float deltaTime);
59 void DoUI(
float deltaTime);
85 void DrawOrbit(
const entt::entity &entity);
117 glm::vec3
cam_up = glm::vec3(0.0f, 1.0f, 0.0f);
142 void GetPlanetTexture(
const entt::entity entity,
bool &have_normal,
bool &have_roughness,
bool &have_province);
145 void DrawStar(
const entt::entity &entity, glm::vec3 &object_pos);
146 void RenderCities(glm::vec3 &object_pos,
const entt::entity &body_entity);
164 glm::quat
GetBodyRotation(
double axial,
double rotation,
double day_offset);
Definition: starsystemview.h:49
entt::entity terrain_displaying
Definition: starsystemview.h:93
entt::entity on_planet
Definition: starsystemview.h:224
glm::vec4 CalculateGLPosition(const glm::vec3 &object_pos)
Calculates the GL position for a log renderbuffer.
Definition: starsystemview.cpp:831
void DrawTexturedPlanet(const glm::vec3 &object_pos, const entt::entity entity)
Definition: starsystemview.cpp:441
glm::vec4 viewport
Definition: starsystemview.h:120
cqsp::asset::ShaderProgram_t near_shader
Definition: starsystemview.h:109
void FocusOnEntity(entt::entity ent)
Definition: starsystemview.cpp:1035
int ship_icon_layer
Definition: starsystemview.h:214
void SeeStarSystem()
Definition: starsystemview.cpp:169
cqsp::engine::Application & m_app
Definition: starsystemview.h:96
void GetPlanetTexture(const entt::entity entity, bool &have_normal, bool &have_roughness, bool &have_province)
Definition: starsystemview.cpp:486
void DrawAllOrbits()
Definition: starsystemview.cpp:1317
int tex_r
Debugging colors
Definition: starsystemview.h:239
void GenerateOrbitLines()
Definition: starsystemview.cpp:1060
cqsp::asset::Model * iss_model
Definition: starsystemview.h:105
bool is_rendering_founding_city
Definition: starsystemview.h:220
void DrawOrbit(const entt::entity &entity)
Definition: starsystemview.cpp:1338
void DrawShipIcon(const glm::vec3 &object_pos)
Definition: starsystemview.cpp:425
void SelectCountry()
Definition: starsystemview.cpp:1014
void DrawAllCities(auto &bodies)
Definition: starsystemview.cpp:416
glm::vec3 GetMouseIntersectionOnObject(int mouse_x, int mouse_y)
Definition: starsystemview.cpp:1196
void InitializeMeshes()
Definition: starsystemview.cpp:735
double scroll
Definition: starsystemview.h:71
void CalculateCityPositions()
Definition: starsystemview.cpp:636
float circle_size
Definition: starsystemview.h:122
glm::vec3 GetMouseOnObject()
Definition: starsystemview.h:223
double GetDivider()
Definition: starsystemview.h:78
cqsp::asset::ShaderProgram_t model_shader
Definition: starsystemview.h:107
glm::vec3 selected_country_color
Definition: starsystemview.h:250
int tex_y
Definition: starsystemview.h:234
void OnTick()
Definition: starsystemview.cpp:115
glm::vec3 TranslateToNormalized(const glm::vec3 &)
Definition: starsystemview.cpp:825
void Update(float deltaTime)
Definition: starsystemview.cpp:199
void FoundCity()
Definition: starsystemview.cpp:993
void Initialize()
Definition: starsystemview.cpp:100
void Render(float deltaTime)
Definition: starsystemview.cpp:123
void DrawCityIcon(const glm::vec3 &object_pos)
Definition: starsystemview.cpp:400
cqsp::engine::Renderable sun
Definition: starsystemview.h:104
float window_ratio
Definition: starsystemview.h:207
cqsp::asset::ShaderProgram_t orbit_shader
Definition: starsystemview.h:108
int tex_b
Definition: starsystemview.h:241
void OrbitEditor()
Definition: starsystemview.cpp:1395
common::components::types::SurfaceCoordinate GetMouseSurfaceIntersection()
Definition: starsystemview.cpp:1140
glm::mat4 GetBillboardMatrix(const glm::vec3 &pos)
Definition: starsystemview.cpp:846
entt::entity selected_city
Definition: starsystemview.h:228
glm::quat GetBodyRotation(double axial, double rotation, double day_offset)
Gets the quaternion to calculate the planet's rotation from the axial rotation and the rotation perio...
Definition: starsystemview.cpp:783
void LoadProvinceMap()
Definition: starsystemview.cpp:733
cqsp::engine::Renderable planet_circle
Definition: starsystemview.h:101
glm::vec3 GetBillboardPosition(const glm::vec3 &object_pos)
Definition: starsystemview.cpp:854
entt::entity selected_province
Definition: starsystemview.h:252
cqsp::engine::Renderable city
Definition: starsystemview.h:103
cqsp::engine::Renderable ship_overlay
Definition: starsystemview.h:102
double max_zoom
Definition: starsystemview.h:74
void RenderInformationWindow(double deltaTime)
Definition: starsystemview.cpp:1082
bool is_founding_city
Definition: starsystemview.h:219
int skybox_layer
Definition: starsystemview.h:217
void RenderSelectedObjectInformation()
Definition: starsystemview.cpp:1111
void FocusCityView()
Definition: starsystemview.cpp:795
SysStarSystemRenderer(cqsp::common::Universe &, cqsp::engine::Application &)
Definition: starsystemview.cpp:61
void DrawShips()
Definition: starsystemview.cpp:304
glm::vec3 view_center
Definition: starsystemview.h:76
static bool IsFoundingCity(common::Universe &universe)
Definition: starsystemview.cpp:1313
glm::vec3 CalculateMouseRay(const glm::vec3 &ray_nds)
Definition: starsystemview.cpp:967
double previous_mouseX
Definition: starsystemview.h:68
int province_width
Definition: starsystemview.h:244
void DrawModels()
Definition: starsystemview.cpp:343
cqsp::common::Universe & m_universe
Definition: starsystemview.h:95
void MoveCamera(double deltaTime)
Definition: starsystemview.cpp:907
void DrawStars()
Definition: starsystemview.cpp:265
void DrawPlanetBillboards(const entt::entity &ent_id, const glm::vec3 &object_pos)
Definition: starsystemview.cpp:380
bool CityIsVisible(glm::vec3 city_pos, glm::vec3 planet_pos, glm::vec3 cam_pos)
Definition: starsystemview.cpp:631
void InitializeFramebuffers()
Definition: starsystemview.cpp:724
glm::vec3 cam_pos
Definition: starsystemview.h:116
void CheckResourceDistRender()
Definition: starsystemview.cpp:938
glm::vec3 selected_province_color
Definition: starsystemview.h:249
float GetWindowRatio()
Definition: starsystemview.cpp:1058
glm::vec3 sun_color
Definition: starsystemview.h:210
float view_scale
Definition: starsystemview.h:226
glm::mat4 camera_matrix
Definition: starsystemview.h:118
void SetBillboardProjection(cqsp::asset::ShaderProgram_t &shader, glm::mat4 mat)
Definition: starsystemview.cpp:858
void DrawEntityName(glm::vec3 &object_pos, entt::entity ent_id)
Definition: starsystemview.cpp:362
glm::vec3 CalculateObjectPos(const entt::entity &)
Definition: starsystemview.cpp:812
int tex_x
Debugging mouse position
Definition: starsystemview.h:233
void DrawAllPlanetBillboards(auto &bodies)
Definition: starsystemview.cpp:535
double previous_mouseY
Definition: starsystemview.h:69
float view_y
Definition: starsystemview.h:66
engine::LayerRenderer renderer
Definition: starsystemview.h:212
void DrawSkybox()
Definition: starsystemview.cpp:329
glm::vec3 ConvertPoint(const glm::vec3 &)
Definition: starsystemview.cpp:829
glm::mat4 projection
Definition: starsystemview.h:119
glm::vec3 cam_up
Definition: starsystemview.h:117
entt::entity hovering_province
Definition: starsystemview.h:251
void RenderCities(glm::vec3 &object_pos, const entt::entity &body_entity)
Definition: starsystemview.cpp:588
entt::entity m_viewing_entity
Definition: starsystemview.h:92
cqsp::engine::Renderable planet
Definition: starsystemview.h:98
int orbits_generated
Definition: starsystemview.h:254
cqsp::engine::Renderable sky
Definition: starsystemview.h:100
void CalculateCamera()
Definition: starsystemview.cpp:899
void CalculateScroll()
Definition: starsystemview.cpp:661
void DrawBodies()
Definition: starsystemview.cpp:281
void SeePlanet(entt::entity)
Definition: starsystemview.cpp:252
void DrawPlanetIcon(glm::vec3 &object_pos)
Definition: starsystemview.cpp:373
void DrawStar(const entt::entity &entity, glm::vec3 &object_pos)
Definition: starsystemview.cpp:553
float view_x
Definition: starsystemview.h:64
const int sphere_resolution
Definition: starsystemview.h:256
cqsp::engine::Renderable textured_planet
Definition: starsystemview.h:99
int physical_layer
Definition: starsystemview.h:216
glm::vec3 sun_position
Definition: starsystemview.h:209
glm::vec3 CalculateCenteredObject(const entt::entity &)
Definition: starsystemview.cpp:895
void SeeEntity()
Definition: starsystemview.cpp:183
const double divider
Definition: starsystemview.h:206
double min_zoom
Definition: starsystemview.h:72
cqsp::asset::ShaderProgram_t vis_shader
Definition: starsystemview.h:110
void DoUI(float deltaTime)
Definition: starsystemview.cpp:257
void GenerateOrbit(entt::entity body)
Definition: starsystemview.cpp:1229
void LoadPlanetTextures()
Definition: starsystemview.cpp:676
bool GLPositionNotInBounds(const glm::vec4 &gl_Position, const glm::vec3 &pos)
Check if the GL position is within the window
Definition: starsystemview.cpp:841
void CenterCameraOnCity()
Definition: starsystemview.cpp:864
int province_height
Definition: starsystemview.h:243
void DrawAllPlanets(auto &bodies)
Definition: starsystemview.cpp:511
void CityDetection()
Definition: starsystemview.cpp:1164
glm::vec3 mouse_on_object
Definition: starsystemview.h:221
int tex_g
Definition: starsystemview.h:240
void DrawTerrainlessPlanet(const entt::entity &entity, glm::vec3 &object_pos)
Definition: starsystemview.cpp:569
int planet_icon_layer
Definition: starsystemview.h:215
void CalculateViewChange(double deltaX, double deltaY)
Definition: starsystemview.cpp:977
Definition: universe.h:32
Definition: application.h:47
Renders a series of framebuffers onto screen. This is a relatively simple way of allowing organizatio...
Definition: framebuffer.h:133
Definition: renderable.h:28
std::shared_ptr< ShaderProgram > ShaderProgram_t
The preferred way of using a shader program.
Definition: shader.h:112
When adding assets, it is extremely crucial that you read cqsp::asset::AssetLoader::LoadResources to ...
Definition: clientctx.h:21
Definition: starsystemview.h:44
Definition: starsystemview.h:42
Definition: starsystemview.h:40
Definition: starsystemview.h:37
Longitude and lattitude. Planet coordinates.
Definition: coordinates.h:76
common::Universe * universe
Definition: turnsavewindow.h:3