16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 03:09:18 +02:00

switch state visualisation, semaphore tracking for map purposes

This commit is contained in:
milek7
2019-02-22 22:21:23 +01:00
parent 2bacb941c0
commit 939aa73384
14 changed files with 141 additions and 25 deletions

View File

@@ -608,13 +608,19 @@ basic_cell::create_geometry( gfx::geometrybank_handle const &Bank ) {
m_geometrycreated = true; // helper for legacy animation code, get rid of it after refactoring
}
void basic_cell::create_map_geometry(std::vector<gfx::basic_vertex> &Bank)
void basic_cell::create_map_geometry(std::vector<gfx::basic_vertex> &Bank, const gfx::geometrybank_handle Extra)
{
if (!m_active)
return;
for (auto *path : m_paths)
path->create_map_geometry(Bank);
path->create_map_geometry(Bank, Extra);
}
void basic_cell::get_map_active_switches(std::vector<gfx::geometrybank_handle> &handles)
{
for (auto *path : m_paths)
path->get_map_active_switches(handles);
}
// executes event assigned to specified launcher
@@ -926,11 +932,17 @@ void basic_section::create_map_geometry(const gfx::geometrybank_handle handle)
{
std::vector<gfx::basic_vertex> lines;
for (auto &cell : m_cells)
cell.create_map_geometry(lines);
cell.create_map_geometry(lines, handle);
m_map_geometryhandle = GfxRenderer.Insert(lines, handle, GL_LINES);
}
void basic_section::get_map_active_switches(std::vector<gfx::geometrybank_handle> &handles)
{
for (auto &cell : m_cells)
cell.get_map_active_switches(handles);
}
// provides access to section enclosing specified point
basic_cell &
basic_section::cell( glm::dvec3 const &Location ) {