Mercurial > hg > Game > Cerium
diff Renderer/test_render/SceneGraphRoot.h @ 283:15bfacccde99 draft
fix test_render
author | e065746@localhost.localdomain |
---|---|
date | Fri, 05 Jun 2009 16:49:12 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Renderer/test_render/SceneGraphRoot.h Fri Jun 05 16:49:12 2009 +0900 @@ -0,0 +1,86 @@ +#ifndef INCLUDED_SCENE_GRAPH_ROOT +#define INCLUDED_SCENE_GRAPH_ROOT + +#ifndef INCLUDED_SCENE_GRAPH +# include "SceneGraph.h" +#endif + +#ifndef INCLUDED_SCENE_GRAPH_ARRAY +# include "SceneGraphArray.h" +#endif + +#ifndef INCLUDED_CAMERA +# include "Camera.h" +#endif + +#ifndef INCLUDED_SCENE_GRAPH_ITERATOR +# include "SceneGraphIterator.h" +#endif + +class SceneGraphRoot { +public: + /* Constructor, Destructor */ + SceneGraphRoot(float w, float h); + ~SceneGraphRoot(void); + + /* Variables */ + // xml から読み込んだ、オリジナルの SceneGraph + SceneGraphPtr *sg_src; + + // move, collision 用の SceneGraph (tree) + SceneGraphPtr sg_exec_tree; + + // 描画用の SceneGraph List (tree) + SceneGraphPtr sg_draw_tree; + + // sg_exec_tree に対応する list + SceneGraphPtr sg_available_list; + + // sg_draw_tree に対応する list + // draw_tree は描画後削除される + SceneGraphPtr sg_remove_list; + + SceneGraphArrayPtr sg_array1; + SceneGraphArrayPtr sg_array2; + SceneGraphArrayPtr sg_curArray; + + // コントローラーオブジェクト (Keyboard, Joystick, ..) + Pad *controller; + + // カメラオブジェクト + Camera *camera; + + // SceneGraphIterator + SceneGraphIteratorPtr iterator; + + /** + * Functions + */ + /* User API */ + void createFromXMLfile(const char *); + SceneGraphPtr createSceneGraph(int id); + SceneGraphPtr createSceneGraph(void); + void setSceneData(SceneGraphPtr sg); + Pad *getController(void); + SceneGraphIteratorPtr getIterator(void); + SceneGraphIteratorPtr getIterator(SceneGraphPtr list); + CameraPtr getCamera(void); + + /* Other System API */ + void allExecute(int screen_w, int screen_h); + void checkRemove(void); + SceneGraphPtr getExecuteSceneGraph(void); + SceneGraphPtr getDrawSceneGraph(void); + void updateControllerState(void); + + /* System API */ + void registSceneGraph(SceneGraphPtr sg); + void addNext(SceneGraphPtr sg); + void allRemove(SceneGraphPtr list); +}; + +typedef SceneGraphRoot *SceneGraphRootPtr; + +#endif + +extern SceneGraphRootPtr sgroot;