# HG changeset patch # User gongo # Date 1202811996 -32400 # Node ID 650e46810d042139b0824e6504cf17fe3b053b8e # Parent 1e17e0b441a7064ae7401c57d11944f748b56ea8 *** empty log message *** diff -r 1e17e0b441a7 -r 650e46810d04 TaskManager/Test/simple_render/task/update_sgp.cpp --- a/TaskManager/Test/simple_render/task/update_sgp.cpp Tue Feb 12 19:19:06 2008 +0900 +++ b/TaskManager/Test/simple_render/task/update_sgp.cpp Tue Feb 12 19:26:36 2008 +0900 @@ -65,6 +65,7 @@ update_sgp(SceneGraphPack *_sgp, SceneGraphPack *sgp) { SceneGraphNodePtr node; + float y_angle; for (int i = 0; i < sgp->info.size; i++) { //(*my_func[node->move])(node); @@ -72,6 +73,15 @@ node = &sgp->node[i]; + // 本当は、ここは上の my_func で行う + y_angle = node->angle[1]; + y_angle += 1.0f; + if (y_angle > 360.0f) y_angle = 0.0f; + node->angle[1] = y_angle; + node->obj_pos[0] += 0.5f; + node->obj_pos[1] += 0.5f; + node->obj_pos[2] += 0.5f; + if (node->pn != -1) { get_matrix(node->translation, node->angle, node->obj_pos, diff -r 1e17e0b441a7 -r 650e46810d04 TaskManager/Test/simple_render/viewer.cpp --- a/TaskManager/Test/simple_render/viewer.cpp Tue Feb 12 19:19:06 2008 +0900 +++ b/TaskManager/Test/simple_render/viewer.cpp Tue Feb 12 19:26:36 2008 +0900 @@ -389,6 +389,7 @@ this->zRow_init(); graph_line(); +#if 0 // ここは update_sgp if(r > 360) r = 0; r+= 1.0; // r= 0; @@ -405,24 +406,14 @@ p->xyz[1] = y; p->xyz[2] = z; //p->tree_draw(); +#endif -#if 0 - //create_sgp(sgp, p); +#if 1 update_sgp(sgp, sgp); create_pp(pp, sgp); #else - //fd_create_sgp = manager->open("CreateSGP"); fd_update_sgp = manager->open("UpdateSGP"); fd_create_pp = manager->open("CreatePP"); - - /* - task_create_sgp = - manager->create_task(fd_create_sgp, - sizeof(Polygon), - (unsigned int)p, - (unsigned int)sgp, - NULL); - */ task_update_sgp = manager->create_task(fd_update_sgp, sizeof(SceneGraphPack), @@ -436,12 +427,8 @@ (unsigned int)pp, NULL); - //manager->set_task_depend(task_create_sgp, task_update_sgp); - //manager->set_task_depend(task_create_sgp, task_create_pp); - //manager->spawn_task(task_create_sgp); manager->spawn_task(task_update_sgp); manager->spawn_task(task_create_pp); - manager->run(); #endif