annotate TaskManager/Test/test_render/SceneGraphRoot.h @ 396:d1f1e27d0a12

don't move. separate allExecute from run_loop
author game@henri.cr.ie.u-ryukyu.ac.jp
date Fri, 18 Sep 2009 18:28:56 +0900
parents 25c820b6060e
children a4f690f44842
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
383
25c820b6060e fix header, MemHash in kernel
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 229
diff changeset
4 #include "SceneGraph.h"
25c820b6060e fix header, MemHash in kernel
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 229
diff changeset
5 #include "SceneGraphArray.h"
25c820b6060e fix header, MemHash in kernel
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 229
diff changeset
6 #include "Camera.h"
25c820b6060e fix header, MemHash in kernel
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 229
diff changeset
7 #include "SceneGraphIterator.h"
201
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 199
diff changeset
8
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
9 class SceneGraphRoot {
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
10 public:
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
11 /* Constructor, Destructor */
221
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
12 SceneGraphRoot(float w, float h);
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
13 ~SceneGraphRoot(void);
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
14
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
15 /* Variables */
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
16 // xml から読み込んだ、オリジナルの SceneGraph
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
17 SceneGraphPtr *sg_src;
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
18
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
19 // move, collision 用の SceneGraph (tree)
219
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
20 SceneGraphPtr sg_exec_tree;
196
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 // 描画用の SceneGraph List (tree)
219
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
23 SceneGraphPtr sg_draw_tree;
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
24
219
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
25 // sg_exec_tree に対応する list
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
26 SceneGraphPtr sg_available_list;
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
27
219
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
28 // sg_draw_tree に対応する list
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
29 // draw_tree は描画後削除される
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
30 SceneGraphPtr sg_remove_list;
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
31
229
401b55a4a4dd add Random class
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
32 SceneGraphArrayPtr sg_array1;
401b55a4a4dd add Random class
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
33 SceneGraphArrayPtr sg_array2;
401b55a4a4dd add Random class
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
34 SceneGraphArrayPtr sg_curArray;
401b55a4a4dd add Random class
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
35
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
36 // コントローラーオブジェクト (Keyboard, Joystick, ..)
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
37 Pad *controller;
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
38
199
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 198
diff changeset
39 // カメラオブジェクト
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 198
diff changeset
40 Camera *camera;
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 198
diff changeset
41
201
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 199
diff changeset
42 // SceneGraphIterator
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 199
diff changeset
43 SceneGraphIteratorPtr iterator;
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 199
diff changeset
44
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
45 /**
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
46 * Functions
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
47 */
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
48 /* User API */
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
49 void createFromXMLfile(const char *);
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
50 SceneGraphPtr createSceneGraph(int id);
201
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 199
diff changeset
51 SceneGraphPtr createSceneGraph(void);
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
52 void setSceneData(SceneGraphPtr sg);
199
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 198
diff changeset
53 Pad *getController(void);
201
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 199
diff changeset
54 SceneGraphIteratorPtr getIterator(void);
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 199
diff changeset
55 SceneGraphIteratorPtr getIterator(SceneGraphPtr list);
219
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
56 CameraPtr getCamera(void);
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
57
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
58 /* Other System API */
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
59 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
60 void checkRemove(void);
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
61 SceneGraphPtr getExecuteSceneGraph(void);
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
62 SceneGraphPtr getDrawSceneGraph(void);
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
63 void updateControllerState(void);
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
64
396
d1f1e27d0a12 don't move. separate allExecute from run_loop
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 383
diff changeset
65 void speExecute(int screen_w, int screen_h);
d1f1e27d0a12 don't move. separate allExecute from run_loop
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 383
diff changeset
66
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
67 /* System API */
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
68 void registSceneGraph(SceneGraphPtr sg);
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
69 void addNext(SceneGraphPtr sg);
219
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 201
diff changeset
70 void allRemove(SceneGraphPtr list);
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
71 };
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 typedef SceneGraphRoot *SceneGraphRootPtr;
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
74
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
75 #endif
198
57921c8d21c5 rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
76
57921c8d21c5 rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
77 extern SceneGraphRootPtr sgroot;