# HG changeset patch # User hiroki # Date 1265262601 -32400 # Node ID 0a602ba186e5f4425b1e220ca048ad1bb8651241 # Parent 45f7ab7101ea7deaf5eb2f112357944695aa7a46 add task/ExecMove diff -r 45f7ab7101ea -r 0a602ba186e5 Renderer/Engine/task/ExecMove.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Renderer/Engine/task/ExecMove.cc Thu Feb 04 14:50:01 2010 +0900 @@ -0,0 +1,40 @@ +#include +#include +#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; + int screen_w = (int)smanager->get_param(1); + int screen_h = (int)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; +} diff -r 45f7ab7101ea -r 0a602ba186e5 Renderer/Engine/task/ExecMove.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Renderer/Engine/task/ExecMove.h Thu Feb 04 14:50:01 2010 +0900 @@ -0,0 +1,7 @@ +#ifndef INCLUDED_EXEC_MOVE +#define INCLUDED_EXEC_MOVE + +#include "SceneGraphRoot.h" +#include "SchedTask.h" + +#endif