goat3d

view src/node.cc @ 51:fa5c52ea9d59

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 17 Jan 2014 18:16:09 +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 }