comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:04e28d8d3c6f
1 #include <stdlib.h>
2 #include <string.h>
3 #include "ExecMove.h"
4 #include "SgChange.h"
5 #include "SceneGraphRoot.h"
6
7 SchedDefineTask(ExecMove);
8
9 static int
10 run(SchedTask *smanager, void *rbuf , void *wbuf)
11 {
12 SgChange *sgchange = (SgChange *)smanager->get_param(0);
13 //SceneGraphRoot *sgroot = (SceneGraphRoot *)smanager->get_param(0);
14 SceneGraphRoot *sgroot = sgchange->sgroot_A;
15 long screen_w = (long)smanager->get_param(1);
16 long screen_h = (long)smanager->get_param(2);
17
18 //sgroot->updateControllerState();
19
20 SceneGraphPtr list = sgroot->sg_available_list;
21 sgroot->allRemove(sgroot->sg_remove_list);
22
23 sgroot->sg_draw_tree = sgroot->sg_exec_tree;
24 sgroot->sg_remove_list = sgroot->sg_available_list;
25
26 sgroot->sg_exec_tree = NULL;
27 sgroot->sg_available_list = NULL;
28
29 sgroot->camera->move_execute(screen_w, screen_h);
30 sgroot->camera->update(screen_w, screen_h);
31
32 sgroot->camera->children = NULL;
33 sgroot->camera->lastChild = NULL;
34
35 list->move_execute(screen_w, screen_h);
36
37 sgroot->list = list;
38
39 return 0;
40 }