Mercurial > hg > Members > kono > tree_dandy2
annotate object.c @ 30:00ef8386edd6
scale_matrix does not work
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 25 Dec 2010 21:04:59 +0900 |
parents | 6754fbb63ac7 |
children |
rev | line source |
---|---|
0 | 1 #include <stdio.h> |
2 #include <stdlib.h> | |
3 #include <string.h> | |
4 #include <libxml/parser.h> | |
5 #include "object.h" | |
6 | |
7 void init_object(OBJECT *obj) | |
8 { | |
9 obj->name = NULL; | |
10 obj->surfaces = NULL; | |
11 } | |
12 | |
13 void free_object(OBJECT *obj) | |
14 { | |
15 SURFACE *cur,*next; | |
16 | |
17 if (obj == NULL) | |
18 { | |
19 printf("obj is NULL\n"); | |
20 return; | |
21 } | |
22 for(cur=obj->surfaces;cur;cur=next) | |
23 { | |
24 next = cur->next; | |
25 free(cur); | |
26 } | |
25 | 27 free(obj); |
0 | 28 } |