annotate Renderer/test_render/SceneGraphRoot.h @ 283:15bfacccde99 draft

fix test_render
author e065746@localhost.localdomain
date Fri, 05 Jun 2009 16:49:12 +0900
parents
children
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
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
4 #ifndef INCLUDED_SCENE_GRAPH
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
5 # include "SceneGraph.h"
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
6 #endif
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
7
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
8 #ifndef INCLUDED_SCENE_GRAPH_ARRAY
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
9 # include "SceneGraphArray.h"
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
10 #endif
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
11
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
12 #ifndef INCLUDED_CAMERA
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
13 # include "Camera.h"
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
14 #endif
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
15
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
16 #ifndef INCLUDED_SCENE_GRAPH_ITERATOR
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
17 # include "SceneGraphIterator.h"
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
18 #endif
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
19
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
20 class SceneGraphRoot {
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
21 public:
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
22 /* Constructor, Destructor */
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
23 SceneGraphRoot(float w, float h);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
24 ~SceneGraphRoot(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
25
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
26 /* Variables */
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
27 // xml から読み込んだ、オリジナルの SceneGraph
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
28 SceneGraphPtr *sg_src;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
29
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
30 // move, collision 用の SceneGraph (tree)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
31 SceneGraphPtr sg_exec_tree;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
32
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
33 // 描画用の SceneGraph List (tree)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
34 SceneGraphPtr sg_draw_tree;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
35
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
36 // sg_exec_tree に対応する list
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
37 SceneGraphPtr sg_available_list;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
38
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
39 // sg_draw_tree に対応する list
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
40 // draw_tree は描画後削除される
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
41 SceneGraphPtr sg_remove_list;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
42
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
43 SceneGraphArrayPtr sg_array1;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
44 SceneGraphArrayPtr sg_array2;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
45 SceneGraphArrayPtr sg_curArray;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
46
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
47 // コントローラーオブジェクト (Keyboard, Joystick, ..)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
48 Pad *controller;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
49
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
50 // カメラオブジェクト
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
51 Camera *camera;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
52
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
53 // SceneGraphIterator
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
54 SceneGraphIteratorPtr iterator;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
55
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
56 /**
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
57 * Functions
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
58 */
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
59 /* User API */
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
60 void createFromXMLfile(const char *);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
61 SceneGraphPtr createSceneGraph(int id);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
62 SceneGraphPtr createSceneGraph(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
63 void setSceneData(SceneGraphPtr sg);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
64 Pad *getController(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
65 SceneGraphIteratorPtr getIterator(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
66 SceneGraphIteratorPtr getIterator(SceneGraphPtr list);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
67 CameraPtr getCamera(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
68
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
69 /* Other System API */
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
70 void allExecute(int screen_w, int screen_h);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
71 void checkRemove(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
72 SceneGraphPtr getExecuteSceneGraph(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
73 SceneGraphPtr getDrawSceneGraph(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
74 void updateControllerState(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
75
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
76 /* System API */
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
77 void registSceneGraph(SceneGraphPtr sg);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
78 void addNext(SceneGraphPtr sg);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
79 void allRemove(SceneGraphPtr list);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
80 };
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
81
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
82 typedef SceneGraphRoot *SceneGraphRootPtr;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
83
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
84 #endif
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
85
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
86 extern SceneGraphRootPtr sgroot;