Symphony Of Empires
MapRender Class Reference

#include <map_render.hpp>

Inheritance diagram for MapRender:
Collaboration diagram for MapRender:

Public Member Functions

 MapRender (GameState &gs, Map &map)
 
 ~MapRender ()=default
 
void update_mapmode (std::vector< ProvinceColor > &province_colors)
 
void update_nations (std::vector< ProvinceId > &nations)
 
void request_update_visibility ()
 
void draw (const Eng3D::Camera &camera, MapView view_mode)
 
void reload_shaders ()
 
void update_options (MapOptions options)
 
void update ()
 
void update_border_sdf (Eng3D::Rect update_area, glm::ivec2 window_size)
 Creates the "waving" border around the continent to give it a 19th century map feel Generate a distance field to from each border using the jump flooding algorithm Used to create borders thicker than one tile. More...
 
uint32_t get_province_opt (const ProvinceId id)
 
ProvinceId get_tile_province_id (glm::ivec2 pos)
 
ProvinceId get_tile_province_id (size_t x, size_t y)
 
- Public Member Functions inherited from Eng3D::BaseMap
 BaseMap (Eng3D::State &s, glm::ivec2 size)
 
 ~BaseMap ()
 

Public Attributes

MapOptions options
 
- Public Attributes inherited from Eng3D::BaseMap
friend MapRender
 

Detailed Description

Definition at line 80 of file map_render.hpp.

Constructor & Destructor Documentation

◆ MapRender()

MapRender::MapRender ( GameState gs,
Map map 
)

Definition at line 65 of file map_render.cpp.

Here is the call graph for this function:

◆ ~MapRender()

MapRender::~MapRender ( )
default

Member Function Documentation

◆ draw()

void MapRender::draw ( const Eng3D::Camera camera,
MapView  view_mode 
)

Definition at line 463 of file map_render.cpp.

Here is the call graph for this function:

◆ get_province_opt()

uint32_t MapRender::get_province_opt ( const ProvinceId  id)
inline

Definition at line 114 of file map_render.hpp.

◆ get_tile_province_id() [1/2]

ProvinceId MapRender::get_tile_province_id ( glm::ivec2  pos)
inline

Definition at line 118 of file map_render.hpp.

Here is the caller graph for this function:

◆ get_tile_province_id() [2/2]

ProvinceId MapRender::get_tile_province_id ( size_t  x,
size_t  y 
)
inline

Definition at line 121 of file map_render.hpp.

Here is the call graph for this function:

◆ reload_shaders()

void MapRender::reload_shaders ( )

Definition at line 132 of file map_render.cpp.

Here is the call graph for this function:

◆ request_update_visibility()

void MapRender::request_update_visibility ( )

Definition at line 381 of file map_render.cpp.

◆ update()

void MapRender::update ( )

Definition at line 426 of file map_render.cpp.

Here is the call graph for this function:

◆ update_border_sdf()

void MapRender::update_border_sdf ( Eng3D::Rect  update_area,
glm::ivec2  window_size 
)

Creates the "waving" border around the continent to give it a 19th century map feel Generate a distance field to from each border using the jump flooding algorithm Used to create borders thicker than one tile.

Definition at line 251 of file map_render.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_mapmode()

void MapRender::update_mapmode ( std::vector< ProvinceColor > &  province_colors)

Definition at line 342 of file map_render.cpp.

◆ update_nations()

void MapRender::update_nations ( std::vector< ProvinceId > &  nations)

Definition at line 357 of file map_render.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_options()

void MapRender::update_options ( MapOptions  options)

Definition at line 164 of file map_render.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ options

MapOptions MapRender::options

Definition at line 112 of file map_render.hpp.


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