annotate Renderer/Engine/SceneGraphRoot.h @ 541:1a31b8820a4d draft

Cerium Rendering Library
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 12 Oct 2009 10:17:09 +0900
parents 3bc98f6d31ff
children 00428ba0ba03
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
541
1a31b8820a4d Cerium Rendering Library
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 539
diff changeset
17 SceneGraphPtr sg_src;
1a31b8820a4d Cerium Rendering Library
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 539
diff changeset
18 int sg_src_length;
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
19
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
20 // move, collision 用の SceneGraph (tree)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
21 SceneGraphPtr sg_exec_tree;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
22
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
23 // 描画用の SceneGraph List (tree)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
24 SceneGraphPtr sg_draw_tree;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
25
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
26 // sg_exec_tree に対応する list
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
27 SceneGraphPtr sg_available_list;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
28
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
29 // sg_draw_tree に対応する list
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
30 // draw_tree は描画後削除される
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
31 SceneGraphPtr sg_remove_list;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
32
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
33 SceneGraphArrayPtr sg_array1;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
34 SceneGraphArrayPtr sg_array2;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
35 SceneGraphArrayPtr sg_curArray;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
36
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
37 // コントローラーオブジェクト (Keyboard, Joystick, ..)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
38 Pad *controller;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
39
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
40 // カメラオブジェクト
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
41 Camera *camera;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
42
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
43 // SceneGraphIterator
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
44 SceneGraphIteratorPtr iterator;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
45
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
46 /**
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
47 * Functions
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
48 */
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
49 /* User API */
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
50 void createFromXMLfile(TaskManager *manager, const char *);
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
51 SceneGraphPtr createSceneGraph(int id);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
52 SceneGraphPtr createSceneGraph(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
53 void setSceneData(SceneGraphPtr sg);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
54 Pad *getController(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
55 SceneGraphIteratorPtr getIterator(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
56 SceneGraphIteratorPtr getIterator(SceneGraphPtr list);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
57 CameraPtr getCamera(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
58
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
59 /* Other System API */
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
60 void allExecute(int screen_w, int screen_h);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
61 void checkRemove(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
62 SceneGraphPtr getExecuteSceneGraph(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
63 SceneGraphPtr getDrawSceneGraph(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
64 void updateControllerState(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
65
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
66 void speExecute(int screen_w, int screen_h);
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
67
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
68 /* System API */
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
69 void registSceneGraph(SceneGraphPtr sg);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
70 void addNext(SceneGraphPtr sg);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
71 void allRemove(SceneGraphPtr list);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
72 };
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
73
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
74 typedef SceneGraphRoot *SceneGraphRootPtr;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
75
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
76 #endif
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
77
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
78 // 大域変数は無くすこと
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
79 extern SceneGraphRootPtr sgroot;
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
80 extern SceneGraphRootPtr sgroot_2;