Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
BehaviorTreeAsset Struct Reference

#include <BehaviorTree.h>

Public Member Functions

BTNodeGetNode (uint32_t nodeId)
 
const BTNodeGetNode (uint32_t nodeId) const
 
std::vector< BTValidationMessageValidateTreeFull () const
 
bool DetectCycle (uint32_t startNodeId) const
 
uint32_t AddNode (BTNodeType type, const std::string &name, const Vector &position)
 
bool RemoveNode (uint32_t nodeId)
 
bool ConnectNodes (uint32_t parentId, uint32_t childId)
 
bool DisconnectNodes (uint32_t parentId, uint32_t childId)
 
uint32_t GenerateNextNodeId () const
 

Public Attributes

uint32_t id = 0
 
std::string name
 
std::vector< BTNodenodes
 
uint32_t rootNodeId = 0
 

Detailed Description

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/AI/BehaviorTree.h.

Definition at line 202 of file BehaviorTree.h.

Member Function Documentation

◆ AddNode()

uint32_t BehaviorTreeAsset::AddNode ( BTNodeType  type,
const std::string &  name,
const Vector position 
)
Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/AI/BehaviorTree.h.

Definition at line 1129 of file BehaviorTree.cpp.

References Action, Condition, GenerateNextNodeId(), GetComponentTypeID_Static(), Idle, Inverter, name, nodes, Repeater, TargetVisible, and BTNode::type.

Referenced by Olympe::AddNodeCommand::Execute().

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

◆ ConnectNodes()

bool BehaviorTreeAsset::ConnectNodes ( uint32_t  parentId,
uint32_t  childId 
)

◆ DetectCycle()

bool BehaviorTreeAsset::DetectCycle ( uint32_t  startNodeId) const
Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/AI/BehaviorTree.h.

Definition at line 1058 of file BehaviorTree.cpp.

References GetComponentTypeID_Static(), GetNode(), Inverter, Repeater, and visited.

Referenced by ValidateTreeFull().

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

◆ DisconnectNodes()

bool BehaviorTreeAsset::DisconnectNodes ( uint32_t  parentId,
uint32_t  childId 
)
Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/AI/BehaviorTree.h.

Definition at line 1255 of file BehaviorTree.cpp.

References BTNode::childIds, BTNode::decoratorChildId, GetComponentTypeID_Static(), and GetNode().

Referenced by Olympe::DisconnectNodesCommand::Execute(), and Olympe::ConnectNodesCommand::Undo().

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

◆ GenerateNextNodeId()

uint32_t BehaviorTreeAsset::GenerateNextNodeId ( ) const
Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/AI/BehaviorTree.h.

Definition at line 1116 of file BehaviorTree.cpp.

References GetComponentTypeID_Static(), and nodes.

Referenced by AddNode().

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

◆ GetNode() [1/2]

BTNode * BehaviorTreeAsset::GetNode ( uint32_t  nodeId)
inline

◆ GetNode() [2/2]

const BTNode * BehaviorTreeAsset::GetNode ( uint32_t  nodeId) const
inline

Definition at line 220 of file BehaviorTree.h.

References GetComponentTypeID_Static(), and nodes.

+ Here is the call graph for this function:

◆ RemoveNode()

bool BehaviorTreeAsset::RemoveNode ( uint32_t  nodeId)
Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/AI/BehaviorTree.h.

Definition at line 1166 of file BehaviorTree.cpp.

References GetComponentTypeID_Static(), and nodes.

Referenced by Olympe::DeleteNodeCommand::Execute(), and Olympe::AddNodeCommand::Undo().

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

◆ ValidateTreeFull()

std::vector< BTValidationMessage > BehaviorTreeAsset::ValidateTreeFull ( ) const

Member Data Documentation

◆ id

uint32_t BehaviorTreeAsset::id = 0

◆ name

std::string BehaviorTreeAsset::name

◆ nodes

std::vector<BTNode> BehaviorTreeAsset::nodes

◆ rootNodeId

uint32_t BehaviorTreeAsset::rootNodeId = 0

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