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

Main debug window for behavior tree runtime visualization. More...

#include <BehaviorTreeDebugWindow.h>

+ Collaboration diagram for Olympe::BehaviorTreeDebugWindow:

Classes

struct  LinkInfo
 

Public Member Functions

 BehaviorTreeDebugWindow ()
 
 ~BehaviorTreeDebugWindow ()
 
void Initialize ()
 Initialize the debug window.
 
void Shutdown ()
 Shutdown and cleanup.
 
void Render ()
 Render the debug window (in separate SDL3 window)
 
void ToggleVisibility ()
 Toggle window visibility (creates/destroys separate window)
 
bool IsVisible () const
 Check if window is visible.
 
void ProcessEvent (SDL_Event *event)
 Process SDL events for separate window.
 
void AddExecutionEntry (EntityID entity, uint32_t nodeId, const std::string &nodeName, BTStatus status)
 Add an execution log entry.
 

Private Types

enum class  SortMode { Name , TreeName , LastUpdate , AIMode }
 

Private Member Functions

void RenderEntityListPanel ()
 
void RenderNodeGraphPanel ()
 
void RenderInspectorPanel ()
 
void CreateSeparateWindow ()
 
void DestroySeparateWindow ()
 
void RenderInSeparateWindow ()
 
void RefreshEntityList ()
 
void UpdateEntityFiltering ()
 
void UpdateEntitySorting ()
 
void RenderEntityEntry (const EntityDebugInfo &info)
 
void RenderBehaviorTreeGraph ()
 
void RenderNode (const BTNode *node, const BTNodeLayout *layout, bool isCurrentNode)
 
void RenderNodeConnections (const BTNode *node, const BTNodeLayout *layout, const BehaviorTreeAsset *tree)
 
void RenderBezierConnection (const Vector &start, const Vector &end, uint32_t color, float thickness, float tangent)
 
void RenderNodePins (const BTNode *node, const BTNodeLayout *layout)
 
uint32_t GetNodeColor (BTNodeType type) const
 
uint32_t GetNodeColorByStatus (BTNodeType type, BTStatus status) const
 
const charGetNodeIcon (BTNodeType type) const
 
void RenderNodePalette ()
 
void RenderEditorToolbar ()
 
void HandleNodeCreation (BTNodeType nodeType)
 
void HandleNodeDeletion ()
 
void HandleNodeDuplication ()
 
bool ValidateConnection (uint32_t parentId, uint32_t childId) const
 
void SaveEditedTree ()
 
void UndoLastAction ()
 
void RedoLastAction ()
 
void RenderValidationPanel ()
 
uint32_t GetPinColor (uint32_t nodeId, PinType pinType) const
 
bool IsConnectionValid (uint32_t parentId, uint32_t childId) const
 
void RenderNodeProperties ()
 
void Save ()
 
void SaveAs ()
 
void RenderFileMenu ()
 
json SerializeTreeToJson (const BehaviorTreeAsset &tree) const
 
std::string GetCurrentTimestamp () const
 
void RenderNewBTDialog ()
 
BehaviorTreeAsset CreateFromTemplate (int templateIndex, const std::string &name)
 
void RenderEditMenu ()
 
void LoadBTConfig ()
 
void ApplyConfigToLayout ()
 
Vector SnapToGrid (const Vector &pos) const
 
void RenderRuntimeInfo ()
 
void RenderBlackboardSection ()
 
void RenderExecutionLog ()
 
void FitGraphToView ()
 
void CenterViewOnGraph ()
 
void ResetZoom ()
 
void RenderMinimap ()
 
void ApplyZoomToStyle ()
 
void GetGraphBounds (Vector &outMin, Vector &outMax) const
 
float GetSafeZoom () const
 
Vector CalculatePanOffset (const Vector &graphCenter, const Vector &viewportSize) const
 

Private Attributes

std::vector< EntityDebugInfom_entities
 
std::vector< EntityDebugInfom_filteredEntities
 
EntityID m_selectedEntity = 0
 
BTGraphLayoutEngine m_layoutEngine
 
std::vector< BTNodeLayoutm_currentLayout
 
EntityID m_lastCenteredEntity = 0
 
float m_currentZoom = 1.0f
 
bool m_showMinimap = true
 
std::deque< ExecutionLogEntrym_executionLog
 
const size_t MAX_LOG_ENTRIES = 100
 
bool m_isVisible = false
 
bool m_isInitialized = false
 
float m_autoRefreshInterval = 0.5f
 
char m_filterText [256] = ""
 
bool m_filterActiveOnly = false
 
bool m_filterHasTarget = false
 
SortMode m_sortMode = SortMode::Name
 
bool m_sortAscending = true
 
float m_entityListWidth = 250.0f
 
float m_inspectorWidth = 350.0f
 
float m_nodeSpacingX = 180.0f
 
float m_nodeSpacingY = 120.0f
 
bool m_imnodesInitialized = false
 
int m_imnodesEditorContext = -1
 
BTLayoutDirection m_layoutDirection = BTLayoutDirection::TopToBottom
 
float m_pulseTimer = 0.0f
 
bool m_needsLayoutUpdate = false
 
bool m_autoFitOnLoad = true
 
BTConfig m_config
 
bool m_configLoaded = false
 
std::map< BTNodeType, std::map< BTStatus, BTColor > > m_nodeColors
 
SDL_Windowm_separateWindow
 
SDL_Rendererm_separateRenderer
 
bool m_windowCreated
 
ImGuiContextm_separateImGuiContext
 
bool m_editorMode = false
 
bool m_treeModified = false
 
bool m_isDirty = false
 
BehaviorTreeAsset m_editingTree
 
uint32_t m_nextNodeId = 1000
 
std::string m_currentFilePath
 
std::vector< uint32_tm_selectedNodes
 
bool m_showNodePalette = false
 
Vector m_nodeCreationPos
 
bool m_isDraggingPin = false
 
uint32_t m_dragSourceNodeId = 0
 
PinType m_dragSourcePinType = PinType::Output
 
Vector m_dragEndPos
 
BTCommandStack m_commandStack
 
std::vector< LinkInfom_linkMap
 
int m_nextLinkId = 100000
 
std::vector< BTValidationMessagem_validationMessages
 
bool m_showValidationPanel = true
 
uint32_t m_inspectedNodeId = 0
 
bool m_showNodeProperties = false
 
bool m_showNewBTDialog = false
 
char m_newBTName [256] = ""
 
int m_selectedTemplate = 0
 

Detailed Description

Main debug window for behavior tree runtime visualization.

Provides comprehensive debugging capabilities for AI behavior trees, including entity selection, graph visualization, and blackboard inspection.

Renders in a separate SDL3 native window (not embedded in main engine window).

Definition at line 135 of file BehaviorTreeDebugWindow.h.

Member Enumeration Documentation

◆ SortMode

Enumerator
Name 
TreeName 
LastUpdate 
AIMode 

Definition at line 292 of file BehaviorTreeDebugWindow.h.

Constructor & Destructor Documentation

◆ BehaviorTreeDebugWindow()

Olympe::BehaviorTreeDebugWindow::BehaviorTreeDebugWindow ( )

Definition at line 36 of file BehaviorTreeDebugWindow.cpp.

◆ ~BehaviorTreeDebugWindow()

Olympe::BehaviorTreeDebugWindow::~BehaviorTreeDebugWindow ( )

Definition at line 44 of file BehaviorTreeDebugWindow.cpp.

References Shutdown().

+ Here is the call graph for this function:

Member Function Documentation

◆ AddExecutionEntry()

void Olympe::BehaviorTreeDebugWindow::AddExecutionEntry ( EntityID  entity,
uint32_t  nodeId,
const std::string &  nodeName,
BTStatus  status 
)

Add an execution log entry.

Parameters
entityEntity that executed
nodeIdNode that was executed
nodeNameNode name
statusExecution result

Definition at line 1607 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static(), and Olympe::ExecutionLogEntry::timeAgo.

Referenced by BehaviorTreeSystem::Process().

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

◆ ApplyConfigToLayout()

void BehaviorTreeDebugWindow::ApplyConfigToLayout ( )
private

Definition at line 2493 of file BehaviorTreeDebugWindow.cpp.

Referenced by Initialize(), and RenderInSeparateWindow().

+ Here is the caller graph for this function:

◆ ApplyZoomToStyle()

void Olympe::BehaviorTreeDebugWindow::ApplyZoomToStyle ( )
private

Definition at line 1624 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ CalculatePanOffset()

Vector Olympe::BehaviorTreeDebugWindow::CalculatePanOffset ( const Vector graphCenter,
const Vector viewportSize 
) const
private

Definition at line 1650 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ CenterViewOnGraph()

void Olympe::BehaviorTreeDebugWindow::CenterViewOnGraph ( )
private

Definition at line 1694 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static(), and m_currentLayout.

Referenced by RenderInSeparateWindow().

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

◆ CreateFromTemplate()

BehaviorTreeAsset BehaviorTreeDebugWindow::CreateFromTemplate ( int  templateIndex,
const std::string &  name 
)
private

◆ CreateSeparateWindow()

void Olympe::BehaviorTreeDebugWindow::CreateSeparateWindow ( )
private

Definition at line 111 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static(), m_separateImGuiContext, m_separateRenderer, m_separateWindow, and m_windowCreated.

Referenced by ToggleVisibility().

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

◆ DestroySeparateWindow()

void Olympe::BehaviorTreeDebugWindow::DestroySeparateWindow ( )
private

Definition at line 155 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static(), m_separateImGuiContext, m_separateRenderer, m_separateWindow, and m_windowCreated.

Referenced by Shutdown(), and ToggleVisibility().

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

◆ FitGraphToView()

void Olympe::BehaviorTreeDebugWindow::FitGraphToView ( )
private

Definition at line 1660 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static(), m_currentLayout, Olympe::MAX_ZOOM, and Olympe::MIN_ZOOM.

Referenced by RenderInSeparateWindow().

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

◆ GetCurrentTimestamp()

std::string BehaviorTreeDebugWindow::GetCurrentTimestamp ( ) const
private

Definition at line 2815 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ GetGraphBounds()

void Olympe::BehaviorTreeDebugWindow::GetGraphBounds ( Vector outMin,
Vector outMax 
) const
private

Definition at line 1631 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static(), and m_currentLayout.

+ Here is the call graph for this function:

◆ GetNodeColor()

uint32_t Olympe::BehaviorTreeDebugWindow::GetNodeColor ( BTNodeType  type) const
private

Definition at line 1318 of file BehaviorTreeDebugWindow.cpp.

References Action, Condition, GetComponentTypeID_Static(), Inverter, Repeater, Selector, and Sequence.

+ Here is the call graph for this function:

◆ GetNodeColorByStatus()

uint32_t BehaviorTreeDebugWindow::GetNodeColorByStatus ( BTNodeType  type,
BTStatus  status 
) const
private

Definition at line 2564 of file BehaviorTreeDebugWindow.cpp.

References Olympe::BTColor::a, Olympe::BTColor::b, Olympe::BTColor::g, GetComponentTypeID_Static(), and Olympe::BTColor::r.

+ Here is the call graph for this function:

◆ GetNodeIcon()

const char * Olympe::BehaviorTreeDebugWindow::GetNodeIcon ( BTNodeType  type) const
private

Definition at line 1339 of file BehaviorTreeDebugWindow.cpp.

References Action, Condition, Inverter, Repeater, Selector, and Sequence.

◆ GetPinColor()

uint32_t BehaviorTreeDebugWindow::GetPinColor ( uint32_t  nodeId,
PinType  pinType 
) const
private

Definition at line 2629 of file BehaviorTreeDebugWindow.cpp.

References BTValidationMessage::Error, GetComponentTypeID_Static(), m_validationMessages, and BTValidationMessage::Warning.

+ Here is the call graph for this function:

◆ GetSafeZoom()

float Olympe::BehaviorTreeDebugWindow::GetSafeZoom ( ) const
private

Definition at line 1645 of file BehaviorTreeDebugWindow.cpp.

References Olympe::MAX_ZOOM, and Olympe::MIN_ZOOM.

◆ HandleNodeCreation()

void Olympe::BehaviorTreeDebugWindow::HandleNodeCreation ( BTNodeType  nodeType)
private

◆ HandleNodeDeletion()

void Olympe::BehaviorTreeDebugWindow::HandleNodeDeletion ( )
private

Definition at line 1986 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static(), m_currentLayout, m_isDirty, m_treeModified, and m_validationMessages.

Referenced by RenderInSeparateWindow().

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

◆ HandleNodeDuplication()

void BehaviorTreeDebugWindow::HandleNodeDuplication ( )
private

Definition at line 2040 of file BehaviorTreeDebugWindow.cpp.

References BTNode::actionType, GetComponentTypeID_Static(), m_currentLayout, m_isDirty, m_treeModified, and BTNode::name.

Referenced by RenderInSeparateWindow().

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

◆ Initialize()

void Olympe::BehaviorTreeDebugWindow::Initialize ( )

Initialize the debug window.

Definition at line 49 of file BehaviorTreeDebugWindow.cpp.

References ApplyConfigToLayout(), GetComponentTypeID_Static(), LoadBTConfig(), m_imnodesInitialized, and m_isInitialized.

Referenced by SDL_AppInit(), and ToggleVisibility().

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

◆ IsConnectionValid()

bool BehaviorTreeDebugWindow::IsConnectionValid ( uint32_t  parentId,
uint32_t  childId 
) const
private

◆ IsVisible()

bool Olympe::BehaviorTreeDebugWindow::IsVisible ( ) const
inline

Check if window is visible.

Definition at line 164 of file BehaviorTreeDebugWindow.h.

References m_isVisible.

Referenced by BehaviorTreeSystem::Process(), and SDL_AppEvent().

+ Here is the caller graph for this function:

◆ LoadBTConfig()

void BehaviorTreeDebugWindow::LoadBTConfig ( )
private

◆ ProcessEvent()

void Olympe::BehaviorTreeDebugWindow::ProcessEvent ( SDL_Event event)

Process SDL events for separate window.

Parameters
eventSDL event to process

Definition at line 191 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static(), m_isVisible, m_separateImGuiContext, m_separateWindow, m_windowCreated, and ToggleVisibility().

Referenced by SDL_AppEvent().

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

◆ RedoLastAction()

void BehaviorTreeDebugWindow::RedoLastAction ( )
private

◆ RefreshEntityList()

void Olympe::BehaviorTreeDebugWindow::RefreshEntityList ( )
private

◆ Render()

void Olympe::BehaviorTreeDebugWindow::Render ( )

Render the debug window (in separate SDL3 window)

Definition at line 213 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static(), m_isVisible, m_separateImGuiContext, m_separateRenderer, m_windowCreated, and RenderInSeparateWindow().

Referenced by SDL_AppIterate().

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

◆ RenderBehaviorTreeGraph()

void Olympe::BehaviorTreeDebugWindow::RenderBehaviorTreeGraph ( )
private

Definition at line 1133 of file BehaviorTreeDebugWindow.cpp.

References BehaviorTreeManager::Get(), World::Get(), GetComponentTypeID_Static(), and BehaviorTreeManager::GetTreeByAnyId().

+ Here is the call graph for this function:

◆ RenderBezierConnection()

void BehaviorTreeDebugWindow::RenderBezierConnection ( const Vector start,
const Vector end,
uint32_t  color,
float  thickness,
float  tangent 
)
private

Definition at line 2520 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ RenderBlackboardSection()

void Olympe::BehaviorTreeDebugWindow::RenderBlackboardSection ( )
private

Definition at line 1490 of file BehaviorTreeDebugWindow.cpp.

References World::Get(), and GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ RenderEditMenu()

void BehaviorTreeDebugWindow::RenderEditMenu ( )
private

Definition at line 3069 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static(), and m_isDirty.

Referenced by RenderInSeparateWindow().

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

◆ RenderEditorToolbar()

void Olympe::BehaviorTreeDebugWindow::RenderEditorToolbar ( )
private

Definition at line 1824 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static(), m_currentLayout, m_isDirty, and m_validationMessages.

+ Here is the call graph for this function:

◆ RenderEntityEntry()

void Olympe::BehaviorTreeDebugWindow::RenderEntityEntry ( const EntityDebugInfo info)
private

Definition at line 684 of file BehaviorTreeDebugWindow.cpp.

References Failure, BehaviorTreeManager::Get(), GetComponentTypeID_Static(), BehaviorTreeManager::GetTreeByAnyId(), m_currentLayout, and Success.

+ Here is the call graph for this function:

◆ RenderEntityListPanel()

void Olympe::BehaviorTreeDebugWindow::RenderEntityListPanel ( )
private

Definition at line 631 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static().

Referenced by RenderInSeparateWindow().

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

◆ RenderExecutionLog()

void Olympe::BehaviorTreeDebugWindow::RenderExecutionLog ( )
private

Definition at line 1569 of file BehaviorTreeDebugWindow.cpp.

References Failure, GetComponentTypeID_Static(), and Success.

+ Here is the call graph for this function:

◆ RenderFileMenu()

void BehaviorTreeDebugWindow::RenderFileMenu ( )
private

Definition at line 3036 of file BehaviorTreeDebugWindow.cpp.

References m_isDirty.

Referenced by RenderInSeparateWindow().

+ Here is the caller graph for this function:

◆ RenderInSeparateWindow()

void Olympe::BehaviorTreeDebugWindow::RenderInSeparateWindow ( )
private

◆ RenderInspectorPanel()

void Olympe::BehaviorTreeDebugWindow::RenderInspectorPanel ( )
private

Definition at line 1353 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static().

Referenced by RenderInSeparateWindow().

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

◆ RenderMinimap()

void Olympe::BehaviorTreeDebugWindow::RenderMinimap ( )
private

Definition at line 1738 of file BehaviorTreeDebugWindow.cpp.

References World::Get(), GetComponentTypeID_Static(), and m_currentLayout.

+ Here is the call graph for this function:

◆ RenderNewBTDialog()

void BehaviorTreeDebugWindow::RenderNewBTDialog ( )
private

Definition at line 3246 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static(), and m_isDirty.

+ Here is the call graph for this function:

◆ RenderNode()

void Olympe::BehaviorTreeDebugWindow::RenderNode ( const BTNode node,
const BTNodeLayout layout,
bool  isCurrentNode 
)
private

Definition at line 1183 of file BehaviorTreeDebugWindow.cpp.

References Action, Condition, GetComponentTypeID_Static(), Idle, Inverter, Repeater, Running, Selector, and Sequence.

+ Here is the call graph for this function:

◆ RenderNodeConnections()

void Olympe::BehaviorTreeDebugWindow::RenderNodeConnections ( const BTNode node,
const BTNodeLayout layout,
const BehaviorTreeAsset tree 
)
private

Definition at line 1272 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static(), Inverter, Olympe::BehaviorTreeDebugWindow::LinkInfo::linkId, Repeater, Selector, and Sequence.

+ Here is the call graph for this function:

◆ RenderNodeGraphPanel()

void Olympe::BehaviorTreeDebugWindow::RenderNodeGraphPanel ( )
private

◆ RenderNodePalette()

void Olympe::BehaviorTreeDebugWindow::RenderNodePalette ( )
private

Definition at line 1866 of file BehaviorTreeDebugWindow.cpp.

References Action, Condition, Inverter, Repeater, Selector, and Sequence.

◆ RenderNodePins()

void BehaviorTreeDebugWindow::RenderNodePins ( const BTNode node,
const BTNodeLayout layout 
)
private

Definition at line 2531 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static(), Inverter, Repeater, Selector, and Sequence.

+ Here is the call graph for this function:

◆ RenderNodeProperties()

void BehaviorTreeDebugWindow::RenderNodeProperties ( )
private

Definition at line 2689 of file BehaviorTreeDebugWindow.cpp.

References Action, Condition, GetComponentTypeID_Static(), m_isDirty, and Repeater.

+ Here is the call graph for this function:

◆ RenderRuntimeInfo()

void Olympe::BehaviorTreeDebugWindow::RenderRuntimeInfo ( )
private

◆ RenderValidationPanel()

void BehaviorTreeDebugWindow::RenderValidationPanel ( )
private

Definition at line 2590 of file BehaviorTreeDebugWindow.cpp.

References BTValidationMessage::Error, GetComponentTypeID_Static(), m_validationMessages, and BTValidationMessage::Warning.

+ Here is the call graph for this function:

◆ ResetZoom()

void Olympe::BehaviorTreeDebugWindow::ResetZoom ( )
private

Definition at line 1714 of file BehaviorTreeDebugWindow.cpp.

References BehaviorTreeManager::Get(), World::Get(), GetComponentTypeID_Static(), BehaviorTreeManager::GetTreeByAnyId(), and m_currentLayout.

Referenced by RenderInSeparateWindow().

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

◆ Save()

void BehaviorTreeDebugWindow::Save ( )
private

Definition at line 2986 of file BehaviorTreeDebugWindow.cpp.

References BTValidationMessage::Error, GetComponentTypeID_Static(), m_isDirty, m_validationMessages, and JsonHelper::SaveJsonToFile().

Referenced by RenderInSeparateWindow().

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

◆ SaveAs()

void BehaviorTreeDebugWindow::SaveAs ( )
private

Definition at line 3028 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ SaveEditedTree()

void BehaviorTreeDebugWindow::SaveEditedTree ( )
private

◆ SerializeTreeToJson()

json BehaviorTreeDebugWindow::SerializeTreeToJson ( const BehaviorTreeAsset tree) const
private

◆ Shutdown()

void Olympe::BehaviorTreeDebugWindow::Shutdown ( )

Shutdown and cleanup.

Definition at line 72 of file BehaviorTreeDebugWindow.cpp.

References DestroySeparateWindow(), m_imnodesInitialized, and m_isInitialized.

Referenced by ~BehaviorTreeDebugWindow().

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

◆ SnapToGrid()

Vector BehaviorTreeDebugWindow::SnapToGrid ( const Vector pos) const
private

Definition at line 2507 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ ToggleVisibility()

void Olympe::BehaviorTreeDebugWindow::ToggleVisibility ( )

Toggle window visibility (creates/destroys separate window)

Definition at line 85 of file BehaviorTreeDebugWindow.cpp.

References CreateSeparateWindow(), DestroySeparateWindow(), Initialize(), m_isInitialized, m_isVisible, and m_windowCreated.

Referenced by ProcessEvent(), and SDL_AppEvent().

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

◆ UndoLastAction()

void BehaviorTreeDebugWindow::UndoLastAction ( )
private

◆ UpdateEntityFiltering()

void Olympe::BehaviorTreeDebugWindow::UpdateEntityFiltering ( )
private

Definition at line 580 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static(), m_entities, m_filterActiveOnly, m_filteredEntities, m_filterHasTarget, and m_filterText.

Referenced by RefreshEntityList().

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

◆ UpdateEntitySorting()

void Olympe::BehaviorTreeDebugWindow::UpdateEntitySorting ( )
private

Definition at line 607 of file BehaviorTreeDebugWindow.cpp.

References GetComponentTypeID_Static(), m_filteredEntities, and m_sortAscending.

Referenced by RefreshEntityList().

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

◆ ValidateConnection()

bool Olympe::BehaviorTreeDebugWindow::ValidateConnection ( uint32_t  parentId,
uint32_t  childId 
) const
private

Member Data Documentation

◆ m_autoFitOnLoad

bool Olympe::BehaviorTreeDebugWindow::m_autoFitOnLoad = true
private

Definition at line 318 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_autoRefreshInterval

float Olympe::BehaviorTreeDebugWindow::m_autoRefreshInterval = 0.5f
private

Definition at line 284 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_commandStack

BTCommandStack Olympe::BehaviorTreeDebugWindow::m_commandStack
private

Definition at line 355 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_config

BTConfig Olympe::BehaviorTreeDebugWindow::m_config
private

Definition at line 321 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_configLoaded

bool Olympe::BehaviorTreeDebugWindow::m_configLoaded = false
private

Definition at line 322 of file BehaviorTreeDebugWindow.h.

◆ m_currentFilePath

std::string Olympe::BehaviorTreeDebugWindow::m_currentFilePath
private

Definition at line 341 of file BehaviorTreeDebugWindow.h.

◆ m_currentLayout

std::vector<BTNodeLayout> Olympe::BehaviorTreeDebugWindow::m_currentLayout
private

Definition at line 270 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_currentZoom

float Olympe::BehaviorTreeDebugWindow::m_currentZoom = 1.0f
private

Definition at line 274 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_dragEndPos

Vector Olympe::BehaviorTreeDebugWindow::m_dragEndPos
private

Definition at line 352 of file BehaviorTreeDebugWindow.h.

◆ m_dragSourceNodeId

uint32_t Olympe::BehaviorTreeDebugWindow::m_dragSourceNodeId = 0
private

Definition at line 350 of file BehaviorTreeDebugWindow.h.

◆ m_dragSourcePinType

PinType Olympe::BehaviorTreeDebugWindow::m_dragSourcePinType = PinType::Output
private

Definition at line 351 of file BehaviorTreeDebugWindow.h.

◆ m_editingTree

BehaviorTreeAsset Olympe::BehaviorTreeDebugWindow::m_editingTree
private

Definition at line 339 of file BehaviorTreeDebugWindow.h.

◆ m_editorMode

bool Olympe::BehaviorTreeDebugWindow::m_editorMode = false
private

Definition at line 336 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_entities

std::vector<EntityDebugInfo> Olympe::BehaviorTreeDebugWindow::m_entities
private

Definition at line 264 of file BehaviorTreeDebugWindow.h.

Referenced by RefreshEntityList(), and UpdateEntityFiltering().

◆ m_entityListWidth

float Olympe::BehaviorTreeDebugWindow::m_entityListWidth = 250.0f
private

Definition at line 303 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_executionLog

std::deque<ExecutionLogEntry> Olympe::BehaviorTreeDebugWindow::m_executionLog
private

Definition at line 278 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_filterActiveOnly

bool Olympe::BehaviorTreeDebugWindow::m_filterActiveOnly = false
private

Definition at line 288 of file BehaviorTreeDebugWindow.h.

Referenced by UpdateEntityFiltering().

◆ m_filteredEntities

std::vector<EntityDebugInfo> Olympe::BehaviorTreeDebugWindow::m_filteredEntities
private

Definition at line 265 of file BehaviorTreeDebugWindow.h.

Referenced by UpdateEntityFiltering(), and UpdateEntitySorting().

◆ m_filterHasTarget

bool Olympe::BehaviorTreeDebugWindow::m_filterHasTarget = false
private

Definition at line 289 of file BehaviorTreeDebugWindow.h.

Referenced by UpdateEntityFiltering().

◆ m_filterText

char Olympe::BehaviorTreeDebugWindow::m_filterText[256] = ""
private

Definition at line 287 of file BehaviorTreeDebugWindow.h.

Referenced by UpdateEntityFiltering().

◆ m_imnodesEditorContext

int Olympe::BehaviorTreeDebugWindow::m_imnodesEditorContext = -1
private

Definition at line 310 of file BehaviorTreeDebugWindow.h.

◆ m_imnodesInitialized

bool Olympe::BehaviorTreeDebugWindow::m_imnodesInitialized = false
private

Definition at line 309 of file BehaviorTreeDebugWindow.h.

Referenced by Initialize(), and Shutdown().

◆ m_inspectedNodeId

uint32_t Olympe::BehaviorTreeDebugWindow::m_inspectedNodeId = 0
private

Definition at line 371 of file BehaviorTreeDebugWindow.h.

◆ m_inspectorWidth

float Olympe::BehaviorTreeDebugWindow::m_inspectorWidth = 350.0f
private

Definition at line 304 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_isDirty

bool Olympe::BehaviorTreeDebugWindow::m_isDirty = false
private

Definition at line 338 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_isDraggingPin

bool Olympe::BehaviorTreeDebugWindow::m_isDraggingPin = false
private

Definition at line 349 of file BehaviorTreeDebugWindow.h.

◆ m_isInitialized

bool Olympe::BehaviorTreeDebugWindow::m_isInitialized = false
private

Definition at line 283 of file BehaviorTreeDebugWindow.h.

Referenced by Initialize(), Shutdown(), and ToggleVisibility().

◆ m_isVisible

bool Olympe::BehaviorTreeDebugWindow::m_isVisible = false
private

Definition at line 282 of file BehaviorTreeDebugWindow.h.

Referenced by IsVisible(), ProcessEvent(), Render(), and ToggleVisibility().

◆ m_lastCenteredEntity

EntityID Olympe::BehaviorTreeDebugWindow::m_lastCenteredEntity = 0
private

Definition at line 273 of file BehaviorTreeDebugWindow.h.

◆ m_layoutDirection

BTLayoutDirection Olympe::BehaviorTreeDebugWindow::m_layoutDirection = BTLayoutDirection::TopToBottom
private

Definition at line 311 of file BehaviorTreeDebugWindow.h.

◆ m_layoutEngine

BTGraphLayoutEngine Olympe::BehaviorTreeDebugWindow::m_layoutEngine
private

Definition at line 269 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_linkMap

std::vector<LinkInfo> Olympe::BehaviorTreeDebugWindow::m_linkMap
private

Definition at line 363 of file BehaviorTreeDebugWindow.h.

◆ m_needsLayoutUpdate

bool Olympe::BehaviorTreeDebugWindow::m_needsLayoutUpdate = false
private

Definition at line 317 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_newBTName

char Olympe::BehaviorTreeDebugWindow::m_newBTName[256] = ""
private

Definition at line 376 of file BehaviorTreeDebugWindow.h.

◆ m_nextLinkId

int Olympe::BehaviorTreeDebugWindow::m_nextLinkId = 100000
private

Definition at line 364 of file BehaviorTreeDebugWindow.h.

◆ m_nextNodeId

uint32_t Olympe::BehaviorTreeDebugWindow::m_nextNodeId = 1000
private

Definition at line 340 of file BehaviorTreeDebugWindow.h.

◆ m_nodeColors

std::map<BTNodeType, std::map<BTStatus, BTColor> > Olympe::BehaviorTreeDebugWindow::m_nodeColors
private

Definition at line 325 of file BehaviorTreeDebugWindow.h.

◆ m_nodeCreationPos

Vector Olympe::BehaviorTreeDebugWindow::m_nodeCreationPos
private

Definition at line 346 of file BehaviorTreeDebugWindow.h.

◆ m_nodeSpacingX

float Olympe::BehaviorTreeDebugWindow::m_nodeSpacingX = 180.0f
private

Definition at line 305 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_nodeSpacingY

float Olympe::BehaviorTreeDebugWindow::m_nodeSpacingY = 120.0f
private

Definition at line 306 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_pulseTimer

float Olympe::BehaviorTreeDebugWindow::m_pulseTimer = 0.0f
private

Definition at line 314 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_selectedEntity

EntityID Olympe::BehaviorTreeDebugWindow::m_selectedEntity = 0
private

Definition at line 266 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_selectedNodes

std::vector<uint32_t> Olympe::BehaviorTreeDebugWindow::m_selectedNodes
private

Definition at line 344 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_selectedTemplate

int Olympe::BehaviorTreeDebugWindow::m_selectedTemplate = 0
private

Definition at line 377 of file BehaviorTreeDebugWindow.h.

◆ m_separateImGuiContext

ImGuiContext* Olympe::BehaviorTreeDebugWindow::m_separateImGuiContext
private

◆ m_separateRenderer

SDL_Renderer* Olympe::BehaviorTreeDebugWindow::m_separateRenderer
private

Definition at line 329 of file BehaviorTreeDebugWindow.h.

Referenced by CreateSeparateWindow(), DestroySeparateWindow(), and Render().

◆ m_separateWindow

SDL_Window* Olympe::BehaviorTreeDebugWindow::m_separateWindow
private

◆ m_showMinimap

bool Olympe::BehaviorTreeDebugWindow::m_showMinimap = true
private

Definition at line 275 of file BehaviorTreeDebugWindow.h.

Referenced by RenderInSeparateWindow().

◆ m_showNewBTDialog

bool Olympe::BehaviorTreeDebugWindow::m_showNewBTDialog = false
private

Definition at line 375 of file BehaviorTreeDebugWindow.h.

◆ m_showNodePalette

bool Olympe::BehaviorTreeDebugWindow::m_showNodePalette = false
private

Definition at line 345 of file BehaviorTreeDebugWindow.h.

◆ m_showNodeProperties

bool Olympe::BehaviorTreeDebugWindow::m_showNodeProperties = false
private

Definition at line 372 of file BehaviorTreeDebugWindow.h.

◆ m_showValidationPanel

bool Olympe::BehaviorTreeDebugWindow::m_showValidationPanel = true
private

Definition at line 368 of file BehaviorTreeDebugWindow.h.

◆ m_sortAscending

bool Olympe::BehaviorTreeDebugWindow::m_sortAscending = true
private

Definition at line 300 of file BehaviorTreeDebugWindow.h.

Referenced by UpdateEntitySorting().

◆ m_sortMode

SortMode Olympe::BehaviorTreeDebugWindow::m_sortMode = SortMode::Name
private

Definition at line 299 of file BehaviorTreeDebugWindow.h.

◆ m_treeModified

bool Olympe::BehaviorTreeDebugWindow::m_treeModified = false
private

Definition at line 337 of file BehaviorTreeDebugWindow.h.

◆ m_validationMessages

std::vector<BTValidationMessage> Olympe::BehaviorTreeDebugWindow::m_validationMessages
private

Definition at line 367 of file BehaviorTreeDebugWindow.h.

◆ m_windowCreated

bool Olympe::BehaviorTreeDebugWindow::m_windowCreated
private

◆ MAX_LOG_ENTRIES

const size_t Olympe::BehaviorTreeDebugWindow::MAX_LOG_ENTRIES = 100
private

Definition at line 279 of file BehaviorTreeDebugWindow.h.


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