Mercurial > hg > Game > Cerium
view TaskManager/Test/test_render/SceneGraphRoot.h @ 524:638bd307cde1 draft
complex lindaapi
author | aaa |
---|---|
date | Wed, 21 Oct 2009 21:00:48 +0900 |
parents | 003fe4ee39e2 |
children |
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 "SceneGraphIterator.h" #include "Application.h" #include "SceneGraphList.h" #include "SgStruct.h" #include "TaskManager.h" #include <sys/types.h> typedef struct { caddr_t file_mmap; off_t size; } st_mmap_t; class SceneGraphRoot { public: /* Constructor, Destructor */ SceneGraphRoot(float w, float h); ~SceneGraphRoot(void); /* Variables */ TaskManager *tmanager; // sgid と name を持った SgStruct のリスト SceneGraphList *sglist; // 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(TaskManager *manager, const char *); //void createFromXMLmemory(TaskManager *manager, const char *xml); //void createFromXMLmemory(TaskManager *manager, st_mmap_t mmap_t); const char *createFromXMLmemory(TaskManager *manager, char *data, int len); SceneGraphPtr createSceneGraph(int id); SceneGraphPtr createSceneGraph(void); SceneGraphPtr createSceneGraph(const char *name); 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); 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); }; typedef SceneGraphRoot *SceneGraphRootPtr; #endif // 大域変数は無くすこと extern SceneGraphRootPtr sgroot; extern SceneGraphRootPtr sgroot_2;