Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Classes | Static Public Member Functions | Private Member Functions | Static Private Member Functions | List of all members
Olympe::NodeGraph::SharedGraphRenderer Class Reference

Renderer shared by BlueprintEditor and RuntimeDebugger. More...

#include <SharedGraphRenderer.h>

Classes

struct  Config
 Rendering configuration knobs. More...
 

Static Public Member Functions

static Config MakeEditorConfig ()
 Returns the default configuration for the BlueprintEditor (full-edit mode).
 
static Config MakeDebuggerConfig ()
 Returns the default configuration for the Runtime Debugger (read-only mode).
 
static void Render (GraphDocument *doc, const EditorContext &ctx, const Config &cfg, int activeNodeID=-1)
 Renders the graph inside the current ImGui window.
 
static void RenderBlackboardPanel (const LocalBlackboard *bb)
 Renders the blackboard variables panel.
 

Private Member Functions

 SharedGraphRenderer ()
 

Static Private Member Functions

static void RenderNode (const NodeData &node, const Config &cfg, int activeNodeID)
 Renders a single node.
 
static void RenderLink (const LinkData &link)
 Renders a single link between two nodes.
 
static void RenderToolbar (GraphDocument *doc, const EditorContext &ctx)
 Renders the graph toolbar (save/load/auto-layout buttons).
 

Detailed Description

Renderer shared by BlueprintEditor and RuntimeDebugger.

All methods are static. No instance state is required because the renderer is purely functional: it reads from GraphDocument and EditorContext and issues ImNodes / ImGui draw calls.

Definition at line 54 of file SharedGraphRenderer.h.

Constructor & Destructor Documentation

◆ SharedGraphRenderer()

Olympe::NodeGraph::SharedGraphRenderer::SharedGraphRenderer ( )
inlineprivate

Definition at line 134 of file SharedGraphRenderer.h.

Member Function Documentation

◆ MakeDebuggerConfig()

SharedGraphRenderer::Config Olympe::NodeGraph::SharedGraphRenderer::MakeDebuggerConfig ( )
static

Returns the default configuration for the Runtime Debugger (read-only mode).

readOnly=true, showRuntimeHighlight=true.

Definition at line 50 of file SharedGraphRenderer.cpp.

References GetComponentTypeID_Static(), and Olympe::NodeGraph::SharedGraphRenderer::Config::readOnly.

+ Here is the call graph for this function:

◆ MakeEditorConfig()

SharedGraphRenderer::Config Olympe::NodeGraph::SharedGraphRenderer::MakeEditorConfig ( )
static

Returns the default configuration for the BlueprintEditor (full-edit mode).

readOnly=false, showRuntimeHighlight=false.

Definition at line 40 of file SharedGraphRenderer.cpp.

References GetComponentTypeID_Static(), and Olympe::NodeGraph::SharedGraphRenderer::Config::readOnly.

+ Here is the call graph for this function:

◆ Render()

void Olympe::NodeGraph::SharedGraphRenderer::Render ( GraphDocument doc,
const EditorContext ctx,
const Config cfg,
int  activeNodeID = -1 
)
static

Renders the graph inside the current ImGui window.

Parameters
docGraphDocument to render (non-owning). Must not be null.
ctxEditorContext (Editor or Debug mode).
cfgRendering configuration.
activeNodeIDNode to highlight in debug mode (-1 = none).

Definition at line 64 of file SharedGraphRenderer.cpp.

References GetComponentTypeID_Static(), RenderLink(), RenderNode(), and RenderToolbar().

+ Here is the call graph for this function:

◆ RenderBlackboardPanel()

void Olympe::NodeGraph::SharedGraphRenderer::RenderBlackboardPanel ( const LocalBlackboard bb)
static

Renders the blackboard variables panel.

Parameters
bbLocalBlackboard to display. May be null (panel shows empty state).

Definition at line 114 of file SharedGraphRenderer.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ RenderLink()

void Olympe::NodeGraph::SharedGraphRenderer::RenderLink ( const LinkData link)
staticprivate

Renders a single link between two nodes.

Parameters
linkLink data.

Definition at line 186 of file SharedGraphRenderer.cpp.

References GetComponentTypeID_Static().

Referenced by Render().

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

◆ RenderNode()

void Olympe::NodeGraph::SharedGraphRenderer::RenderNode ( const NodeData node,
const Config cfg,
int  activeNodeID 
)
staticprivate

Renders a single node.

Parameters
nodeNode data.
cfgRendering config (controls highlight, read-only styling).
activeNodeIDHighlighted node ID (-1 = none).

Definition at line 154 of file SharedGraphRenderer.cpp.

References GetComponentTypeID_Static().

Referenced by Render().

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

◆ RenderToolbar()

void Olympe::NodeGraph::SharedGraphRenderer::RenderToolbar ( GraphDocument doc,
const EditorContext ctx 
)
staticprivate

Renders the graph toolbar (save/load/auto-layout buttons).

Parameters
docGraphDocument (commands are dispatched through it).
ctxEditorContext (controls which actions are available).

Definition at line 199 of file SharedGraphRenderer.cpp.

References GetComponentTypeID_Static().

Referenced by Render().

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

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