Mercurial > hg > Members > kono > Cerium
view Renderer/Engine/SceneGraphRoot.h @ 639:70c5c2d2eb24
fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 19 Nov 2009 18:45:24 +0900 |
parents | 5c5cd31b9d43 |
children | d0b8860c17f8 |
line wrap: on
line source
#ifndef INCLUDED_SCENE_GRAPH_ROOT #define INCLUDED_SCENE_GRAPH_ROOT #include "SceneGraph.h" #include "SceneGraphArray.h" #include "Camera.h" #include "Light.h" #include "SceneGraphIterator.h" #include <sys/types.h> typedef struct { caddr_t file_mmap; off_t size; } st_mmap_t; class Application; class SceneGraphRoot { public: /* Constructor, Destructor */ SceneGraphRoot(float w, float h); ~SceneGraphRoot(); /* Variables */ TaskManager *tmanager; // xml から読み込んだ、オリジナルの SceneGraph // Static Singleton // SceneGraphPtr *sg_src; // int sg_src_length; // 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; // 光源のオブジェクト Light *light; // SceneGraphIterator SceneGraphIteratorPtr iterator; // fd of Linda taple space int tid; /** * Functions */ /* User API */ void createFromXMLfile(TaskManager *manager, const char *); void createFromXMLmemory(TaskManager *manager, SceneGraph * node, char *data, int len); SceneGraphPtr createSceneGraph(int id); SceneGraphPtr createSceneGraph(); SceneGraphPtr createSceneGraph(const char *name); int getSgid(const char *name); void setSceneData(SceneGraphPtr sg); Pad *getController(); SceneGraphIteratorPtr getIterator(); SceneGraphIteratorPtr getIterator(SceneGraphPtr list); CameraPtr getCamera(); LightPtr getLight(); /* Other System API */ void allExecute(int screen_w, int screen_h); void checkRemove(); SceneGraphPtr getExecuteSceneGraph(); SceneGraphPtr getDrawSceneGraph(); void updateControllerState(); void speExecute(int screen_w, int screen_h); void speExecute(int screen_w, int screen_h, Application *app); /* System API */ void registSceneGraph(SceneGraphPtr sg); void registSceneGraphList(SceneGraphPtr sg); void addSceneGraphList(TaskManager *manager, SceneGraphPtr tmp); void addNext(SceneGraphPtr sg); void allRemove(SceneGraphPtr list); int getLast() ; }; typedef SceneGraphRoot *SceneGraphRootPtr; // 大域変数は無くすこと extern SceneGraphRoot *sgroot; #endif /* end */