goat3d

annotate src/node.cc @ 58:d317eb4f83da

- made everything compile properly on windows again - removed libanim/libvmath, we'll use them as external dependencies - added new maxgoat_stub 3dsmax plugin project. Gets loaded as a max plugin and loads the actual maxgoat (and later maxgoat_anim) exporters on demand, to allow reloading the actual exporters without having to restart 3dsmax (which takes AGES).
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 25 Mar 2014 03:19:55 +0200
parents 498ca7ac7047
children 99715321ad6d
rev   line source
nuclear@0 1 #include <algorithm>
nuclear@0 2 #include <string.h>
nuclear@0 3 #include "node.h"
nuclear@0 4
nuclear@47 5 using namespace g3dimpl;
nuclear@47 6
nuclear@0 7 Node::Node()
nuclear@0 8 {
nuclear@8 9 obj = 0;
nuclear@0 10 }
nuclear@0 11
nuclear@8 12 void Node::set_object(Object *obj)
nuclear@0 13 {
nuclear@8 14 this->obj = obj;
nuclear@0 15 }
nuclear@0 16
nuclear@8 17 Object *Node::get_object()
nuclear@0 18 {
nuclear@8 19 return obj;
nuclear@0 20 }
nuclear@0 21
nuclear@8 22 const Object *Node::get_object() const
nuclear@0 23 {
nuclear@8 24 return obj;
nuclear@0 25 }
nuclear@0 26
nuclear@47 27 void g3dimpl::delete_node_tree(Node *n)
nuclear@0 28 {
nuclear@56 29 if(!n) return;
nuclear@56 30
nuclear@8 31 for(int i=0; i<n->get_children_count(); i++) {
nuclear@8 32 delete_node_tree((Node*)n->get_child(i));
nuclear@0 33 }
nuclear@8 34 delete n;
nuclear@0 35 }