Mercurial > hg > Game > Cerium
changeset 36:650e46810d04
*** empty log message ***
author | gongo |
---|---|
date | Tue, 12 Feb 2008 19:26:36 +0900 |
parents | 1e17e0b441a7 |
children | cd0b54a564a9 |
files | TaskManager/Test/simple_render/task/update_sgp.cpp TaskManager/Test/simple_render/viewer.cpp |
diffstat | 2 files changed, 13 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- 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,
--- 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