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.
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
cqsp::client::systems::StarSystemController Class Reference

#include <starsystemcontroller.h>

Public Member Functions

 StarSystemController (common::Universe &, engine::Application &, StarSystemCamera &)
 
void Update (float delta_time)
 
glm::vec3 GetMouseOnObjectPosition ()
 
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 period More...
 
bool ShouldDrawCityPrototype ()
 
const glm::vec3 & SelectedProvinceColor ()
 
glm::vec3 CalculateCenteredObject (const entt::entity &)
 
glm::vec3 CalculateCenteredObject (const glm::vec3 &)
 
glm::vec3 CalculateObjectPos (const entt::entity &ent)
 
void PreRender ()
 

Public Attributes

entt::entity m_viewing_entity = entt::null
 

Private Member Functions

void SeeEntity ()
 
void CenterCameraOnCity ()
 
void MoveCamera (double delta_time)
 
void FocusOnEntity (entt::entity ent)
 
void SeePlanet (entt::entity ent)
 
void CalculateScroll ()
 
float GetScrollValue ()
 
void FocusPlanetView ()
 
void FocusCityView ()
 
void CalculateCityPositions ()
 
void CityDetection ()
 
void FoundCity ()
 
bool IsFoundingCity ()
 
glm::vec3 CalculateMouseRay (const glm::vec3 &ray_nds)
 
entt::entity GetMouseOnObject (int mouse_x, int mouse_y)
 
void CalculateViewChange (double deltaX, double deltaY)
 
common::components::types::SurfaceCoordinate GetMouseSurfaceIntersection ()
 
glm::vec3 GetMouseIntersectionOnObject (int mouse_x, int mouse_y)
 
glm::vec3 GetMouseInScreenSpace (int mouse_x, int mouse_y)
 
std::optional< glm::vec3 > CheckIntersection (const glm::vec3 &object_pos, const glm::vec3 &ray_wor, float radius)
 
void SelectCountry ()
 

Private Attributes

common::Universeuniverse
 
engine::Applicationapp
 
StarSystemCameracamera
 
entt::entity terrain_displaying = entt::null
 
entt::entity selected_city = entt::null
 
double previous_mouseX
 
double previous_mouseY
 
entt::entity on_planet = entt::null
 
int tex_x
 Debugging mouse position More...
 
int tex_y
 
int tex_r
 Debugging colors More...
 
int tex_g
 
int tex_b
 
entt::entity hovering_province
 
entt::entity selected_province
 
glm::vec3 hovering_province_color
 
glm::vec3 selected_province_color
 
glm::vec3 mouse_on_object
 
bool is_rendering_founding_city
 
bool is_founding_city
 
const float CAMERA_MOVEMENT_SPEED = 30.f / 40.f
 
const float PAN_SPEED = 4.0f
 
const float SCROLL_SENSITIVITY = 3.f / 33.f
 
friend StarSystemViewUI
 

Constructor & Destructor Documentation

◆ StarSystemController()

cqsp::client::systems::StarSystemController::StarSystemController ( common::Universe _u,
engine::Application _a,
StarSystemCamera _c 
)

Member Function Documentation

◆ CalculateCenteredObject() [1/2]

glm::vec3 cqsp::client::systems::StarSystemController::CalculateCenteredObject ( const entt::entity &  ent)

◆ CalculateCenteredObject() [2/2]

glm::vec3 cqsp::client::systems::StarSystemController::CalculateCenteredObject ( const glm::vec3 &  vec)

◆ CalculateCityPositions()

void cqsp::client::systems::StarSystemController::CalculateCityPositions ( )
private

◆ CalculateMouseRay()

glm::vec3 cqsp::client::systems::StarSystemController::CalculateMouseRay ( const glm::vec3 &  ray_nds)
private

◆ CalculateObjectPos()

glm::vec3 cqsp::client::systems::StarSystemController::CalculateObjectPos ( const entt::entity &  ent)

◆ CalculateScroll()

void cqsp::client::systems::StarSystemController::CalculateScroll ( )
private

◆ CalculateViewChange()

void cqsp::client::systems::StarSystemController::CalculateViewChange ( double  deltaX,
double  deltaY 
)
private

◆ CenterCameraOnCity()

void cqsp::client::systems::StarSystemController::CenterCameraOnCity ( )
private

◆ CheckIntersection()

std::optional< glm::vec3 > cqsp::client::systems::StarSystemController::CheckIntersection ( const glm::vec3 &  object_pos,
const glm::vec3 &  ray_wor,
float  radius 
)
private

◆ CityDetection()

void cqsp::client::systems::StarSystemController::CityDetection ( )
private

◆ FocusCityView()

void cqsp::client::systems::StarSystemController::FocusCityView ( )
private

◆ FocusOnEntity()

void cqsp::client::systems::StarSystemController::FocusOnEntity ( entt::entity  ent)
private

◆ FocusPlanetView()

void cqsp::client::systems::StarSystemController::FocusPlanetView ( )
private

◆ FoundCity()

void cqsp::client::systems::StarSystemController::FoundCity ( )
private

◆ GetBodyRotation()

glm::quat cqsp::client::systems::StarSystemController::GetBodyRotation ( double  axial,
double  rotation,
double  day_offset 
)

Gets the quaternion to calculate the planet's rotation from the axial rotation and the rotation period

Parameters
axialAxial rotation in radians
rotationRotation period in seconds

◆ GetMouseInScreenSpace()

glm::vec3 cqsp::client::systems::StarSystemController::GetMouseInScreenSpace ( int  mouse_x,
int  mouse_y 
)
private

◆ GetMouseIntersectionOnObject()

glm::vec3 cqsp::client::systems::StarSystemController::GetMouseIntersectionOnObject ( int  mouse_x,
int  mouse_y 
)
private

◆ GetMouseOnObject()

entt::entity cqsp::client::systems::StarSystemController::GetMouseOnObject ( int  mouse_x,
int  mouse_y 
)
private

◆ GetMouseOnObjectPosition()

glm::vec3 cqsp::client::systems::StarSystemController::GetMouseOnObjectPosition ( )
inline

◆ GetMouseSurfaceIntersection()

SurfaceCoordinate cqsp::client::systems::StarSystemController::GetMouseSurfaceIntersection ( )
private

◆ GetScrollValue()

float cqsp::client::systems::StarSystemController::GetScrollValue ( )
private

◆ IsFoundingCity()

bool cqsp::client::systems::StarSystemController::IsFoundingCity ( )
private

◆ MoveCamera()

void cqsp::client::systems::StarSystemController::MoveCamera ( double  delta_time)
private

◆ PreRender()

void cqsp::client::systems::StarSystemController::PreRender ( )

◆ SeeEntity()

void cqsp::client::systems::StarSystemController::SeeEntity ( )
private

◆ SeePlanet()

void cqsp::client::systems::StarSystemController::SeePlanet ( entt::entity  ent)
private

◆ SelectCountry()

void cqsp::client::systems::StarSystemController::SelectCountry ( )
private

◆ SelectedProvinceColor()

const glm::vec3 & cqsp::client::systems::StarSystemController::SelectedProvinceColor ( )

◆ ShouldDrawCityPrototype()

bool cqsp::client::systems::StarSystemController::ShouldDrawCityPrototype ( )

◆ Update()

void cqsp::client::systems::StarSystemController::Update ( float  delta_time)

Member Data Documentation

◆ app

engine::Application& cqsp::client::systems::StarSystemController::app
private

◆ camera

StarSystemCamera& cqsp::client::systems::StarSystemController::camera
private

◆ CAMERA_MOVEMENT_SPEED

const float cqsp::client::systems::StarSystemController::CAMERA_MOVEMENT_SPEED = 30.f / 40.f
private

◆ hovering_province

entt::entity cqsp::client::systems::StarSystemController::hovering_province
private

◆ hovering_province_color

glm::vec3 cqsp::client::systems::StarSystemController::hovering_province_color
private

◆ is_founding_city

bool cqsp::client::systems::StarSystemController::is_founding_city
private

◆ is_rendering_founding_city

bool cqsp::client::systems::StarSystemController::is_rendering_founding_city
private

◆ m_viewing_entity

entt::entity cqsp::client::systems::StarSystemController::m_viewing_entity = entt::null

◆ mouse_on_object

glm::vec3 cqsp::client::systems::StarSystemController::mouse_on_object
private

◆ on_planet

entt::entity cqsp::client::systems::StarSystemController::on_planet = entt::null
private

◆ PAN_SPEED

const float cqsp::client::systems::StarSystemController::PAN_SPEED = 4.0f
private

◆ previous_mouseX

double cqsp::client::systems::StarSystemController::previous_mouseX
private

◆ previous_mouseY

double cqsp::client::systems::StarSystemController::previous_mouseY
private

◆ SCROLL_SENSITIVITY

const float cqsp::client::systems::StarSystemController::SCROLL_SENSITIVITY = 3.f / 33.f
private

◆ selected_city

entt::entity cqsp::client::systems::StarSystemController::selected_city = entt::null
private

◆ selected_province

entt::entity cqsp::client::systems::StarSystemController::selected_province
private

◆ selected_province_color

glm::vec3 cqsp::client::systems::StarSystemController::selected_province_color
private

◆ StarSystemViewUI

friend cqsp::client::systems::StarSystemController::StarSystemViewUI
private

◆ terrain_displaying

entt::entity cqsp::client::systems::StarSystemController::terrain_displaying = entt::null
private

◆ tex_b

int cqsp::client::systems::StarSystemController::tex_b
private

◆ tex_g

int cqsp::client::systems::StarSystemController::tex_g
private

◆ tex_r

int cqsp::client::systems::StarSystemController::tex_r
private

Debugging colors

◆ tex_x

int cqsp::client::systems::StarSystemController::tex_x
private

Debugging mouse position

◆ tex_y

int cqsp::client::systems::StarSystemController::tex_y
private

◆ universe

common::Universe& cqsp::client::systems::StarSystemController::universe
private

The documentation for this class was generated from the following files: