Botcraft 1.21.4
Loading...
Searching...
No Matches
BehaviourRenderer.cpp File Reference

Go to the source code of this file.

Classes

struct  Botcraft::Renderer::ImNode
 A class to hold data to be drawn on ImNode context. More...
 
struct  Botcraft::Renderer::TreePosNode
 

Namespaces

namespace  Botcraft
 
namespace  Botcraft::Renderer
 

Enumerations

enum class  Botcraft::Renderer::ImNodeStatus { Botcraft::Renderer::Idle , Botcraft::Renderer::Success , Botcraft::Renderer::Failure , Botcraft::Renderer::Running }
 

Functions

std::vector< std::unique_ptr< ImNode > > Botcraft::Renderer::UnrollTreeStructure (const BaseNode *node, const int index=1)
 Convert a tree to a vector of ImNode with proper data.
 
void Botcraft::Renderer::PlaceNodesBuchheim (ImNode *root)
 Apply Buchheim & al.
 
void Botcraft::Renderer::FirstWalk (TreePosNode *v)
 
void Botcraft::Renderer::SecondWalk (TreePosNode *v, const float m=0.0f)
 
TreePosNodeBotcraft::Renderer::Apportion (TreePosNode *v, TreePosNode *default_ancestor)
 
TreePosNodeBotcraft::Renderer::Ancestor (TreePosNode *vim, TreePosNode *v, TreePosNode *default_ancestor)
 
void Botcraft::Renderer::ExecuteShifts (TreePosNode *v)
 
void Botcraft::Renderer::MoveSubtree (TreePosNode *wm, TreePosNode *wp, const float shift)
 
void Botcraft::Renderer::GetMaxWidthPerDepthLevel (TreePosNode *node, std::vector< float > &max_width_depth)
 
void Botcraft::Renderer::SetRealNodePos (TreePosNode *node, std::vector< float > &max_width_depth)
 
ImColor Botcraft::Renderer::GetNodeColor (const BehaviourNodeType type)
 
ImColor Botcraft::Renderer::GetStatusColor (const ImNodeStatus s)
 
void Botcraft::Renderer::ToggleNodeVisibility (ImNode *node, const bool b)
 
ImVec4 Botcraft::Renderer::ColorInterpolation (const ImVec4 &a, const ImVec4 &b, const float t)
 
void Botcraft::Renderer::RecursiveRenderBlackboardJsonNode (const std::string &name, ProtocolCraft::Json::Value &node)
 
void Botcraft::Renderer::RecursiveUpdateTimerBlackboardJsonNode (ProtocolCraft::Json::Value &node)
 

Variables

static constexpr float TREE_SPACING_VERTICAL = 50.0f
 
static constexpr float TREE_SPACING_HORIZONTAL = 150.0f
 
static constexpr float MIN_NODE_WIDTH = 200.0f
 
static constexpr float PIN_RADIUS = 5.0f
 
static constexpr float LINK_THICKNESS = 4.0f
 
static constexpr double BLACKBOARD_HIGHLIGHT_DURATION = 0.5
 
static const ImVec4 BLACKBOARD_HIGHLIGHT_COLOR = ImVec4(1.0f, 0.0f, 0.0f, 1.0f)
 

Variable Documentation

◆ BLACKBOARD_HIGHLIGHT_COLOR

const ImVec4 BLACKBOARD_HIGHLIGHT_COLOR = ImVec4(1.0f, 0.0f, 0.0f, 1.0f)
static

◆ BLACKBOARD_HIGHLIGHT_DURATION

◆ LINK_THICKNESS

constexpr float LINK_THICKNESS = 4.0f
staticconstexpr

◆ MIN_NODE_WIDTH

constexpr float MIN_NODE_WIDTH = 200.0f
staticconstexpr

◆ PIN_RADIUS

constexpr float PIN_RADIUS = 5.0f
staticconstexpr

◆ TREE_SPACING_HORIZONTAL

constexpr float TREE_SPACING_HORIZONTAL = 150.0f
staticconstexpr

Definition at line 11 of file BehaviourRenderer.cpp.

Referenced by Botcraft::Renderer::SetRealNodePos().

◆ TREE_SPACING_VERTICAL

constexpr float TREE_SPACING_VERTICAL = 50.0f
staticconstexpr