annotate Renderer/Engine/viewer.h @ 1405:aafad9d18a2c draft

sepalate light
author taiki
date Fri, 17 Feb 2012 15:34:15 +0900
parents 90efd2aac2cb
children 3778a1eda68d
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"
1405
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
13 #include "Light.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
543
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 542
diff changeset
20 class Viewer : public MainLoop {
542
109a33b72b10 continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 541
diff changeset
21
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
22 public:
1405
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
23 Light *light;
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
24 /* measure for FPS (Frame Per Second) */
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
25 int start_time;
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
26 int this_time;
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
27 int frames;
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
28
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
29 typedef struct rendering_data {
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
30 PolygonPack *ppack;
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
31 SpanPackPtr spackList;
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
32 SpanPackPtr *spackList_ptr;
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
33
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
34 int spackList_length;
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
35 int spackList_length_align;
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
36 } RenderingData ;
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
37 RenderingData r[2];
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
38
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
39 int ppi, spi;
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
40 Viewer(){ profile = 0; ppi = spi = 0;};
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
41 Viewer(TaskManager *manager, ViewerDevice *dev, int bpp, int width, int height, int spenum);
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
42
542
109a33b72b10 continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 541
diff changeset
43 virtual ~Viewer() {}
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
44 BASE_NEW_DELETE(Viewer);
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
45
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
46 ViewerDevice *dev;
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
47 Application *app;
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
48
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
49 TaskManager *manager;
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
50 key_stat *keyPtr;
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
51 HTaskPtr draw_dummy;
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
52
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
53 /* screen info */
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
54 int bpp;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
55
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
56 int rgb_size[3];
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
57 int spe_num;
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
58 int width;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
59 int height;
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
60
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
61 float *light_xyz;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
62 float *light_xyz_stock;
792
b480fc04206f add light switch
yutaka@localhost.localdomain
parents: 779
diff changeset
63 int *light_switch;
b480fc04206f add light switch
yutaka@localhost.localdomain
parents: 779
diff changeset
64 int *light_switch_stock;
793
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
65 int *light_sysswitch;
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
66 int light_sysswitch_stock;
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
67
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
68 Uint32 video_flags;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
69 Uint32 *pixels;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
70
914
6286b3baf744 0 is filled on the spe side.
yutaka@localhost.localdomain
parents: 909
diff changeset
71 int mem_flag;
925
292bb8c79cdb add profile in Redering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 922
diff changeset
72 int profile;
914
6286b3baf744 0 is filled on the spe side.
yutaka@localhost.localdomain
parents: 909
diff changeset
73
1160
Yutaka_Kinjyo
parents: 1131
diff changeset
74 int pp_sum_num;
Yutaka_Kinjyo
parents: 1131
diff changeset
75
558
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
76 SceneGraphRoot *sgroot;
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
77
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
78 //Uint32 *video_init(TaskManager *manager, int bpp, int width, int height);
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
79 void init();
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
80
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
81 int get_ticks();
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
82 bool quit_check();
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
83 void quit();
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
84 HTaskPtr initLoop();
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
85
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
86 void clean_pixels() {}
869
a215927a9885 set_game_task add to SceneGraphRoot.
tkaito
parents: 860
diff changeset
87
927
fada580e4604 remove garbage codes from viewerGL
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 922
diff changeset
88 void run_init(TaskManager *manager, Application *app);
1112
fa1f4a1c47bf fix viewer for non screen mode.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1095
diff changeset
89 bool main_exec(HTaskPtr task_next);
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
90 void run_loop(HTaskPtr task_next);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
91 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
92 virtual void run_finish();
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
93 void run_move(HTaskPtr task_next);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
94 void run_collision();
1131
220f9032d2d2 RENDERING_TASK was divided into CREATE_PP_TASK and CREATE_SP_TASK.
root@dolphins.cr.ie.u-ryukyu.ac.jp
parents: 1125
diff changeset
95 void create_pp(HTaskPtr task_next);
220f9032d2d2 RENDERING_TASK was divided into CREATE_PP_TASK and CREATE_SP_TASK.
root@dolphins.cr.ie.u-ryukyu.ac.jp
parents: 1125
diff changeset
96 void create_sp(HTaskPtr task_next);
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
97 void common_draw(HTaskPtr task_next);
1131
220f9032d2d2 RENDERING_TASK was divided into CREATE_PP_TASK and CREATE_SP_TASK.
root@dolphins.cr.ie.u-ryukyu.ac.jp
parents: 1125
diff changeset
98 void rendering_pp(HTaskPtr task_next, SceneGraphRoot *sgroot);
220f9032d2d2 RENDERING_TASK was divided into CREATE_PP_TASK and CREATE_SP_TASK.
root@dolphins.cr.ie.u-ryukyu.ac.jp
parents: 1125
diff changeset
99 void rendering_sp(HTaskPtr task_next, SceneGraphRoot *sgroot);
220f9032d2d2 RENDERING_TASK was divided into CREATE_PP_TASK and CREATE_SP_TASK.
root@dolphins.cr.ie.u-ryukyu.ac.jp
parents: 1125
diff changeset
100 //void common_rendering(HTaskPtr task_next, SceneGraphRoot *sgroot);
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
101
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
102 // void exchange_sgroot(TaskManager *manager);
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
103
792
b480fc04206f add light switch
yutaka@localhost.localdomain
parents: 779
diff changeset
104 HTaskPtr update_task_create(void *data, int size,
b480fc04206f add light switch
yutaka@localhost.localdomain
parents: 779
diff changeset
105 int load_id, int spe_id, HTaskPtr wait);
b480fc04206f add light switch
yutaka@localhost.localdomain
parents: 779
diff changeset
106
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
107 void getKey();
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
108 void get_send_controll();
543
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 542
diff changeset
109
558
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
110 // void createFromXMLfile(const char *file);
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
111 // SceneGraph *createSceneGraph(int id);
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
112 // SceneGraph *createSceneGraph();
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
113 // void setSceneData(SceneGraph *g);
927
fada580e4604 remove garbage codes from viewerGL
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 922
diff changeset
114 virtual void mainLoop();
543
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 542
diff changeset
115
1405
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
116 // In Application::init, SceneGraphRoot API is called bia viewer
aafad9d18a2c sepalate light
taiki
parents: 1292
diff changeset
117
1211
7763f03a94e1 const char fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1210
diff changeset
118 void createStringFont(SceneGraphPtr root, const char *string, int pixels, int screen_w, int screen_h, Uint32 color)
1205
b8adf4e95e96 add createStringFont()
Takao YONAMINE <e095763@ie.u-ryukyu.ac.jp>
parents: 1160
diff changeset
119 {
b8adf4e95e96 add createStringFont()
Takao YONAMINE <e095763@ie.u-ryukyu.ac.jp>
parents: 1160
diff changeset
120 sgroot -> createStringFont(manager, root, string, pixels, screen_w, screen_h, color);
b8adf4e95e96 add createStringFont()
Takao YONAMINE <e095763@ie.u-ryukyu.ac.jp>
parents: 1160
diff changeset
121 }
1211
7763f03a94e1 const char fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1210
diff changeset
122 void createFont(const char *font,int pixels,Uint32 color, const char *filename, int len, char **obj_name)
1205
b8adf4e95e96 add createStringFont()
Takao YONAMINE <e095763@ie.u-ryukyu.ac.jp>
parents: 1160
diff changeset
123 {
b8adf4e95e96 add createStringFont()
Takao YONAMINE <e095763@ie.u-ryukyu.ac.jp>
parents: 1160
diff changeset
124 sgroot -> createFont(manager,font,pixels,color,filename, len, obj_name);
b8adf4e95e96 add createStringFont()
Takao YONAMINE <e095763@ie.u-ryukyu.ac.jp>
parents: 1160
diff changeset
125 }
1002
ceca625af064 many changes.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 986
diff changeset
126 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
127 {
ceca625af064 many changes.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 986
diff changeset
128 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
129 }
1033
a9581a9df440 add application main method and task.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1003
diff changeset
130 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
131 {
1033
a9581a9df440 add application main method and task.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1003
diff changeset
132 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
133 }
1033
a9581a9df440 add application main method and task.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1003
diff changeset
134 void set_pad_task(SceneGraphPtr node, int move, void *property, int size)
886
fb6f9a0aa587 set_move_task add.
tkaito
parents: 869
diff changeset
135 {
1033
a9581a9df440 add application main method and task.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1003
diff changeset
136 sgroot->set_pad_task(node, move, property, size);
869
a215927a9885 set_game_task add to SceneGraphRoot.
tkaito
parents: 860
diff changeset
137 }
a215927a9885 set_game_task add to SceneGraphRoot.
tkaito
parents: 860
diff changeset
138
671
7761ebf9c62a fix several Renderer/Test with (void*)sgroot.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 589
diff changeset
139 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
140 {
7761ebf9c62a fix several Renderer/Test with (void*)sgroot.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 589
diff changeset
141 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
142 }
7761ebf9c62a fix several Renderer/Test with (void*)sgroot.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 589
diff changeset
143
558
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
144 void createFromXMLfile(const char *file)
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
145 {
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
146 sgroot->createFromXMLfile(manager, 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
1284
fe598e9b7f0e improve collada file
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents: 1211
diff changeset
149 void createFromCOLLADAfile(const char *file)
fe598e9b7f0e improve collada file
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents: 1211
diff changeset
150 {
fe598e9b7f0e improve collada file
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents: 1211
diff changeset
151 sgroot->createFromCOLLADAfile(manager, file);
fe598e9b7f0e improve collada file
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents: 1211
diff changeset
152 }
fe598e9b7f0e improve collada file
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents: 1211
diff changeset
153
969
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
154 Pad * getController()
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
155 {
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
156 return sgroot->getController();
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
157 }
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
158
558
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
159 SceneGraph * createSceneGraph(int id)
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
160 {
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
161 return sgroot->createSceneGraph(id);
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
162 }
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
163
562
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
164 SceneGraph * createSceneGraph(const char *id)
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
165 {
969
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
166 return sgroot->createSceneGraph(id);
562
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
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
169 int getSgid(const char *id)
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
170 {
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
171 return sgroot->getSgid(id);
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
172 }
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
173
558
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
174 SceneGraph * createSceneGraph()
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 return sgroot->createSceneGraph();
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
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
179 void setSceneData(SceneGraph *g)
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
180 {
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
181 sgroot->setSceneData(g);
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
182 }
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
183
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 562
diff changeset
184 int getLast()
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 562
diff changeset
185 {
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 562
diff changeset
186 return sgroot->getLast();
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 562
diff changeset
187 }
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 562
diff changeset
188
793
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
189 SceneGraphPtr getLight(int id)
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 return sgroot->getLight(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
1292
90efd2aac2cb add matrix test and debug light vector
Yutaka_Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
194 CameraPtr getCamera()
90efd2aac2cb add matrix test and debug light vector
Yutaka_Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
195 {
90efd2aac2cb add matrix test and debug light vector
Yutaka_Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
196 return sgroot->getCamera();
90efd2aac2cb add matrix test and debug light vector
Yutaka_Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
197 }
90efd2aac2cb add matrix test and debug light vector
Yutaka_Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
198
90efd2aac2cb add matrix test and debug light vector
Yutaka_Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
199
793
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
200 void OnLightSwitch(int id)
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
201 {
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
202 sgroot->OnLightSwitch(id);
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
203 }
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 void OffLightSwitch(int id)
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
206 {
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
207 sgroot->OffLightSwitch(id);
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
208 }
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 void OnLightSysSwitch()
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
211 {
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
212 sgroot->OnLightSysSwitch();
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
213 }
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
214
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
215 void OffLightSysSwitch()
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
216 {
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
217 sgroot->OffLightSysSwitch();
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
218 }
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
219
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
220 };
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
221
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
222 #define default_sdl_flag SDL_INIT_TIMER | SDL_INIT_JOYSTICK
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
223
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
224
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
225 #endif
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
226