![]() |
Blamite Game Engine - Sapien (Library)
00433.02.16.25.2127.blamite
The level editor application for the Blamite Game Engine.
|
Class representing a group hierarchy node. More...
#include <hierarchy.h>
Public Member Functions | |
BlamScenarioHierarchyNode_Group (std::string group_name, int _folder_id) | |
Constructs a new hierarchy group node. More... | |
~BlamScenarioHierarchyNode_Group () | |
void | ReleaseData () |
Releases any data used by this node. More... | |
void | AddChild (BlamScenarioHierarchyNode *node) |
Adds a new item to this group node. More... | |
BlamScenarioHierarchyNode * | GetChildAt (int index) |
Retrieves the child node at the specified index. More... | |
int | GetChildCount () |
Retrieves the total number of child nodes. More... | |
void | RemoveNodeAt (int index, bool delete_object=true) |
Removes the child node at the specified index. More... | |
void | RemoveNode (BlamScenarioHierarchyNode *node, bool delete_object=true) |
Removes a specific child node from this group. More... | |
bool | HasChild (BlamScenarioHierarchyNode *node) |
Checks whether or not a node is a direct child of this node. More... | |
std::vector< BlamScenarioHierarchyNode_Object * > | GetAllObjectNodes () |
Generates a list of all object nodes, within any child nodes. More... | |
![]() | |
BlamScenarioHierarchyNode (BlamScenarioHierarchyNodeType _node_type) | |
Constructs a new scenario hierarchy node. More... | |
BlamScenarioHierarchyNode (BlamScenarioHierarchyNodeType _node_type, std::string _display_name_override) | |
Constructs a new scenario hierarchy node. More... | |
virtual | ~BlamScenarioHierarchyNode () |
BlamScenarioHierarchyNodeType | GetType () |
Retrieves the type of this node. More... | |
virtual std::string | GetName () |
Retrieves the display name of the hierarchy node. More... | |
Public Attributes | |
int | folder_id = -1 |
The folder ID of this group. This number should be unique within the hierarchy. More... | |
![]() | |
BlamScenarioHierarchyNode * | parent_node = nullptr |
The parent node, if any, of this hierarchy node. More... | |
Additional Inherited Members | |
![]() | |
bool | use_custom_name = false |
Whether or not to use a custom display name for the node. More... | |
std::string | display_name_override = "unspecified" |
The custom display name of this hierarchy node. More... | |
Class representing a group hierarchy node.
Groups act as folders, allowing for better organization of objects within the hierarchy.
BlamScenarioHierarchyNode_Group::BlamScenarioHierarchyNode_Group | ( | std::string | group_name, |
int | _folder_id | ||
) |
Constructs a new hierarchy group node.
group_name | - The name of this group. |
_folder_id | - The folder ID of this group. |
BlamScenarioHierarchyNode_Group::~BlamScenarioHierarchyNode_Group | ( | ) |
void BlamScenarioHierarchyNode_Group::AddChild | ( | BlamScenarioHierarchyNode * | node | ) |
Adds a new item to this group node.
node | - The new child node to add. |
std::vector< BlamScenarioHierarchyNode_Object * > BlamScenarioHierarchyNode_Group::GetAllObjectNodes | ( | ) |
Generates a list of all object nodes, within any child nodes.
BlamScenarioHierarchyNode * BlamScenarioHierarchyNode_Group::GetChildAt | ( | int | index | ) |
Retrieves the child node at the specified index.
index | - The index of the desired child node. |
nullptr
if the index was out of range. int BlamScenarioHierarchyNode_Group::GetChildCount | ( | ) |
Retrieves the total number of child nodes.
bool BlamScenarioHierarchyNode_Group::HasChild | ( | BlamScenarioHierarchyNode * | node | ) |
Checks whether or not a node is a direct child of this node.
node | - The child node to check. |
true
if the specified node is a direct child of this node, otherwise returns false
. void BlamScenarioHierarchyNode_Group::ReleaseData | ( | ) |
Releases any data used by this node.
This will also release the data used by any and all child nodes.
void BlamScenarioHierarchyNode_Group::RemoveNode | ( | BlamScenarioHierarchyNode * | node, |
bool | delete_object = true |
||
) |
Removes a specific child node from this group.
node
is not nullptr
and delete_object
is set to true
, then the provided node will be deleted - regardless of if it is a child of this node or not.node | - The node to remove. |
delete_object | - Whether or not to delete the node data itself. |
void BlamScenarioHierarchyNode_Group::RemoveNodeAt | ( | int | index, |
bool | delete_object = true |
||
) |
Removes the child node at the specified index.
If the specified index was out of range, then no operations are performed.
index | - The index of the child to remove. |
delete_object | - Whether or not to delete the node data itself. |
int BlamScenarioHierarchyNode_Group::folder_id = -1 |
The folder ID of this group. This number should be unique within the hierarchy.