25class BTGraphLayoutEngine;
34namespace NodeGraphShared
79 NodeGraph::NodeGraphRenderer*
renderer,
80 const NodeGraph::RenderConfig*
config =
nullptr
ComponentTypeID GetComponentTypeID_Static()
static SDL_Renderer * renderer
Computes clean hierarchical layouts for behavior trees.
Adapter for visualizing BehaviorTree runtime using unified renderer.
bool IsInitialized() const
Check if adapter is ready to render.
uint32_t GetActiveNodeId() const
Get current active node ID.
BTGraphLayoutEngine * m_layoutEngine
bool IsEditorMode() const
Check if adapter is in editor mode.
std::vector< BTNodeLayout > m_currentLayout
void ConvertBehaviorTreeToDocument()
void ApplyRuntimeHighlighting()
void EnsureGraphDocumentConverted()
void FitToView()
Fit graph to view (auto-zoom)
bool UpdateNodePosition(uint32_t nodeId, float x, float y)
Update a single node position (user drag in editor mode)
void ClearRuntimeState()
Clear all runtime highlighting.
NodeGraph::NodeGraphRenderer * m_renderer
void SyncLayoutToDocument()
BTDebugAdapter(const BehaviorTreeAsset *tree, BTGraphLayoutEngine *layoutEngine)
Construct a debug adapter for a behavior tree.
void CenterOnActiveNode()
Center view on active node.
void Render(float deltaTime)
Render the behavior tree using unified pipeline.
void Shutdown()
Shutdown and cleanup resources.
void SetEditorMode(bool enabled)
Enable editor mode (allows modifications via commands)
void RecomputeLayout(float nodeSpacingX, float nodeSpacingY, float zoomFactor)
Recompute layout (call after tree structure changes)
const BehaviorTreeAsset * m_tree
void Initialize(NodeGraph::NodeGraphRenderer *renderer, const NodeGraph::RenderConfig *config=nullptr)
Initialize the adapter with a renderer instance.
void SetActiveNode(uint32_t nodeId)
Set the currently executing node (for highlighting)
std::unique_ptr< NodeGraph::GraphDocument > m_document
< Provides AssetID and INVALID_ASSET_ID