annotate Renderer/Engine/viewer.h @ 1087:20f09564c586 draft

fix (not yet tested)
author root@localhost.localdomain
date Fri, 17 Dec 2010 18:34:29 +0900
parents 2403d545abd8
children 652791a4a324
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_VIEWER
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
2 #define INCLUDED_VIEWER
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
3
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
4 #include <SDL.h>
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
5
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
6 #include "viewer_types.h"
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
7 #include "TaskManager.h"
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
8 #include "KeyStat.h"
542
109a33b72b10 continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 541
diff changeset
9 #include "MainLoop.h"
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
10 #include "Application.h"
558
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
11 #include "SceneGraphRoot.h"
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
12 #include "ViewerDevice.h"
909
Yutaka_Kinjyo
parents: 907
diff changeset
13 #include "matrix.h"
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
14
562
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
15 class SceneGraphRoot;
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
16
543
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 542
diff changeset
17 class Application;
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
18
1035
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
19 typedef struct sg_pp {
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
20 //13088
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
21 float *coord_xyz; // (361*3) * 4
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
22 float *coord_tex;
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
23 float *normal;
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
24
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
25 //8 * 16
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
26 float *matrix; // 4 * 16
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
27 float *real_matrix; // 4 * 12
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
28 uint32 pixels; // addr
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
29
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
30 int sg_size; // 4
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
31 int width; // 4
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
32 int height; // 4
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
33 int scale_max; // 4
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
34
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
35 int length; // 4
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
36 int start; // 4
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
37
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
38 } SceneGraph2PolygonPack ;
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
39
986
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
40 typedef struct rendering_data {
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
41 PolygonPack *ppack;
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
42 SpanPackPtr spackList;
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
43 SpanPackPtr *spackList_ptr;
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
44
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
45 int spackList_length;
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
46 int spackList_length_align;
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
47 } RederingData ;
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
48
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
49 extern RederingData r[2];
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
50
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
51 extern int ppi, spi;
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
52
543
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 542
diff changeset
53 class Viewer : public MainLoop {
542
109a33b72b10 continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 541
diff changeset
54
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
55 public:
925
292bb8c79cdb add profile in Redering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 922
diff changeset
56 Viewer(){ profile = 0;};
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
57 Viewer(TaskManager *manager, ViewerDevice *dev, int bpp, int width, int height, int spenum);
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
58
542
109a33b72b10 continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 541
diff changeset
59 virtual ~Viewer() {}
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
60 BASE_NEW_DELETE(Viewer);
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
61
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
62 ViewerDevice *dev;
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
63 Application *app;
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
64
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
65 TaskManager *manager;
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
66 key_stat *keyPtr;
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
67 HTaskPtr draw_dummy;
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
68
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
69 /* screen info */
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
70 int bpp;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
71
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
72 int rgb_size[3];
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
73 int spe_num;
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
74 int width;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
75 int height;
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
76
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
77 float *light_xyz;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
78 float *light_xyz_stock;
792
b480fc04206f add light switch
yutaka@localhost.localdomain
parents: 779
diff changeset
79 int *light_switch;
b480fc04206f add light switch
yutaka@localhost.localdomain
parents: 779
diff changeset
80 int *light_switch_stock;
793
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
81 int *light_sysswitch;
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
82 int light_sysswitch_stock;
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
83
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
84 Uint32 video_flags;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
85 Uint32 *pixels;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
86
914
6286b3baf744 0 is filled on the spe side.
yutaka@localhost.localdomain
parents: 909
diff changeset
87 int mem_flag;
925
292bb8c79cdb add profile in Redering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 922
diff changeset
88 int profile;
914
6286b3baf744 0 is filled on the spe side.
yutaka@localhost.localdomain
parents: 909
diff changeset
89
558
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
90 SceneGraphRoot *sgroot;
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
91
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
92 //Uint32 *video_init(TaskManager *manager, int bpp, int width, int height);
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
93 void init();
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
94
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
95 int get_ticks();
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
96 bool quit_check();
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
97 void quit();
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
98 HTaskPtr initLoop();
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
99
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
100 void clean_pixels() {}
869
a215927a9885 set_game_task add to SceneGraphRoot.
tkaito
parents: 860
diff changeset
101
927
fada580e4604 remove garbage codes from viewerGL
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 922
diff changeset
102 void run_init(TaskManager *manager, Application *app);
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
103 void run_loop(HTaskPtr task_next);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
104 void run_draw(HTaskPtr task_next);
927
fada580e4604 remove garbage codes from viewerGL
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 922
diff changeset
105 virtual void run_finish();
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
106 void run_move(HTaskPtr task_next);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
107 void run_collision();
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
108 void rendering(HTaskPtr task_next);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
109 void common_draw(HTaskPtr task_next);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
110 void common_rendering(HTaskPtr task_next, SceneGraphRoot *sgroot);
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
111
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
112 void spe_rendering(HTaskPtr task_next);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
113 void spe_draw(HTaskPtr task_next);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
114 // void exchange_sgroot(TaskManager *manager);
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
115
792
b480fc04206f add light switch
yutaka@localhost.localdomain
parents: 779
diff changeset
116 HTaskPtr update_task_create(void *data, int size,
b480fc04206f add light switch
yutaka@localhost.localdomain
parents: 779
diff changeset
117 int load_id, int spe_id, HTaskPtr wait);
b480fc04206f add light switch
yutaka@localhost.localdomain
parents: 779
diff changeset
118
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
119 void getKey();
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
120 void get_send_controll();
543
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 542
diff changeset
121
558
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
122 // void createFromXMLfile(const char *file);
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
123 // SceneGraph *createSceneGraph(int id);
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
124 // SceneGraph *createSceneGraph();
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
125 // void setSceneData(SceneGraph *g);
927
fada580e4604 remove garbage codes from viewerGL
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 922
diff changeset
126 virtual void mainLoop();
543
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 542
diff changeset
127
1002
ceca625af064 many changes.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 986
diff changeset
128 void task_array_init(int id, int task_num, int param, int inData_num, int outData_num)
ceca625af064 many changes.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 986
diff changeset
129 {
ceca625af064 many changes.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 986
diff changeset
130 sgroot->task_array_init(id, task_num, param, inData_num, outData_num);
ceca625af064 many changes.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 986
diff changeset
131 }
1033
a9581a9df440 add application main method and task.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1003
diff changeset
132 void set_move_task(SceneGraphPtr node, int move, void *titlep, int size)
969
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
133 {
1033
a9581a9df440 add application main method and task.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1003
diff changeset
134 sgroot->set_move_task(node, move, titlep, size);
969
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
135 }
1033
a9581a9df440 add application main method and task.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1003
diff changeset
136 void set_pad_task(SceneGraphPtr node, int move, void *property, int size)
886
fb6f9a0aa587 set_move_task add.
tkaito
parents: 869
diff changeset
137 {
1033
a9581a9df440 add application main method and task.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1003
diff changeset
138 sgroot->set_pad_task(node, move, property, size);
869
a215927a9885 set_game_task add to SceneGraphRoot.
tkaito
parents: 860
diff changeset
139 }
a215927a9885 set_game_task add to SceneGraphRoot.
tkaito
parents: 860
diff changeset
140
671
7761ebf9c62a fix several Renderer/Test with (void*)sgroot.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 589
diff changeset
141 void createFromXMLmemory(SceneGraph * node, char *data, int len)
7761ebf9c62a fix several Renderer/Test with (void*)sgroot.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 589
diff changeset
142 {
7761ebf9c62a fix several Renderer/Test with (void*)sgroot.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 589
diff changeset
143 sgroot->createFromXMLmemory(manager, node, data, len);
7761ebf9c62a fix several Renderer/Test with (void*)sgroot.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 589
diff changeset
144 }
7761ebf9c62a fix several Renderer/Test with (void*)sgroot.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 589
diff changeset
145
558
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
146 void createFromXMLfile(const char *file)
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
147 {
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
148 sgroot->createFromXMLfile(manager, file);
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
149 }
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
150
969
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
151 Pad * getController()
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
152 {
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
153 return sgroot->getController();
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
154 }
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
155
558
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
156 SceneGraph * createSceneGraph(int id)
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
157 {
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
158 return sgroot->createSceneGraph(id);
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
159 }
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
160
562
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
161 SceneGraph * createSceneGraph(const char *id)
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
162 {
969
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
163 return sgroot->createSceneGraph(id);
562
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
164 }
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
165
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
166 int getSgid(const char *id)
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
167 {
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
168 return sgroot->getSgid(id);
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
169 }
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
170
558
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
171 SceneGraph * createSceneGraph()
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
172 {
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
173 return sgroot->createSceneGraph();
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
174 }
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
175
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
176 void setSceneData(SceneGraph *g)
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
177 {
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
178 sgroot->setSceneData(g);
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
179 }
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
180
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 562
diff changeset
181 int getLast()
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 562
diff changeset
182 {
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 562
diff changeset
183 return sgroot->getLast();
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 562
diff changeset
184 }
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 562
diff changeset
185
793
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
186 SceneGraphPtr getLight(int id)
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
187 {
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
188 return sgroot->getLight(id);
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
189 }
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
190
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
191 void OnLightSwitch(int id)
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
192 {
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
193 sgroot->OnLightSwitch(id);
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
194 }
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
195
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
196 void OffLightSwitch(int id)
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
197 {
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
198 sgroot->OffLightSwitch(id);
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
199 }
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
200
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
201 void OnLightSysSwitch()
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
202 {
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
203 sgroot->OnLightSysSwitch();
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
204 }
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
205
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
206 void OffLightSysSwitch()
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
207 {
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
208 sgroot->OffLightSysSwitch();
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
209 }
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
210
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
211 };
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
212
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
213 #define default_sdl_flag SDL_INIT_TIMER | SDL_INIT_JOYSTICK
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
214
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
215
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
216 #endif
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
217