Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
AIEditorNodeRenderer.h
Go to the documentation of this file.
1/**
2 * @file AIEditorNodeRenderer.h
3 * @brief Node renderer for AI Editor with ImNodes
4 * @author Olympe Engine
5 * @date 2026-02-18
6 *
7 * @details
8 * Converts NodeGraphCore NodeData to ImNodes rendering with BT styling.
9 * Phase 2.0: Supports breakpoint and comment annotation rendering.
10 */
11
12#pragma once
13
14#include "../../NodeGraphCore/NodeGraphCore.h"
15#include "../../NodeGraphCore/NodeAnnotations.h"
16#include "../AIGraphPlugin_BT/BTNodeRegistry.h"
17
18namespace Olympe {
19namespace AI {
20
21/**
22 * @class AIEditorNodeRenderer
23 * @brief Renders nodes with ImNodes using BT styling
24 */
26public:
27 /**
28 * @brief Render a single node with ImNodes
29 * @param nodeData Node data to render
30 * @param isSelected Whether node is selected
31 * @param isExecuting Whether node is currently executing (runtime debug)
32 * @param annotation Optional annotation for this node (may be nullptr)
33 */
34 static void RenderNode(
35 const NodeGraph::NodeData& nodeData,
36 bool isSelected = false,
37 bool isExecuting = false,
39 );
40
41 /**
42 * @brief Render node tooltip
43 * @param nodeData Node data
44 */
45 static void RenderNodeTooltip(const NodeGraph::NodeData& nodeData);
46
47 /**
48 * @brief Get pin ID for node input
49 * @param nodeId Node ID
50 * @return Pin ID for input
51 */
52 static int GetInputPinId(NodeGraph::NodeId nodeId);
53
54 /**
55 * @brief Get pin ID for node output
56 * @param nodeId Node ID
57 * @return Pin ID for output
58 */
59 static int GetOutputPinId(NodeGraph::NodeId nodeId);
60
61 /**
62 * @brief Get pin ID for child connection
63 * @param nodeId Node ID
64 * @param childIndex Child index
65 * @return Pin ID for child
66 */
67 static int GetChildPinId(NodeGraph::NodeId nodeId, int childIndex);
68};
69
70} // namespace AI
71} // namespace Olympe
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
Renders nodes with ImNodes using BT styling.
static int GetChildPinId(NodeGraph::NodeId nodeId, int childIndex)
Get pin ID for child connection.
static int GetInputPinId(NodeGraph::NodeId nodeId)
Get pin ID for node input.
static void RenderNode(const NodeGraph::NodeData &nodeData, bool isSelected=false, bool isExecuting=false, const NodeGraph::NodeAnnotation *annotation=nullptr)
Render a single node with ImNodes.
static void RenderNodeTooltip(const NodeGraph::NodeData &nodeData)
Render node tooltip.
static int GetOutputPinId(NodeGraph::NodeId nodeId)
Get pin ID for node output.
< Provides AssetID and INVALID_ASSET_ID
Holds annotation data for a single node.