rcpp_framework/core/nodes/node_tree.cpp

35 lines
452 B
C++
Raw Normal View History

#include "node_tree.h"
2022-01-07 19:28:16 +01:00
#include "node.h"
Node *NodeTree::get_root() {
return _root_node;
}
void NodeTree::set_root(Node *root) {
if (_root_node) {
_root_node->set_tree(nullptr);
}
2022-01-07 19:28:16 +01:00
_root_node = root;
if (_root_node) {
_root_node->set_tree(this);
}
}
void NodeTree::send_update(float delta) {
// todo
2022-01-07 19:28:16 +01:00
}
NodeTree::NodeTree() :
Object() {
}
NodeTree::~NodeTree() {
if (_root_node) {
delete _root_node;
_root_node == nullptr;
}
}