1/* -----------------------------------------------------------------------------
2
3PicoModel Library
4
5Copyright (c) 2002, Randy Reddig & seaw0lf
6All rights reserved.
7
8Redistribution and use in source and binary forms, with or without modification,
9are permitted provided that the following conditions are met:
10
11Redistributions of source code must retain the above copyright notice, this list
12of conditions and the following disclaimer.
13
14Redistributions in binary form must reproduce the above copyright notice, this
15list of conditions and the following disclaimer in the documentation and/or
16other materials provided with the distribution.
17
18Neither the names of the copyright holders nor the names of its contributors may
19be used to endorse or promote products derived from this software without
20specific prior written permission.
21
22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
23ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
26ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
29ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
33----------------------------------------------------------------------------- */
34
35#if (!defined MDC_NORMAL_TABLE_INCLUDED)
36#define MDC_NORMAL_TABLE_INCLUDED
37
38/* mdc decoding normal table */
39float mdcNormals[ 256 ][ 3 ] =
40{
41 { 1.000000f, 0.000000f, 0.000000f },
42 { 0.980785f, 0.195090f, 0.000000f },
43 { 0.923880f, 0.382683f, 0.000000f },
44 { 0.831470f, 0.555570f, 0.000000f },
45 { 0.707107f, 0.707107f, 0.000000f },
46 { 0.555570f, 0.831470f, 0.000000f },
47 { 0.382683f, 0.923880f, 0.000000f },
48 { 0.195090f, 0.980785f, 0.000000f },
49 { -0.000000f, 1.000000f, 0.000000f },
50 { -0.195090f, 0.980785f, 0.000000f },
51 { -0.382683f, 0.923880f, 0.000000f },
52 { -0.555570f, 0.831470f, 0.000000f },
53 { -0.707107f, 0.707107f, 0.000000f },
54 { -0.831470f, 0.555570f, 0.000000f },
55 { -0.923880f, 0.382683f, 0.000000f },
56 { -0.980785f, 0.195090f, 0.000000f },
57 { -1.000000f, -0.000000f, 0.000000f },
58 { -0.980785f, -0.195090f, 0.000000f },
59 { -0.923880f, -0.382683f, 0.000000f },
60 { -0.831470f, -0.555570f, 0.000000f },
61 { -0.707107f, -0.707107f, 0.000000f },
62 { -0.555570f, -0.831469f, 0.000000f },
63 { -0.382684f, -0.923880f, 0.000000f },
64 { -0.195090f, -0.980785f, 0.000000f },
65 { 0.000000f, -1.000000f, 0.000000f },
66 { 0.195090f, -0.980785f, 0.000000f },
67 { 0.382684f, -0.923879f, 0.000000f },
68 { 0.555570f, -0.831470f, 0.000000f },
69 { 0.707107f, -0.707107f, 0.000000f },
70 { 0.831470f, -0.555570f, 0.000000f },
71 { 0.923880f, -0.382683f, 0.000000f },
72 { 0.980785f, -0.195090f, 0.000000f },
73 { 0.980785f, 0.000000f, -0.195090f },
74 { 0.956195f, 0.218245f, -0.195090f },
75 { 0.883657f, 0.425547f, -0.195090f },
76 { 0.766809f, 0.611510f, -0.195090f },
77 { 0.611510f, 0.766809f, -0.195090f },
78 { 0.425547f, 0.883657f, -0.195090f },
79 { 0.218245f, 0.956195f, -0.195090f },
80 { -0.000000f, 0.980785f, -0.195090f },
81 { -0.218245f, 0.956195f, -0.195090f },
82 { -0.425547f, 0.883657f, -0.195090f },
83 { -0.611510f, 0.766809f, -0.195090f },
84 { -0.766809f, 0.611510f, -0.195090f },
85 { -0.883657f, 0.425547f, -0.195090f },
86 { -0.956195f, 0.218245f, -0.195090f },
87 { -0.980785f, -0.000000f, -0.195090f },
88 { -0.956195f, -0.218245f, -0.195090f },
89 { -0.883657f, -0.425547f, -0.195090f },
90 { -0.766809f, -0.611510f, -0.195090f },
91 { -0.611510f, -0.766809f, -0.195090f },
92 { -0.425547f, -0.883657f, -0.195090f },
93 { -0.218245f, -0.956195f, -0.195090f },
94 { 0.000000f, -0.980785f, -0.195090f },
95 { 0.218245f, -0.956195f, -0.195090f },
96 { 0.425547f, -0.883657f, -0.195090f },
97 { 0.611510f, -0.766809f, -0.195090f },
98 { 0.766809f, -0.611510f, -0.195090f },
99 { 0.883657f, -0.425547f, -0.195090f },
100 { 0.956195f, -0.218245f, -0.195090f },
101 { 0.923880f, 0.000000f, -0.382683f },
102 { 0.892399f, 0.239118f, -0.382683f },
103 { 0.800103f, 0.461940f, -0.382683f },
104 { 0.653281f, 0.653281f, -0.382683f },
105 { 0.461940f, 0.800103f, -0.382683f },
106 { 0.239118f, 0.892399f, -0.382683f },
107 { -0.000000f, 0.923880f, -0.382683f },
108 { -0.239118f, 0.892399f, -0.382683f },
109 { -0.461940f, 0.800103f, -0.382683f },
110 { -0.653281f, 0.653281f, -0.382683f },
111 { -0.800103f, 0.461940f, -0.382683f },
112 { -0.892399f, 0.239118f, -0.382683f },
113 { -0.923880f, -0.000000f, -0.382683f },
114 { -0.892399f, -0.239118f, -0.382683f },
115 { -0.800103f, -0.461940f, -0.382683f },
116 { -0.653282f, -0.653281f, -0.382683f },
117 { -0.461940f, -0.800103f, -0.382683f },
118 { -0.239118f, -0.892399f, -0.382683f },
119 { 0.000000f, -0.923880f, -0.382683f },
120 { 0.239118f, -0.892399f, -0.382683f },
121 { 0.461940f, -0.800103f, -0.382683f },
122 { 0.653281f, -0.653282f, -0.382683f },
123 { 0.800103f, -0.461940f, -0.382683f },
124 { 0.892399f, -0.239117f, -0.382683f },
125 { 0.831470f, 0.000000f, -0.555570f },
126 { 0.790775f, 0.256938f, -0.555570f },
127 { 0.672673f, 0.488726f, -0.555570f },
128 { 0.488726f, 0.672673f, -0.555570f },
129 { 0.256938f, 0.790775f, -0.555570f },
130 { -0.000000f, 0.831470f, -0.555570f },
131 { -0.256938f, 0.790775f, -0.555570f },
132 { -0.488726f, 0.672673f, -0.555570f },
133 { -0.672673f, 0.488726f, -0.555570f },
134 { -0.790775f, 0.256938f, -0.555570f },
135 { -0.831470f, -0.000000f, -0.555570f },
136 { -0.790775f, -0.256938f, -0.555570f },
137 { -0.672673f, -0.488726f, -0.555570f },
138 { -0.488725f, -0.672673f, -0.555570f },
139 { -0.256938f, -0.790775f, -0.555570f },
140 { 0.000000f, -0.831470f, -0.555570f },
141 { 0.256938f, -0.790775f, -0.555570f },
142 { 0.488725f, -0.672673f, -0.555570f },
143 { 0.672673f, -0.488726f, -0.555570f },
144 { 0.790775f, -0.256938f, -0.555570f },
145 { 0.707107f, 0.000000f, -0.707107f },
146 { 0.653281f, 0.270598f, -0.707107f },
147 { 0.500000f, 0.500000f, -0.707107f },
148 { 0.270598f, 0.653281f, -0.707107f },
149 { -0.000000f, 0.707107f, -0.707107f },
150 { -0.270598f, 0.653282f, -0.707107f },
151 { -0.500000f, 0.500000f, -0.707107f },
152 { -0.653281f, 0.270598f, -0.707107f },
153 { -0.707107f, -0.000000f, -0.707107f },
154 { -0.653281f, -0.270598f, -0.707107f },
155 { -0.500000f, -0.500000f, -0.707107f },
156 { -0.270598f, -0.653281f, -0.707107f },
157 { 0.000000f, -0.707107f, -0.707107f },
158 { 0.270598f, -0.653281f, -0.707107f },
159 { 0.500000f, -0.500000f, -0.707107f },
160 { 0.653282f, -0.270598f, -0.707107f },
161 { 0.555570f, 0.000000f, -0.831470f },
162 { 0.481138f, 0.277785f, -0.831470f },
163 { 0.277785f, 0.481138f, -0.831470f },
164 { -0.000000f, 0.555570f, -0.831470f },
165 { -0.277785f, 0.481138f, -0.831470f },
166 { -0.481138f, 0.277785f, -0.831470f },
167 { -0.555570f, -0.000000f, -0.831470f },
168 { -0.481138f, -0.277785f, -0.831470f },
169 { -0.277785f, -0.481138f, -0.831470f },
170 { 0.000000f, -0.555570f, -0.831470f },
171 { 0.277785f, -0.481138f, -0.831470f },
172 { 0.481138f, -0.277785f, -0.831470f },
173 { 0.382683f, 0.000000f, -0.923880f },
174 { 0.270598f, 0.270598f, -0.923880f },
175 { -0.000000f, 0.382683f, -0.923880f },
176 { -0.270598f, 0.270598f, -0.923880f },
177 { -0.382683f, -0.000000f, -0.923880f },
178 { -0.270598f, -0.270598f, -0.923880f },
179 { 0.000000f, -0.382683f, -0.923880f },
180 { 0.270598f, -0.270598f, -0.923880f },
181 { 0.195090f, 0.000000f, -0.980785f },
182 { -0.000000f, 0.195090f, -0.980785f },
183 { -0.195090f, -0.000000f, -0.980785f },
184 { 0.000000f, -0.195090f, -0.980785f },
185 { 0.980785f, 0.000000f, 0.195090f },
186 { 0.956195f, 0.218245f, 0.195090f },
187 { 0.883657f, 0.425547f, 0.195090f },
188 { 0.766809f, 0.611510f, 0.195090f },
189 { 0.611510f, 0.766809f, 0.195090f },
190 { 0.425547f, 0.883657f, 0.195090f },
191 { 0.218245f, 0.956195f, 0.195090f },
192 { -0.000000f, 0.980785f, 0.195090f },
193 { -0.218245f, 0.956195f, 0.195090f },
194 { -0.425547f, 0.883657f, 0.195090f },
195 { -0.611510f, 0.766809f, 0.195090f },
196 { -0.766809f, 0.611510f, 0.195090f },
197 { -0.883657f, 0.425547f, 0.195090f },
198 { -0.956195f, 0.218245f, 0.195090f },
199 { -0.980785f, -0.000000f, 0.195090f },
200 { -0.956195f, -0.218245f, 0.195090f },
201 { -0.883657f, -0.425547f, 0.195090f },
202 { -0.766809f, -0.611510f, 0.195090f },
203 { -0.611510f, -0.766809f, 0.195090f },
204 { -0.425547f, -0.883657f, 0.195090f },
205 { -0.218245f, -0.956195f, 0.195090f },
206 { 0.000000f, -0.980785f, 0.195090f },
207 { 0.218245f, -0.956195f, 0.195090f },
208 { 0.425547f, -0.883657f, 0.195090f },
209 { 0.611510f, -0.766809f, 0.195090f },
210 { 0.766809f, -0.611510f, 0.195090f },
211 { 0.883657f, -0.425547f, 0.195090f },
212 { 0.956195f, -0.218245f, 0.195090f },
213 { 0.923880f, 0.000000f, 0.382683f },
214 { 0.892399f, 0.239118f, 0.382683f },
215 { 0.800103f, 0.461940f, 0.382683f },
216 { 0.653281f, 0.653281f, 0.382683f },
217 { 0.461940f, 0.800103f, 0.382683f },
218 { 0.239118f, 0.892399f, 0.382683f },
219 { -0.000000f, 0.923880f, 0.382683f },
220 { -0.239118f, 0.892399f, 0.382683f },
221 { -0.461940f, 0.800103f, 0.382683f },
222 { -0.653281f, 0.653281f, 0.382683f },
223 { -0.800103f, 0.461940f, 0.382683f },
224 { -0.892399f, 0.239118f, 0.382683f },
225 { -0.923880f, -0.000000f, 0.382683f },
226 { -0.892399f, -0.239118f, 0.382683f },
227 { -0.800103f, -0.461940f, 0.382683f },
228 { -0.653282f, -0.653281f, 0.382683f },
229 { -0.461940f, -0.800103f, 0.382683f },
230 { -0.239118f, -0.892399f, 0.382683f },
231 { 0.000000f, -0.923880f, 0.382683f },
232 { 0.239118f, -0.892399f, 0.382683f },
233 { 0.461940f, -0.800103f, 0.382683f },
234 { 0.653281f, -0.653282f, 0.382683f },
235 { 0.800103f, -0.461940f, 0.382683f },
236 { 0.892399f, -0.239117f, 0.382683f },
237 { 0.831470f, 0.000000f, 0.555570f },
238 { 0.790775f, 0.256938f, 0.555570f },
239 { 0.672673f, 0.488726f, 0.555570f },
240 { 0.488726f, 0.672673f, 0.555570f },
241 { 0.256938f, 0.790775f, 0.555570f },
242 { -0.000000f, 0.831470f, 0.555570f },
243 { -0.256938f, 0.790775f, 0.555570f },
244 { -0.488726f, 0.672673f, 0.555570f },
245 { -0.672673f, 0.488726f, 0.555570f },
246 { -0.790775f, 0.256938f, 0.555570f },
247 { -0.831470f, -0.000000f, 0.555570f },
248 { -0.790775f, -0.256938f, 0.555570f },
249 { -0.672673f, -0.488726f, 0.555570f },
250 { -0.488725f, -0.672673f, 0.555570f },
251 { -0.256938f, -0.790775f, 0.555570f },
252 { 0.000000f, -0.831470f, 0.555570f },
253 { 0.256938f, -0.790775f, 0.555570f },
254 { 0.488725f, -0.672673f, 0.555570f },
255 { 0.672673f, -0.488726f, 0.555570f },
256 { 0.790775f, -0.256938f, 0.555570f },
257 { 0.707107f, 0.000000f, 0.707107f },
258 { 0.653281f, 0.270598f, 0.707107f },
259 { 0.500000f, 0.500000f, 0.707107f },
260 { 0.270598f, 0.653281f, 0.707107f },
261 { -0.000000f, 0.707107f, 0.707107f },
262 { -0.270598f, 0.653282f, 0.707107f },
263 { -0.500000f, 0.500000f, 0.707107f },
264 { -0.653281f, 0.270598f, 0.707107f },
265 { -0.707107f, -0.000000f, 0.707107f },
266 { -0.653281f, -0.270598f, 0.707107f },
267 { -0.500000f, -0.500000f, 0.707107f },
268 { -0.270598f, -0.653281f, 0.707107f },
269 { 0.000000f, -0.707107f, 0.707107f },
270 { 0.270598f, -0.653281f, 0.707107f },
271 { 0.500000f, -0.500000f, 0.707107f },
272 { 0.653282f, -0.270598f, 0.707107f },
273 { 0.555570f, 0.000000f, 0.831470f },
274 { 0.481138f, 0.277785f, 0.831470f },
275 { 0.277785f, 0.481138f, 0.831470f },
276 { -0.000000f, 0.555570f, 0.831470f },
277 { -0.277785f, 0.481138f, 0.831470f },
278 { -0.481138f, 0.277785f, 0.831470f },
279 { -0.555570f, -0.000000f, 0.831470f },
280 { -0.481138f, -0.277785f, 0.831470f },
281 { -0.277785f, -0.481138f, 0.831470f },
282 { 0.000000f, -0.555570f, 0.831470f },
283 { 0.277785f, -0.481138f, 0.831470f },
284 { 0.481138f, -0.277785f, 0.831470f },
285 { 0.382683f, 0.000000f, 0.923880f },
286 { 0.270598f, 0.270598f, 0.923880f },
287 { -0.000000f, 0.382683f, 0.923880f },
288 { -0.270598f, 0.270598f, 0.923880f },
289 { -0.382683f, -0.000000f, 0.923880f },
290 { -0.270598f, -0.270598f, 0.923880f },
291 { 0.000000f, -0.382683f, 0.923880f },
292 { 0.270598f, -0.270598f, 0.923880f },
293 { 0.195090f, 0.000000f, 0.980785f },
294 { -0.000000f, 0.195090f, 0.980785f },
295 { -0.195090f, -0.000000f, 0.980785f },
296 { 0.000000f, -0.195090f, 0.980785f }
297};
298
299#endif // !! MDC_NORMAL_TABLE_INCLUDED
300