![]() |
Botcraft 1.21.4
|
Classes | |
class | Atlas |
class | BehaviourRenderer |
class | BlockRenderable |
class | Camera |
class | Chunk |
class | Entity |
class | Face |
struct | FaceTransformation |
struct | IMatrix |
struct | ImNode |
A class to hold data to be drawn on ImNode context. More... | |
class | RenderingManager |
class | Rotation |
class | Scale |
class | Shader |
struct | Texture |
struct | TextureData |
class | Transformation |
class | Translation |
class | TransparentChunk |
struct | TreePosNode |
class | WorldRenderer |
Typedefs | |
typedef std::shared_ptr< Transformation > | TransformationPtr |
typedef std::shared_ptr< Scale > | ScalePtr |
Enumerations | |
enum class | Transparency { Opaque , Total , Partial } |
Transparency values for textures. More... | |
enum class | Animation { Static , Animated } |
Animation status of a texture. More... | |
enum class | KEY_CODE { FORWARD = 0 , BACKWARD , RIGHT , LEFT , SPACE , SHIFT , CTRL , ESC , MOUSE_LEFT , INVENTORY , BEHAVIOUR , NUMBER_OF_KEYS } |
enum class | BufferStatus { Created , Updated , UpToDate } |
enum class | FrustumResult { Outside = 0 , Intersect , Inside } |
enum class | ImNodeStatus { Idle , Success , Failure , Running } |
Functions | |
void | WriteImage (const std::string &path, const int height, const int width, const int depth, const unsigned char *data, const bool vertical_revert=true) |
std::vector< std::unique_ptr< ImNode > > | UnrollTreeStructure (const BaseNode *node, const int index=1) |
Convert a tree to a vector of ImNode with proper data. | |
void | PlaceNodesBuchheim (ImNode *root) |
Apply Buchheim & al. | |
void | FirstWalk (TreePosNode *v) |
void | SecondWalk (TreePosNode *v, const float m=0.0f) |
TreePosNode * | Apportion (TreePosNode *v, TreePosNode *default_ancestor) |
TreePosNode * | Ancestor (TreePosNode *vim, TreePosNode *v, TreePosNode *default_ancestor) |
void | ExecuteShifts (TreePosNode *v) |
void | MoveSubtree (TreePosNode *wm, TreePosNode *wp, const float shift) |
void | GetMaxWidthPerDepthLevel (TreePosNode *node, std::vector< float > &max_width_depth) |
void | SetRealNodePos (TreePosNode *node, std::vector< float > &max_width_depth) |
ImColor | GetNodeColor (const BehaviourNodeType type) |
ImColor | GetStatusColor (const ImNodeStatus s) |
void | ToggleNodeVisibility (ImNode *node, const bool b) |
ImVec4 | ColorInterpolation (const ImVec4 &a, const ImVec4 &b, const float t) |
void | RecursiveRenderBlackboardJsonNode (const std::string &name, ProtocolCraft::Json::Value &node) |
void | RecursiveUpdateTimerBlackboardJsonNode (ProtocolCraft::Json::Value &node) |
const float | Distance (const Face &f, const glm::vec3 &pos) |
typedef std::shared_ptr<Scale> Botcraft::Renderer::ScalePtr |
Definition at line 61 of file Transformation.hpp.
typedef std::shared_ptr<Transformation> Botcraft::Renderer::TransformationPtr |
Definition at line 60 of file Transformation.hpp.
|
strong |
|
strong |
Enumerator | |
---|---|
Created | |
Updated | |
UpToDate |
Definition at line 13 of file BlockRenderable.hpp.
|
strong |
Enumerator | |
---|---|
Outside | |
Intersect | |
Inside |
Definition at line 31 of file WorldRenderer.hpp.
|
strong |
Enumerator | |
---|---|
Idle | |
Success | |
Failure | |
Running |
Definition at line 23 of file BehaviourRenderer.cpp.
|
strong |
Enumerator | |
---|---|
FORWARD | |
BACKWARD | |
RIGHT | |
LEFT | |
SPACE | |
SHIFT | |
CTRL | |
ESC | |
MOUSE_LEFT | |
INVENTORY | |
BEHAVIOUR | |
NUMBER_OF_KEYS |
Definition at line 34 of file RenderingManager.hpp.
|
strong |
TreePosNode * Botcraft::Renderer::Ancestor | ( | TreePosNode * | vim, |
TreePosNode * | v, | ||
TreePosNode * | default_ancestor | ||
) |
Definition at line 878 of file BehaviourRenderer.cpp.
References Botcraft::Renderer::TreePosNode::ancestor, Botcraft::Renderer::TreePosNode::children, and Botcraft::Renderer::TreePosNode::parent.
Referenced by Apportion().
TreePosNode * Botcraft::Renderer::Apportion | ( | TreePosNode * | v, |
TreePosNode * | default_ancestor | ||
) |
Definition at line 822 of file BehaviourRenderer.cpp.
References Botcraft::Renderer::TreePosNode::ancestor, Ancestor(), Botcraft::Renderer::TreePosNode::GetLeftMostSibling(), Botcraft::Renderer::ImNode::height, Botcraft::Renderer::TreePosNode::LeftBrother(), Botcraft::Renderer::TreePosNode::mod, MoveSubtree(), Botcraft::Renderer::TreePosNode::NextLeft(), Botcraft::Renderer::TreePosNode::NextRight(), Botcraft::Renderer::TreePosNode::prelim, Botcraft::Renderer::TreePosNode::real_node, Botcraft::Renderer::TreePosNode::thread, and TREE_SPACING_VERTICAL.
Referenced by FirstWalk().
ImVec4 Botcraft::Renderer::ColorInterpolation | ( | const ImVec4 & | a, |
const ImVec4 & | b, | ||
const float | t | ||
) |
Definition at line 269 of file BehaviourRenderer.cpp.
Referenced by RecursiveRenderBlackboardJsonNode().
const float Botcraft::Renderer::Distance | ( | const Face & | f, |
const glm::vec3 & | pos | ||
) |
Definition at line 14 of file TransparentChunk.cpp.
References Botcraft::Renderer::Face::GetMatrix().
void Botcraft::Renderer::ExecuteShifts | ( | TreePosNode * | v | ) |
Definition at line 895 of file BehaviourRenderer.cpp.
References Botcraft::Renderer::TreePosNode::change, Botcraft::Renderer::TreePosNode::children, Botcraft::Renderer::TreePosNode::mod, Botcraft::Renderer::TreePosNode::prelim, and Botcraft::Renderer::TreePosNode::shift.
Referenced by FirstWalk().
void Botcraft::Renderer::FirstWalk | ( | TreePosNode * | v | ) |
Definition at line 772 of file BehaviourRenderer.cpp.
References Apportion(), Botcraft::Renderer::TreePosNode::children, ExecuteShifts(), FirstWalk(), Botcraft::Renderer::ImNode::height, Botcraft::Renderer::TreePosNode::IsLeaf(), Botcraft::Renderer::TreePosNode::IsLeftmostSibling(), Botcraft::Renderer::TreePosNode::LeftBrother(), Botcraft::Renderer::TreePosNode::mod, Botcraft::Renderer::TreePosNode::prelim, Botcraft::Renderer::TreePosNode::real_node, and TREE_SPACING_VERTICAL.
Referenced by FirstWalk(), and PlaceNodesBuchheim().
void Botcraft::Renderer::GetMaxWidthPerDepthLevel | ( | TreePosNode * | node, |
std::vector< float > & | max_width_depth | ||
) |
Definition at line 920 of file BehaviourRenderer.cpp.
References Botcraft::Renderer::TreePosNode::children, Botcraft::Renderer::TreePosNode::depth, GetMaxWidthPerDepthLevel(), Botcraft::Renderer::TreePosNode::real_node, and Botcraft::Renderer::ImNode::width.
Referenced by GetMaxWidthPerDepthLevel(), and PlaceNodesBuchheim().
ImColor Botcraft::Renderer::GetNodeColor | ( | const BehaviourNodeType | type | ) |
Definition at line 951 of file BehaviourRenderer.cpp.
References Botcraft::Composite, Botcraft::Decorator, Botcraft::Leaf, and Botcraft::Tree.
Referenced by Botcraft::Renderer::BehaviourRenderer::RenderNode().
ImColor Botcraft::Renderer::GetStatusColor | ( | const ImNodeStatus | s | ) |
Definition at line 969 of file BehaviourRenderer.cpp.
References Failure, Idle, Running, and Success.
Referenced by Botcraft::Renderer::BehaviourRenderer::RenderNode(), and Botcraft::Renderer::BehaviourRenderer::RenderNodes().
void Botcraft::Renderer::MoveSubtree | ( | TreePosNode * | wm, |
TreePosNode * | wp, | ||
const float | shift | ||
) |
Definition at line 909 of file BehaviourRenderer.cpp.
References Botcraft::Renderer::TreePosNode::change, Botcraft::Renderer::TreePosNode::mod, Botcraft::Renderer::TreePosNode::number, Botcraft::Renderer::TreePosNode::prelim, and Botcraft::Renderer::TreePosNode::shift.
Referenced by Apportion().
void Botcraft::Renderer::PlaceNodesBuchheim | ( | ImNode * | root | ) |
Apply Buchheim & al.
algorithm to position all nodes in the tree (position is directly set inside the nodes) Christoph Buchheim, Michael Jünger, and Sebastian Leipert, "Improving Walker’s algorithm to run in linear time", 2002
Definition at line 759 of file BehaviourRenderer.cpp.
References FirstWalk(), GetMaxWidthPerDepthLevel(), Botcraft::Renderer::TreePosNode::prelim, SecondWalk(), and SetRealNodePos().
Referenced by Botcraft::Renderer::BehaviourRenderer::RenderNodes().
void Botcraft::Renderer::RecursiveRenderBlackboardJsonNode | ( | const std::string & | name, |
ProtocolCraft::Json::Value & | node | ||
) |
Definition at line 288 of file BehaviourRenderer.cpp.
References BLACKBOARD_HIGHLIGHT_COLOR, BLACKBOARD_HIGHLIGHT_DURATION, ColorInterpolation(), ProtocolCraft::Json::Value::contains(), ProtocolCraft::Json::Value::get_object(), and RecursiveRenderBlackboardJsonNode().
Referenced by RecursiveRenderBlackboardJsonNode(), and Botcraft::Renderer::BehaviourRenderer::RenderBlackboard().
void Botcraft::Renderer::RecursiveUpdateTimerBlackboardJsonNode | ( | ProtocolCraft::Json::Value & | node | ) |
Definition at line 323 of file BehaviourRenderer.cpp.
References ProtocolCraft::Json::Value::contains(), ProtocolCraft::Json::Value::get_object(), and RecursiveUpdateTimerBlackboardJsonNode().
Referenced by RecursiveUpdateTimerBlackboardJsonNode(), and Botcraft::Renderer::BehaviourRenderer::RenderBlackboard().
void Botcraft::Renderer::SecondWalk | ( | TreePosNode * | v, |
const float | m = 0.0f |
||
) |
Definition at line 813 of file BehaviourRenderer.cpp.
References Botcraft::Renderer::TreePosNode::children, Botcraft::Renderer::TreePosNode::mod, Botcraft::Renderer::TreePosNode::prelim, and SecondWalk().
Referenced by PlaceNodesBuchheim(), and SecondWalk().
void Botcraft::Renderer::SetRealNodePos | ( | TreePosNode * | node, |
std::vector< float > & | max_width_depth | ||
) |
Definition at line 935 of file BehaviourRenderer.cpp.
References Botcraft::Renderer::TreePosNode::children, Botcraft::Renderer::TreePosNode::depth, Botcraft::Renderer::TreePosNode::prelim, Botcraft::Renderer::TreePosNode::real_node, SetRealNodePos(), TREE_SPACING_HORIZONTAL, Botcraft::Renderer::ImNode::width, Botcraft::Renderer::ImNode::x, and Botcraft::Renderer::ImNode::y.
Referenced by PlaceNodesBuchheim(), and SetRealNodePos().
void Botcraft::Renderer::ToggleNodeVisibility | ( | ImNode * | node, |
const bool | b | ||
) |
Definition at line 987 of file BehaviourRenderer.cpp.
References Botcraft::Renderer::ImNode::children, ToggleNodeVisibility(), and Botcraft::Renderer::ImNode::visible.
Referenced by Botcraft::Renderer::BehaviourRenderer::RenderNode(), and ToggleNodeVisibility().
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.
node | Root node of the tree |
index | Index to give to the next node/pin |
Definition at line 617 of file BehaviourRenderer.cpp.
References Botcraft::BaseNode::GetChild(), Botcraft::BaseNode::GetClassName(), Botcraft::BaseNode::GetName(), Botcraft::BaseNode::GetNodeType(), Botcraft::BaseNode::GetNumChildren(), and UnrollTreeStructure().
Referenced by Botcraft::Renderer::BehaviourRenderer::SetCurrentBehaviourTree(), and UnrollTreeStructure().
void Botcraft::Renderer::WriteImage | ( | const std::string & | path, |
const int | height, | ||
const int | width, | ||
const int | depth, | ||
const unsigned char * | data, | ||
const bool | vertical_revert = true |
||
) |
Definition at line 13 of file ImageSaver.cpp.
Referenced by Botcraft::Renderer::RenderingManager::Run().