Class Node

Inheritance Relationships

Derived Types

Class Documentation

class Node

Subclassed by ari::Component, ari::Entity

Public Types

enum Type

Values:

Entity = 0
Component
Unknown

Public Functions

Node()

Constructor.

virtual ~Node()

Destructor.

template <class T>
T *AddChild(T *child)

Adds a node as child.

template <class T>
T *GetChild()
template <class T>
tinystl::vector<Node *> GetChildren()
template <class T>
void RemoveChild(T *child)

Removes a child from this node.

Parameters
  • child: The pointer to the child.

void RemoveChildren(bool _delete = false)

Removes all children of this node.

virtual Node *GetParent()

Returns the node parent.

virtual void SetParent(Node *parent)

Sets the node parent.

Node::Type GetType() const

Returns the node type.

Entity *GetParentEntity() const

Returns the parent Entity in the tree.

const tinystl::vector<Node *> &GetChildren() const
World *GetWorld() const
void Destroy(bool addToDestroyQueue = true)

Send the node to the destroy queue. It will be deleted in next two frame;

uint32_t IsInDestroyQueue() const

Protected Attributes

Node *m_pParent
tinystl::vector<Node *> m_vChilds
Node::Type m_eNodeType
World *m_pWorld
uint32_t m_iIsInDestroyQueue = 0
std::unordered_map<TypeIndex, tinystl::vector<Node *>> childs