17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-01 02:19:05 +01:00

feat(roads): road node with generated lanes, surface and markings

This commit is contained in:
2026-10-03 17:35:08 +02:00
parent 3eb1f42e8e
commit 2f417fddcc
12 changed files with 1166 additions and 3 deletions

View File

@@ -747,7 +747,7 @@ save_result node_layers::save(std::vector<std::string> const &Rootstatements)
};
for (auto *path : simulation::Paths.sequence())
{
if (path == nullptr || (path->iCategoryFlag & 0x80) != 0 || path->from_template())
if (path == nullptr || (path->iCategoryFlag & 0x80) != 0 || path->m_road != nullptr || path->from_template())
{
continue;
}

View File

@@ -145,6 +145,9 @@ public:
// replaces the renderable geometry handle (used by the editor when it re-uploads terrain geometry)
void
geometry( gfx::geometry_handle const &Handle );
// set lighting (used by generated geometry painted with plain colour)
void
lighting( lighting_data const &Lighting );
// data access
shapenode_data const &
data() const;
@@ -176,6 +179,12 @@ void
shape_node::geometry( gfx::geometry_handle const &Handle ) {
m_data.geometry = Handle;
}
// set lighting
inline
void
shape_node::lighting( lighting_data const &Lighting ) {
m_data.lighting = Lighting;
}
// data access
inline
shape_node::shapenode_data const &