Mercurial > hg > Members > e085722 > Cerium
diff Renderer/Engine/task/ExecMove.cc @ 0:04e28d8d3c6f
first commit
author | Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 08 Nov 2010 01:23:25 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Renderer/Engine/task/ExecMove.cc Mon Nov 08 01:23:25 2010 +0900 @@ -0,0 +1,40 @@ +#include <stdlib.h> +#include <string.h> +#include "ExecMove.h" +#include "SgChange.h" +#include "SceneGraphRoot.h" + +SchedDefineTask(ExecMove); + +static int +run(SchedTask *smanager, void *rbuf , void *wbuf) +{ + SgChange *sgchange = (SgChange *)smanager->get_param(0); + //SceneGraphRoot *sgroot = (SceneGraphRoot *)smanager->get_param(0); + SceneGraphRoot *sgroot = sgchange->sgroot_A; + long screen_w = (long)smanager->get_param(1); + long screen_h = (long)smanager->get_param(2); + + //sgroot->updateControllerState(); + + SceneGraphPtr list = sgroot->sg_available_list; + sgroot->allRemove(sgroot->sg_remove_list); + + sgroot->sg_draw_tree = sgroot->sg_exec_tree; + sgroot->sg_remove_list = sgroot->sg_available_list; + + sgroot->sg_exec_tree = NULL; + sgroot->sg_available_list = NULL; + + sgroot->camera->move_execute(screen_w, screen_h); + sgroot->camera->update(screen_w, screen_h); + + sgroot->camera->children = NULL; + sgroot->camera->lastChild = NULL; + + list->move_execute(screen_w, screen_h); + + sgroot->list = list; + + return 0; +}