annotate Renderer/Engine/SceneGraphRoot.h @ 539:3bc98f6d31ff draft

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