goat3d
view src/node.cc @ 52:cb5414f406eb
merged
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 17 Jan 2014 18:27:47 +0200 |
parents | cd71f0b92f44 |
children | dad392c710df ca549434dc95 |
line source
1 #include <algorithm>
2 #include <string.h>
3 #include "node.h"
5 using namespace g3dimpl;
7 Node::Node()
8 {
9 obj = 0;
10 }
12 void Node::set_object(Object *obj)
13 {
14 this->obj = obj;
15 }
17 Object *Node::get_object()
18 {
19 return obj;
20 }
22 const Object *Node::get_object() const
23 {
24 return obj;
25 }
27 void g3dimpl::delete_node_tree(Node *n)
28 {
29 for(int i=0; i<n->get_children_count(); i++) {
30 delete_node_tree((Node*)n->get_child(i));
31 }
32 delete n;
33 }