annotate TaskManager/Test/test_render/SceneGraphRoot.h @ 224:ebfb9e389716

SceneGraph.cpp xmlcreate
author tkaito@nw0534.st.ie.u-ryukyu.ac.jp
date Tue, 10 Feb 2009 20:45:51 +0900
parents d61fded0729e
children 401b55a4a4dd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
1 #ifndef INCLUDED_SCENE_GRAPH_ROOT
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
2 #define INCLUDED_SCENE_GRAPH_ROOT
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
3
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
4 #ifndef INCLUDED_SCENE_GRAPH
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
5 # include "SceneGraph.h"
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
6 #endif
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
7
199
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 198
diff changeset
8 #ifndef INCLUDED_CAMERA
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 198
diff changeset
9 # include "Camera.h"
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 198
diff changeset
10 #endif
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 198
diff changeset
11
201
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 199
diff changeset
12 #ifndef INCLUDED_SCENE_GRAPH_ITERATOR
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 199
diff changeset
13 # include "SceneGraphIterator.h"
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 199
diff changeset
14 #endif
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 199
diff changeset
15
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
16 class SceneGraphRoot {
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
17 public:
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
18 /* Constructor, Destructor */
221
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
19 SceneGraphRoot(float w, float h);
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
20 ~SceneGraphRoot(void);
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
21
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
22 /* Variables */
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
23 // xml から読み込んだ、オリジナルの SceneGraph
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
24 SceneGraphPtr *sg_src;
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
25
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
26 // move, collision 用の SceneGraph (tree)
219
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
27 SceneGraphPtr sg_exec_tree;
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
28
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
29 // 描画用の SceneGraph List (tree)
219
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
30 SceneGraphPtr sg_draw_tree;
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
31
219
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
32 // sg_exec_tree に対応する list
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
33 SceneGraphPtr sg_available_list;
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
34
219
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
35 // sg_draw_tree に対応する list
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
36 // draw_tree は描画後削除される
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
37 SceneGraphPtr sg_remove_list;
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
38
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
39 // コントローラーオブジェクト (Keyboard, Joystick, ..)
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
40 Pad *controller;
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
41
199
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 198
diff changeset
42 // カメラオブジェクト
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 198
diff changeset
43 Camera *camera;
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 198
diff changeset
44
201
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 199
diff changeset
45 // SceneGraphIterator
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 199
diff changeset
46 SceneGraphIteratorPtr iterator;
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 199
diff changeset
47
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
48 /**
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
49 * Functions
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
50 */
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
51 /* User API */
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
52 void createFromXMLfile(const char *);
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
53 SceneGraphPtr createSceneGraph(int id);
201
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 199
diff changeset
54 SceneGraphPtr createSceneGraph(void);
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
55 void setSceneData(SceneGraphPtr sg);
199
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 198
diff changeset
56 Pad *getController(void);
201
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 199
diff changeset
57 SceneGraphIteratorPtr getIterator(void);
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 199
diff changeset
58 SceneGraphIteratorPtr getIterator(SceneGraphPtr list);
219
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
59 CameraPtr getCamera(void);
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
60
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
61 /* Other System API */
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
62 void allExecute(int screen_w, int screen_h);
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
63 void checkRemove(void);
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
64 SceneGraphPtr getExecuteSceneGraph(void);
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
65 SceneGraphPtr getDrawSceneGraph(void);
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
66 void updateControllerState(void);
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
67
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
68 /* System API */
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
69 void registSceneGraph(SceneGraphPtr sg);
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
70 void addNext(SceneGraphPtr sg);
219
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
71 void allRemove(SceneGraphPtr list);
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
72 };
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
73
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
74 typedef SceneGraphRoot *SceneGraphRootPtr;
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
75
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
76 #endif
198
57921c8d21c5 rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
77
57921c8d21c5 rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
78 extern SceneGraphRootPtr sgroot;