Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Classes | Namespaces
GraphAutoLayout.h File Reference

Hierarchical (Sugiyama-inspired) auto-layout for VS task graphs (Phase 6). More...

#include <vector>
#include <cstdint>
#include "../TaskSystem/TaskGraphTemplate.h"
+ Include dependency graph for GraphAutoLayout.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Olympe::GraphAutoLayout
 Applies a hierarchical layout to a TaskGraphTemplate in place. More...
 
struct  Olympe::GraphAutoLayout::Layer
 A single layer in the hierarchical layout. More...
 

Namespaces

namespace  Olympe
 < Provides AssetID and INVALID_ASSET_ID
 

Detailed Description

Hierarchical (Sugiyama-inspired) auto-layout for VS task graphs (Phase 6).

Author
Olympe Engine
Date
2026-03-09

Assigns positions to TaskNodeDefinition nodes in a TaskGraphTemplate so that the graph can be read top-to-bottom. The EntryPoint node is placed at the root (top), and nodes are arranged into layers based on their distance from the entry point in the exec-connection graph.

Algorithm summary (Sugiyama-inspired):

  1. BFS from the EntryPoint node → assign each node a layer index.
  2. Within each layer, order nodes by ascending NodeID (stable).
  3. Assign (x, y) screen-space positions using fixed spacing constants.
  4. Positions are stored in the Parameters map under "__posX" / "__posY".

C++14 compliant — no std::optional, structured bindings, std::filesystem.

Definition in file GraphAutoLayout.h.