Mercurial > hg > Members > kono > Cerium
annotate Renderer/Engine/SceneGraphRoot.h @ 558:b05bae017029
boss1_action
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 22 Oct 2009 18:38:07 +0900 |
parents | 8148c81d2660 |
children | a5fda4e51498 |
rev | line source |
---|---|
283 | 1 #ifndef INCLUDED_SCENE_GRAPH_ROOT |
2 #define INCLUDED_SCENE_GRAPH_ROOT | |
3 | |
507 | 4 #include "SceneGraph.h" |
5 #include "SceneGraphArray.h" | |
6 #include "Camera.h" | |
7 #include "SceneGraphIterator.h" | |
283 | 8 |
9 class SceneGraphRoot { | |
10 public: | |
11 /* Constructor, Destructor */ | |
12 SceneGraphRoot(float w, float h); | |
558 | 13 ~SceneGraphRoot(); |
283 | 14 |
15 /* Variables */ | |
16 // xml から読み込んだ、オリジナルの SceneGraph | |
509
8148c81d2660
Cerium Rendering Library
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
507
diff
changeset
|
17 SceneGraphPtr sg_src; |
8148c81d2660
Cerium Rendering Library
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
507
diff
changeset
|
18 int sg_src_length; |
283 | 19 |
20 // move, collision 用の SceneGraph (tree) | |
21 SceneGraphPtr sg_exec_tree; | |
22 | |
23 // 描画用の SceneGraph List (tree) | |
24 SceneGraphPtr sg_draw_tree; | |
25 | |
26 // sg_exec_tree に対応する list | |
27 SceneGraphPtr sg_available_list; | |
28 | |
29 // sg_draw_tree に対応する list | |
30 // draw_tree は描画後削除される | |
31 SceneGraphPtr sg_remove_list; | |
32 | |
33 SceneGraphArrayPtr sg_array1; | |
34 SceneGraphArrayPtr sg_array2; | |
35 SceneGraphArrayPtr sg_curArray; | |
36 | |
37 // コントローラーオブジェクト (Keyboard, Joystick, ..) | |
38 Pad *controller; | |
39 | |
40 // カメラオブジェクト | |
41 Camera *camera; | |
42 | |
43 // SceneGraphIterator | |
44 SceneGraphIteratorPtr iterator; | |
45 | |
46 /** | |
47 * Functions | |
48 */ | |
49 /* User API */ | |
507 | 50 void createFromXMLfile(TaskManager *manager, const char *); |
283 | 51 SceneGraphPtr createSceneGraph(int id); |
558 | 52 SceneGraphPtr createSceneGraph(); |
283 | 53 void setSceneData(SceneGraphPtr sg); |
558 | 54 Pad *getController(); |
55 SceneGraphIteratorPtr getIterator(); | |
283 | 56 SceneGraphIteratorPtr getIterator(SceneGraphPtr list); |
558 | 57 CameraPtr getCamera(); |
283 | 58 |
59 /* Other System API */ | |
60 void allExecute(int screen_w, int screen_h); | |
558 | 61 void checkRemove(); |
62 SceneGraphPtr getExecuteSceneGraph(); | |
63 SceneGraphPtr getDrawSceneGraph(); | |
64 void updateControllerState(); | |
283 | 65 |
507 | 66 void speExecute(int screen_w, int screen_h); |
67 | |
283 | 68 /* System API */ |
69 void registSceneGraph(SceneGraphPtr sg); | |
70 void addNext(SceneGraphPtr sg); | |
71 void allRemove(SceneGraphPtr list); | |
72 }; | |
73 | |
74 typedef SceneGraphRoot *SceneGraphRootPtr; | |
75 | |
76 #endif | |
77 | |
507 | 78 // 大域変数は無くすこと |
558 | 79 // move に Controller を渡せば必要ないはず... |
283 | 80 extern SceneGraphRootPtr sgroot; |
558 | 81 |
82 /* end */ |