goat3d
view src/node.cc @ 61:fdece14403ff
max gui
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 31 Mar 2014 09:41:47 +0300 |
parents | 498ca7ac7047 |
children | 99715321ad6d |
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 if(!n) return;
31 for(int i=0; i<n->get_children_count(); i++) {
32 delete_node_tree((Node*)n->get_child(i));
33 }
34 delete n;
35 }