Mercurial > hg > Members > koba > presen
comparison semi09_07_07.html @ 0:dd58d6a69f56
make presen directry.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 28 Dec 2010 14:42:48 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:dd58d6a69f56 |
---|---|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
3 | |
4 <html xmlns="http://www.w3.org/1999/xhtml"> | |
5 | |
6 <head> | |
7 <title>ゼミ資料 09/07/07</title> | |
8 <!-- metadata --> | |
9 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
10 <meta name="generator" content="S5" /> | |
11 <meta name="version" content="S5 1.1" /> | |
12 <meta name="presdate" content="20050728" /> | |
13 <meta name="author" content="Eric A. Meyer" /> | |
14 <meta name="company" content="Complex Spiral Consulting" /> | |
15 <!-- configuration parameters --> | |
16 <meta name="defaultView" content="slideshow" /> | |
17 <meta name="controlVis" content="hidden" /> | |
18 <!-- style sheet links --> | |
19 <link rel="stylesheet" href="ui/default/slides.css" type="text/css" media="projection" id="slideProj" /> | |
20 <link rel="stylesheet" href="ui/default/outline.css" type="text/css" media="screen" id="outlineStyle" /> | |
21 <link rel="stylesheet" href="ui/default/print.css" type="text/css" media="print" id="slidePrint" /> | |
22 <link rel="stylesheet" href="ui/default/opera.css" type="text/css" media="projection" id="operaFix" /> | |
23 <!-- S5 JS --> | |
24 <script src="ui/default/slides.js" type="text/javascript"></script> | |
25 </head> | |
26 <body> | |
27 | |
28 <div class="layout"> | |
29 <div id="controls"><!-- DO NOT EDIT --></div> | |
30 <div id="currentSlide"><!-- DO NOT EDIT --></div> | |
31 <div id="header"></div> | |
32 <div id="footer"> | |
33 <h1>[date:09/07/07]</h1> | |
34 <h2>発表資料</h2> | |
35 </div> | |
36 | |
37 </div> | |
38 | |
39 | |
40 <div class="presentation"> | |
41 | |
42 <div class="slide"> | |
43 <h1>発表資料</h1> | |
44 <h3>小林 佑亮</h3> | |
45 <h4>琉球大学 理工学研究科 情報工学専攻</h4> | |
46 <h4>No.098581D</h4> | |
47 </div> | |
48 | |
49 <div class="slide"> | |
50 <h1>DOING</h1> | |
51 | |
52 <ul> | |
53 <li>複数の XML から registSceneGraph() で HashTable に登録する機能の実装</li> | |
54 <ul> | |
55 <li>HashTable の勉強</li> | |
56 <li>コード読み</li> | |
57 </ul> | |
58 </ul> | |
59 </div> | |
60 | |
61 <div class="slide"> | |
62 <h1>Approach</h1> | |
63 <ul> | |
64 <li>とりあえず SceneGraphPtr を格納する HashTable を作成してみる</li> | |
65 <li>registSceneGraph() で HashTable に登録する</li> | |
66 <li>createSceneGraph(int id) を変更</li> | |
67 </ul> | |
68 </div> | |
69 | |
70 <div class="slide"> | |
71 <h1>HashTableの作成</h1> | |
72 <ul> | |
73 <li>TextureHash, spe/TileHashを参考に</li> | |
74 <li>とりあえず書いてみる</li> | |
75 <li>Hash 関数を考える</li> | |
76 </ul> | |
77 | |
78 </div> | |
79 | |
80 <div class="slide"> | |
81 <h1>HashTableの作成</h1> | |
82 <h2>実装例</h2> | |
83 <font size="5"> | |
84 <pre> | |
85 int | |
86 SGHash::put(char *sg_name, SceneGraphPtr data) | |
87 { | |
88 int hashval = hash(sg_name); | |
89 | |
90 for (int i = 0; i < hashSize/2; i++) { | |
91 int index = (hashval + i*i)%hashSize; | |
92 | |
93 if (table[index] == 0) { | |
94 table[index] = data; | |
95 return index; | |
96 } | |
97 } | |
98 | |
99 } | |
100 | |
101 SceneGraphPtr | |
102 SGHash::get(char *sg_name) | |
103 { | |
104 int hashval = hash(sg_name); | |
105 | |
106 for (int i = 0; i < hashSize/2; i++) { | |
107 int index = (hashval + i*i)%hashSize; | |
108 | |
109 if (table[index] != NULL && | |
110 table[index]->name == sg_name) { | |
111 return table[index]; | |
112 } | |
113 } | |
114 </pre> | |
115 </font> | |
116 </div> | |
117 | |
118 <div class="slide"> | |
119 <h1>複数のXMLからHashTableに登録</h1> | |
120 <ul> | |
121 <li>現在の実装</li> | |
122 <font size="5"> | |
123 <pre> | |
124 .. | |
125 | |
126 sgroot->createFromXMLfile("xml_file/boss1.xml"); | |
127 sgroot->createFromXMLfile("xml_file/player1.xml"); | |
128 sgroot->createFromXMLfile("xml_file/p_shot.xml"); | |
129 sgroot->createFromXMLfile("xml_file/blast.xml"); | |
130 | |
131 .. | |
132 </pre> | |
133 </font> | |
134 </ul> | |
135 </div> | |
136 | |
137 <div class="slide"> | |
138 <h1>今後の課題</h1> | |
139 <ul> | |
140 <li>以下のような記述を使わないような実装</li> | |
141 <font size="5"> | |
142 <pre> | |
143 #define BOSS1 scene_graph | |
144 #define BOSS1_L scene_graph->next | |
145 #define BOSS1_R scene_graph->next->next | |
146 </pre> | |
147 </font> | |
148 </ul> | |
149 </div> | |
150 | |
151 </body> | |
152 </html> |