diff TaskManager/Test/test_render/SceneGraphRoot.cc @ 421:6094dfd1f08c draft

comment
author game@henri.cr.ie.u-ryukyu.ac.jp
date Thu, 24 Sep 2009 12:35:32 +0900
parents 0d2dc1869cbe
children 217258e3d148
line wrap: on
line diff
--- a/TaskManager/Test/test_render/SceneGraphRoot.cc	Wed Sep 23 21:29:30 2009 +0900
+++ b/TaskManager/Test/test_render/SceneGraphRoot.cc	Thu Sep 24 12:35:32 2009 +0900
@@ -196,39 +196,11 @@
     }
 
     /*removeのflagをもとにtreeを形成*/
-    while (t) {
-	SceneGraphPtr c = NULL;
-	if (!t->isRemoved()) {
-	    c = t->clone();	    
-	    addNext(c);
-	    cur_parent->addChild(c);
-	    c->frame = t->frame;
-            /*親の回転、座標から、子の回転、座標を算出*/
-            get_matrix(c->matrix, c->angle, c->xyz, cur_parent->matrix);
-        } 
-
-	if (t->children != NULL && c != NULL) {
-	    cur_parent = c;
-	    t = t->children;
-	} else if (t->brother != NULL) {
-	    t = t->brother;
-	} else {
-	    while (t) {
-		if (t->brother != NULL) {
-		    t = t->brother;
-		    break;
-		} else {
-		    if (t->parent == NULL) {
-			t = NULL;
-			break;
-		    } else {
-                        cur_parent = cur_parent->parent;
-                        t = t->parent;
-			
-		    }
-		}
-	    }	    
-	}
+    /* spe から送り返されてきた property の配列を見て生成する for()*/
+    for (Property *t = property[0]; is_end(t); t++){
+	SceneGraphPtr s = application->scenegraph_factory(t); // SceneGraphNode を作る
+	t->scenegraph = s; // property list には SceneGraphへのポインタが入っている
+	application->scenegraph_connector(property[0], s); // add する
     }