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);
116 glm::vec3
cam_up = glm::vec3(0.0f, 1.0f, 0.0f);
141 void GetPlanetTexture(
const entt::entity entity,
bool &have_normal,
bool &have_roughness,
bool &have_province);
144 void DrawStar(
const entt::entity &entity, glm::vec3 &object_pos);
145 void RenderCities(glm::vec3 &object_pos,
const entt::entity &body_entity);
163 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:223
glm::vec4 CalculateGLPosition(const glm::vec3 &object_pos)
Calculates the GL position for a log renderbuffer.
Definition: starsystemview.cpp:839
void DrawTexturedPlanet(const glm::vec3 &object_pos, const entt::entity entity)
Definition: starsystemview.cpp:450
glm::vec4 viewport
Definition: starsystemview.h:119
cqsp::asset::ShaderProgram_t near_shader
Definition: starsystemview.h:108
void FocusOnEntity(entt::entity ent)
Definition: starsystemview.cpp:1043
int ship_icon_layer
Definition: starsystemview.h:213
void SeeStarSystem()
Definition: starsystemview.cpp:170
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:495
void DrawAllOrbits()
Definition: starsystemview.cpp:1325
int tex_r
Debugging colors
Definition: starsystemview.h:238
void GenerateOrbitLines()
Definition: starsystemview.cpp:1068
bool is_rendering_founding_city
Definition: starsystemview.h:219
void DrawOrbit(const entt::entity &entity)
Definition: starsystemview.cpp:1346
void DrawShipIcon(const glm::vec3 &object_pos)
Definition: starsystemview.cpp:434
void SelectCountry()
Definition: starsystemview.cpp:1022
void DrawAllCities(auto &bodies)
Definition: starsystemview.cpp:425
glm::vec3 GetMouseIntersectionOnObject(int mouse_x, int mouse_y)
Definition: starsystemview.cpp:1204
void InitializeMeshes()
Definition: starsystemview.cpp:744
double scroll
Definition: starsystemview.h:71
void CalculateCityPositions()
Definition: starsystemview.cpp:645
float circle_size
Definition: starsystemview.h:121
glm::vec3 GetMouseOnObject()
Definition: starsystemview.h:222
double GetDivider()
Definition: starsystemview.h:78
cqsp::asset::ShaderProgram_t model_shader
Definition: starsystemview.h:106
glm::vec3 selected_country_color
Definition: starsystemview.h:249
int tex_y
Definition: starsystemview.h:233
void OnTick()
Definition: starsystemview.cpp:116
glm::vec3 TranslateToNormalized(const glm::vec3 &)
Definition: starsystemview.cpp:833
void Update(float deltaTime)
Definition: starsystemview.cpp:200
void FoundCity()
Definition: starsystemview.cpp:1001
void Initialize()
Definition: starsystemview.cpp:101
void Render(float deltaTime)
Definition: starsystemview.cpp:124
void DrawCityIcon(const glm::vec3 &object_pos)
Definition: starsystemview.cpp:409
cqsp::engine::Renderable sun
Definition: starsystemview.h:104
float window_ratio
Definition: starsystemview.h:206
cqsp::asset::ShaderProgram_t orbit_shader
Definition: starsystemview.h:107
int tex_b
Definition: starsystemview.h:240
void OrbitEditor()
Definition: starsystemview.cpp:1403
common::components::types::SurfaceCoordinate GetMouseSurfaceIntersection()
Definition: starsystemview.cpp:1148
glm::mat4 GetBillboardMatrix(const glm::vec3 &pos)
Definition: starsystemview.cpp:854
entt::entity selected_city
Definition: starsystemview.h:227
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:791
void LoadProvinceMap()
Definition: starsystemview.cpp:742
cqsp::engine::Renderable planet_circle
Definition: starsystemview.h:101
glm::vec3 GetBillboardPosition(const glm::vec3 &object_pos)
Definition: starsystemview.cpp:862
entt::entity selected_province
Definition: starsystemview.h:251
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:1090
bool is_founding_city
Definition: starsystemview.h:218
int skybox_layer
Definition: starsystemview.h:216
void RenderSelectedObjectInformation()
Definition: starsystemview.cpp:1119
void FocusCityView()
Definition: starsystemview.cpp:803
SysStarSystemRenderer(cqsp::common::Universe &, cqsp::engine::Application &)
Definition: starsystemview.cpp:62
void DrawShips()
Definition: starsystemview.cpp:305
glm::vec3 view_center
Definition: starsystemview.h:76
static bool IsFoundingCity(common::Universe &universe)
Definition: starsystemview.cpp:1321
glm::vec3 CalculateMouseRay(const glm::vec3 &ray_nds)
Definition: starsystemview.cpp:975
double previous_mouseX
Definition: starsystemview.h:68
int province_width
Definition: starsystemview.h:243
void DrawModels()
Definition: starsystemview.cpp:344
cqsp::common::Universe & m_universe
Definition: starsystemview.h:95
void MoveCamera(double deltaTime)
Definition: starsystemview.cpp:915
void DrawStars()
Definition: starsystemview.cpp:266
void DrawPlanetBillboards(const entt::entity &ent_id, const glm::vec3 &object_pos)
Definition: starsystemview.cpp:389
bool CityIsVisible(glm::vec3 city_pos, glm::vec3 planet_pos, glm::vec3 cam_pos)
Definition: starsystemview.cpp:640
void InitializeFramebuffers()
Definition: starsystemview.cpp:733
glm::vec3 cam_pos
Definition: starsystemview.h:115
void CheckResourceDistRender()
Definition: starsystemview.cpp:946
glm::vec3 selected_province_color
Definition: starsystemview.h:248
float GetWindowRatio()
Definition: starsystemview.cpp:1066
glm::vec3 sun_color
Definition: starsystemview.h:209
float view_scale
Definition: starsystemview.h:225
glm::mat4 camera_matrix
Definition: starsystemview.h:117
void SetBillboardProjection(cqsp::asset::ShaderProgram_t &shader, glm::mat4 mat)
Definition: starsystemview.cpp:866
void DrawEntityName(glm::vec3 &object_pos, entt::entity ent_id)
Definition: starsystemview.cpp:371
glm::vec3 CalculateObjectPos(const entt::entity &)
Definition: starsystemview.cpp:820
int tex_x
Debugging mouse position
Definition: starsystemview.h:232
void DrawAllPlanetBillboards(auto &bodies)
Definition: starsystemview.cpp:544
double previous_mouseY
Definition: starsystemview.h:69
float view_y
Definition: starsystemview.h:66
engine::LayerRenderer renderer
Definition: starsystemview.h:211
void DrawSkybox()
Definition: starsystemview.cpp:330
glm::vec3 ConvertPoint(const glm::vec3 &)
Definition: starsystemview.cpp:837
glm::mat4 projection
Definition: starsystemview.h:118
glm::vec3 cam_up
Definition: starsystemview.h:116
entt::entity hovering_province
Definition: starsystemview.h:250
void RenderCities(glm::vec3 &object_pos, const entt::entity &body_entity)
Definition: starsystemview.cpp:597
entt::entity m_viewing_entity
Definition: starsystemview.h:92
cqsp::engine::Renderable planet
Definition: starsystemview.h:98
int orbits_generated
Definition: starsystemview.h:253
cqsp::engine::Renderable sky
Definition: starsystemview.h:100
void CalculateCamera()
Definition: starsystemview.cpp:907
void CalculateScroll()
Definition: starsystemview.cpp:670
void DrawBodies()
Definition: starsystemview.cpp:282
void SeePlanet(entt::entity)
Definition: starsystemview.cpp:253
void DrawPlanetIcon(glm::vec3 &object_pos)
Definition: starsystemview.cpp:382
void DrawStar(const entt::entity &entity, glm::vec3 &object_pos)
Definition: starsystemview.cpp:562
float view_x
Definition: starsystemview.h:64
const int sphere_resolution
Definition: starsystemview.h:255
cqsp::engine::Renderable textured_planet
Definition: starsystemview.h:99
int physical_layer
Definition: starsystemview.h:215
glm::vec3 sun_position
Definition: starsystemview.h:208
glm::vec3 CalculateCenteredObject(const entt::entity &)
Definition: starsystemview.cpp:903
void SeeEntity()
Definition: starsystemview.cpp:184
const double divider
Definition: starsystemview.h:205
double min_zoom
Definition: starsystemview.h:72
cqsp::asset::ShaderProgram_t vis_shader
Definition: starsystemview.h:109
void DoUI(float deltaTime)
Definition: starsystemview.cpp:258
void GenerateOrbit(entt::entity body)
Definition: starsystemview.cpp:1237
void LoadPlanetTextures()
Definition: starsystemview.cpp:685
bool GLPositionNotInBounds(const glm::vec4 &gl_Position, const glm::vec3 &pos)
Check if the GL position is within the window
Definition: starsystemview.cpp:849
void CenterCameraOnCity()
Definition: starsystemview.cpp:872
int province_height
Definition: starsystemview.h:242
void DrawAllPlanets(auto &bodies)
Definition: starsystemview.cpp:520
void CityDetection()
Definition: starsystemview.cpp:1172
glm::vec3 mouse_on_object
Definition: starsystemview.h:220
int tex_g
Definition: starsystemview.h:239
void DrawTerrainlessPlanet(const entt::entity &entity, glm::vec3 &object_pos)
Definition: starsystemview.cpp:578
int planet_icon_layer
Definition: starsystemview.h:214
void CalculateViewChange(double deltaX, double deltaY)
Definition: starsystemview.cpp:985
Definition: universe.h:34
Definition: application.h:49
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:114
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