Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

300 linhas
12 KiB

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