Mercurial > hg > Members > kono > Cerium
diff Renderer/Test/create_task.cc @ 763:87390c99c900
Test/create_task.cc work
author | hiroki@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Sun, 07 Feb 2010 17:43:23 +0900 |
parents | 24a37fe8419a |
children | 2a00c1f470b7 |
line wrap: on
line diff
--- a/Renderer/Test/create_task.cc Thu Feb 04 14:50:01 2010 +0900 +++ b/Renderer/Test/create_task.cc Sun Feb 07 17:43:23 2010 +0900 @@ -5,6 +5,7 @@ #include "create_task.h" #include "types.h" #include "Func.h" +#include "sys.h" #include "SgChange.h" Property *property, *update_property; @@ -30,7 +31,6 @@ //property_task->add_inData((Property *)node->property, sizeof(Property)); //property_task->add_outData((Property *)node->update_property, sizeof(Property)); - //property_task->set_param(0, (memaddr)sgroot->move_finish_flag); property_task->set_cpu(SPE_ANY); property_task->set_post(createSceneGraphFromProperty, (void *)sgroot, 0); @@ -50,12 +50,18 @@ SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_; SceneGraphPtr node; + // ここが allExecute の tree をたどって clone して行くところに相当する node = sgroot->createSceneGraph(update_property->name); //node = sgroot->createSceneGraph("Ball"); node->set_move_collision(move, collision); node->xyz[0] = update_property->xyz[0]; node->xyz[1] = update_property->xyz[1]; node->xyz[2] = update_property->xyz[2]; + + // get matrix + get_matrix(node->matrix, node->angle, node->xyz, sgroot->camera->matrix); + get_matrix(node->real_matrix, node->angle, node->xyz, sgroot->camera->real_matrix); + sgroot->setSceneData(node); Property *tmp = property; @@ -115,6 +121,7 @@ // SgChange を使うための2行 SgChange *sgroot = new SgChange(viewer); sgroot->run_init(); + // 上で書いた regist_task() を登録 sgroot->sgroot_A->appTaskRegist(regist_task); property = (Property *)sgroot->manager->allocate(sizeof(Property));