diff TaskManager/Test/test_render/SceneGraphRoot.cc @ 427:b48df6332eb8

add Application.{cc, h}
author game@henri.cr.ie.u-ryukyu.ac.jp
date Thu, 24 Sep 2009 17:44:09 +0900
parents afb717c43a3c
children cf2704424cc0
line wrap: on
line diff
--- a/TaskManager/Test/test_render/SceneGraphRoot.cc	Thu Sep 24 15:26:58 2009 +0900
+++ b/TaskManager/Test/test_render/SceneGraphRoot.cc	Thu Sep 24 17:44:09 2009 +0900
@@ -77,7 +77,7 @@
 void
 SceneGraphRoot::addNext(SceneGraphPtr sg)
 {
-    SceneGraphPtr last = sg_available_list;
+     SceneGraphPtr last = sg_available_list;
 
     if (!last) {
 	sg_available_list = sg;
@@ -160,13 +160,13 @@
 }
 
 void
-SceneGraphRoot::speExecute(int screen_w, int screen_h)
+SceneGraphRoot::speExecute(Application application, int screen_w, int screen_h)
 {
-
+    
     SceneGraphPtr list = sg_available_list;
     SceneGraphPtr t = sg_exec_tree;
     SceneGraphPtr cur_parent = camera;
-
+    
     // 前フレームで描画した SceneGraph は削除
     allRemove(sg_remove_list);
 
@@ -185,11 +185,11 @@
     camera->children = NULL;
     camera->lastChild = NULL;
     
-    list->move_execute(screen_w, screen_h);
-    list->collision_check(screen_w, screen_h, list);	
+    void *property = application->move_execute(screen_w, screen_h);
+    application->collision_check(screen_w, screen_h, list);	
     
-    list->frame++; 
-    list = list->next;
+    //list->frame++; 
+    //list = list->next;
 
     if(sg_exec_tree != NULL) {
       return;
@@ -197,24 +197,15 @@
 
     /*removeのflagをもとにtreeを形成*/
     /* 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 する
+	application->scenegraph_connector(property[0], s, sg_available_list); // add する
     }
-    */
-
-      
-
+        
     // 現在、allExecute が終わった時点では
     // camera->children が User SceneGraph の root になる
-
-    /**
-     * NULL じゃなかったら、setSceneData が呼ばれてるから
-     * そっちを次の Scene にする
-     */
-
     sg_exec_tree = camera->children;
 }