Mercurial > hg > Members > kono > Cerium
diff TaskManager/Test/test_render/SceneGraphRoot.cpp @ 199:eb20274baa7c
add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
author | gongo@gendarme.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Mon, 26 Jan 2009 14:02:45 +0900 (2009-01-26) |
parents | 932a05a7a1db |
children | b257e27d995c |
line wrap: on
line diff
--- a/TaskManager/Test/test_render/SceneGraphRoot.cpp Mon Jan 26 10:38:29 2009 +0900 +++ b/TaskManager/Test/test_render/SceneGraphRoot.cpp Mon Jan 26 14:02:45 2009 +0900 @@ -11,9 +11,15 @@ SceneGraphRoot::SceneGraphRoot(void) { sg_src = new SceneGraphPtr[SGLIST_LENGTH]; + camera = new Camera; + sg_exec_list = NULL; sg_draw_list = NULL; sg_available_list = NULL; + + // TODO + // 今はとりあえず camera を Root にしています + sg_exec_list = camera; } SceneGraphRoot::~SceneGraphRoot(void) @@ -27,6 +33,7 @@ } delete [] sg_src; + delete camera; } void @@ -160,10 +167,14 @@ while (p) { p1 = p->next; if (p->isRemoved()) { - p->realRemove(); + sg_exec_list = p->realRemoveFromTree(sg_exec_list); + sg_available_list = p->realRemoveFromList(sg_available_list); } p = p1; } + + // 現在、exec と draw は別で処理できてないので、一緒にする + sg_draw_list = sg_exec_list; } SceneGraphPtr @@ -187,5 +198,13 @@ void SceneGraphRoot::setSceneData(SceneGraphPtr sg) { - sg_draw_list = sg_exec_list = sg; + //sg_draw_list = sg_exec_list = sg; + sg_exec_list->addChild(sg); + sg_draw_list = sg_exec_list; } + +Pad* +SceneGraphRoot::getController(void) +{ + return controller; +}