changeset 761:be6e43d977d1

add task/ExecMove
author hiroki
date Thu, 04 Feb 2010 14:50:01 +0900
parents 24a37fe8419a
children 10a8a80c2ea7 87390c99c900
files Renderer/Engine/task/ExecMove.cc Renderer/Engine/task/ExecMove.h
diffstat 2 files changed, 47 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /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 <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;
+    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;
+}
--- /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