PVRTFixedPoint_8h-source.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
  3. <title>PowerVR SDK</title>
  4. <link href="doxygen.css" rel="stylesheet" type="text/css">
  5. <link href="tabs.css" rel="stylesheet" type="text/css">
  6. <table width="100%">
  7. <tr>
  8. <td width="33%">
  9. <p align="left">&nbsp;<a href="http://www.imgtec.com"><img border="0" src="IMGLogo.jpg" width="200" height="30"></a></p>
  10. </td>
  11. <td width="33%">
  12. <p align="center"><font color="#808080" face="Arial" size="2">PowerVR Software Development Kit</a></font></p>
  13. </td>
  14. <td width="34%">
  15. <p align="right"><a href="http://www.powervr.com"><img border="0" src="PVRlogo.jpg" width="200" height="27"></a></p>
  16. </td>
  17. </tr>
  18. </table>
  19. <hr>
  20. </head><body>
  21. <!-- Generated by Doxygen 1.3.6 -->
  22. <div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
  23. <h1>PVRTFixedPoint.h</h1><a href="PVRTFixedPoint_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/******************************************************************************</span>
  24. 00002 <span class="comment"></span>
  25. 00003 <span class="comment"> @File PVRTFixedPoint.h</span>
  26. 00004 <span class="comment"></span>
  27. 00005 <span class="comment"> @Title PVRTFixedPoint</span>
  28. 00006 <span class="comment"></span>
  29. 00007 <span class="comment"> @Version </span>
  30. 00008 <span class="comment"></span>
  31. 00009 <span class="comment"> @Copyright Copyright (C) Imagination Technologies Limited.</span>
  32. 00010 <span class="comment"></span>
  33. 00011 <span class="comment"> @Platform Independant</span>
  34. 00012 <span class="comment"></span>
  35. 00013 <span class="comment"> @Description Set of macros and functions to make fixed-point easier to program.</span>
  36. 00014 <span class="comment"></span>
  37. 00015 <span class="comment">******************************************************************************/</span>
  38. 00016 <span class="preprocessor">#ifndef _PVRTFIXEDPOINT_H_</span>
  39. 00017 <span class="preprocessor"></span><span class="preprocessor">#define _PVRTFIXEDPOINT_H_</span>
  40. 00018 <span class="preprocessor"></span>
  41. 00019 <span class="preprocessor">#include "<a class="code" href="PVRTGlobal_8h.html">PVRTGlobal.h</a>"</span>
  42. 00020
  43. 00021 <span class="preprocessor">#if defined(BUILD_OGLES) || defined(BUILD_D3DM)</span>
  44. 00022 <span class="preprocessor"></span><span class="preprocessor"> #include "PVRTFixedPointAPI.h"</span>
  45. 00023 <span class="preprocessor">#else</span>
  46. <a name="l00024"></a><a class="code" href="PVRTFixedPoint_8h.html#a0">00024</a> <span class="preprocessor"></span><span class="preprocessor"> #define VERTTYPE float</span>
  47. 00025 <span class="preprocessor"></span><span class="preprocessor"> #ifdef PVRT_FIXED_POINT_ENABLE</span>
  48. 00026 <span class="preprocessor"></span><span class="preprocessor"> #error Build option not supported: PVRT_FIXED_POINT_ENABLE</span>
  49. 00027 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
  50. 00028 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
  51. 00029 <span class="preprocessor"></span>
  52. 00030 <span class="comment">/* Fixed-point macros */</span>
  53. <a name="l00031"></a><a class="code" href="PVRTFixedPoint_8h.html#a1">00031</a> <span class="preprocessor">#define PVRTF2X(f) ( (int) ( (f)*(65536) ) )</span>
  54. <a name="l00032"></a><a class="code" href="PVRTFixedPoint_8h.html#a2">00032</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRTX2F(x) ((float)(x)/65536.0f)</span>
  55. <a name="l00033"></a><a class="code" href="PVRTFixedPoint_8h.html#a3">00033</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRTXMUL(a,b) ( (int)( ((PVRTint64)(a)*(b)) / 65536 ) )</span>
  56. <a name="l00034"></a><a class="code" href="PVRTFixedPoint_8h.html#a4">00034</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRTXDIV(a,b) ( (int)( (((PVRTint64)(a))&lt;&lt;16)/(b) ) )</span>
  57. <a name="l00035"></a><a class="code" href="PVRTFixedPoint_8h.html#a5">00035</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRTABS(a) ((a) &lt;= 0 ? -(a) : (a) )</span>
  58. 00036 <span class="preprocessor"></span>
  59. 00037 <span class="comment">/* Define trig table macros */</span>
  60. 00038 <span class="preprocessor">#include "<a class="code" href="PVRTMathTable_8h.html">PVRTMathTable.h</a>"</span>
  61. 00039
  62. 00040 <span class="comment">/* Useful values */</span>
  63. <a name="l00041"></a><a class="code" href="PVRTFixedPoint_8h.html#a6">00041</a> <span class="preprocessor">#define PVRT_PI_OVER_TWOf (3.1415926535f / 2.0f)</span>
  64. <a name="l00042"></a><a class="code" href="PVRTFixedPoint_8h.html#a7">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRT_PIf (3.1415926535f)</span>
  65. <a name="l00043"></a><a class="code" href="PVRTFixedPoint_8h.html#a8">00043</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRT_TWO_PIf (3.1415926535f * 2.0f)</span>
  66. <a name="l00044"></a><a class="code" href="PVRTFixedPoint_8h.html#a9">00044</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRT_ONEf (1.0f)</span>
  67. 00045 <span class="preprocessor"></span>
  68. <a name="l00046"></a><a class="code" href="PVRTFixedPoint_8h.html#a10">00046</a> <span class="preprocessor">#define PVRT_PI_OVER_TWOx PVRTF2X(PVRT_PI_OVER_TWOf)</span>
  69. <a name="l00047"></a><a class="code" href="PVRTFixedPoint_8h.html#a11">00047</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRT_PIx PVRTF2X(PVRT_PIf)</span>
  70. <a name="l00048"></a><a class="code" href="PVRTFixedPoint_8h.html#a12">00048</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRT_TWO_PIx PVRTF2X(PVRT_TWO_PIf)</span>
  71. <a name="l00049"></a><a class="code" href="PVRTFixedPoint_8h.html#a13">00049</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRT_ONEx PVRTF2X(PVRT_ONEf)</span>
  72. 00050 <span class="preprocessor"></span>
  73. 00051 <span class="comment">/* Fixed-point trig function lookups */</span>
  74. <a name="l00052"></a><a class="code" href="PVRTFixedPoint_8h.html#a14">00052</a> <span class="preprocessor">#define PVRTXCOS(x) (cos_val[(PVRTXMUL(((PVRTXDIV((x)&lt;0? -(x):(x), PVRT_TWO_PIx)) &amp; 0x0000FFFF), (NUM_ENTRIES-1)))])</span>
  75. <a name="l00053"></a><a class="code" href="PVRTFixedPoint_8h.html#a15">00053</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRTXSIN(x) (sin_val[(PVRTXMUL(((PVRTXDIV((x)&lt;0 ? PVRT_PIx-(x):(x), PVRT_TWO_PIx)) &amp; 0x0000FFFF), (NUM_ENTRIES-1)))])</span>
  76. <a name="l00054"></a><a class="code" href="PVRTFixedPoint_8h.html#a16">00054</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRTXTAN(x) ( (x)&lt;0 ? -tan_val[(PVRTXMUL(((PVRTXDIV(-(x), PVRT_TWO_PIx)) &amp; 0x0000FFFF), (NUM_ENTRIES-1)))] : tan_val[(PVRTXMUL(((PVRTXDIV(x, PVRT_TWO_PIx)) &amp; 0x0000FFFF), (NUM_ENTRIES-1)))] )</span>
  77. <a name="l00055"></a><a class="code" href="PVRTFixedPoint_8h.html#a17">00055</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRTXACOS(x) (acos_val[PVRTXMUL(((((x) + PVRTF2X(1.0f))&gt;&gt;1) &amp; 0x0000FFFF), (NUM_ENTRIES-1))])</span>
  78. 00056 <span class="preprocessor"></span>
  79. 00057 <span class="comment">/* Floating-point trig functions lookups (needed by some tools chains that have problems with real math functions) */</span>
  80. 00058 <span class="preprocessor">#ifdef USE_TRIGONOMETRIC_LOOKUP_TABLES</span>
  81. 00059 <span class="preprocessor"></span>
  82. 00060 <span class="comment">/* If trig tables are forced ON in non-fixed-point builds then convert fixed-point trig tables results to float */</span>
  83. 00061 <span class="preprocessor"> #define PVRTFCOS(x) PVRTX2F(PVRTXCOS(PVRTF2X(x)))</span>
  84. 00062 <span class="preprocessor"></span><span class="preprocessor"> #define PVRTFSIN(x) PVRTX2F(PVRTXSIN(PVRTF2X(x)))</span>
  85. 00063 <span class="preprocessor"></span><span class="preprocessor"> #define PVRTFTAN(x) PVRTX2F(PVRTXTAN(PVRTF2X(x)))</span>
  86. 00064 <span class="preprocessor"></span><span class="preprocessor"> #define PVRTFACOS(x) PVRTX2F(PVRTXACOS(PVRTF2X(x)))</span>
  87. 00065 <span class="preprocessor"></span>
  88. 00066 <span class="preprocessor">#else</span>
  89. 00067 <span class="preprocessor"></span>
  90. 00068 <span class="comment">/* Trig abstraction macros default to normal math trig functions for full float mode */</span>
  91. <a name="l00069"></a><a class="code" href="PVRTFixedPoint_8h.html#a18">00069</a> <span class="preprocessor"> #define PVRTFCOS(x) ((float)cos(x))</span>
  92. <a name="l00070"></a><a class="code" href="PVRTFixedPoint_8h.html#a19">00070</a> <span class="preprocessor"></span><span class="preprocessor"> #define PVRTFSIN(x) ((float)sin(x))</span>
  93. <a name="l00071"></a><a class="code" href="PVRTFixedPoint_8h.html#a20">00071</a> <span class="preprocessor"></span><span class="preprocessor"> #define PVRTFTAN(x) ((float)tan(x))</span>
  94. <a name="l00072"></a><a class="code" href="PVRTFixedPoint_8h.html#a21">00072</a> <span class="preprocessor"></span><span class="preprocessor"> #define PVRTFACOS(x) ((float)acos(x))</span>
  95. 00073 <span class="preprocessor"></span>
  96. 00074 <span class="preprocessor">#endif</span>
  97. 00075 <span class="preprocessor"></span>
  98. 00076
  99. 00077 <span class="comment">/* Fixed/float macro abstraction */</span>
  100. 00078 <span class="preprocessor">#ifdef PVRT_FIXED_POINT_ENABLE</span>
  101. 00079 <span class="preprocessor"></span>
  102. 00080 <span class="comment">/* Fixed-point operations, including trig tables */</span>
  103. 00081 <span class="preprocessor"> #define VERTTYPEMUL(a,b) PVRTXMUL(a,b)</span>
  104. 00082 <span class="preprocessor"></span><span class="preprocessor"> #define VERTTYPEDIV(a,b) PVRTXDIV(a,b)</span>
  105. 00083 <span class="preprocessor"></span><span class="preprocessor"> #define VERTTYPEABS(a) PVRTABS(a)</span>
  106. 00084 <span class="preprocessor"></span>
  107. 00085 <span class="preprocessor"> #define f2vt(f) PVRTF2X(f)</span>
  108. 00086 <span class="preprocessor"></span><span class="preprocessor"> #define vt2f(x) PVRTX2F(x)</span>
  109. 00087 <span class="preprocessor"></span>
  110. 00088 <span class="preprocessor"> #define PVRT_PI_OVER_TWO PVRT_PI_OVER_TWOx</span>
  111. 00089 <span class="preprocessor"></span><span class="preprocessor"> #define PVRT_PI PVRT_PIx</span>
  112. 00090 <span class="preprocessor"></span><span class="preprocessor"> #define PVRT_TWO_PI PVRT_TWO_PIx</span>
  113. 00091 <span class="preprocessor"></span><span class="preprocessor"> #define PVRT_ONE PVRT_ONEx</span>
  114. 00092 <span class="preprocessor"></span>
  115. 00093 <span class="preprocessor"> #define PVRTCOS(x) PVRTXCOS(x)</span>
  116. 00094 <span class="preprocessor"></span><span class="preprocessor"> #define PVRTSIN(x) PVRTXSIN(x)</span>
  117. 00095 <span class="preprocessor"></span><span class="preprocessor"> #define PVRTTAN(x) PVRTXTAN(x)</span>
  118. 00096 <span class="preprocessor"></span><span class="preprocessor"> #define PVRTACOS(x) PVRTXACOS(x)</span>
  119. 00097 <span class="preprocessor"></span>
  120. 00098 <span class="preprocessor">#else</span>
  121. 00099 <span class="preprocessor"></span>
  122. 00100 <span class="comment">/* Floating-point operations */</span>
  123. <a name="l00101"></a><a class="code" href="PVRTFixedPoint_8h.html#a22">00101</a> <span class="preprocessor"> #define VERTTYPEMUL(a,b) ( (VERTTYPE)((a)*(b)) )</span>
  124. <a name="l00102"></a><a class="code" href="PVRTFixedPoint_8h.html#a23">00102</a> <span class="preprocessor"></span><span class="preprocessor"> #define VERTTYPEDIV(a,b) ( (VERTTYPE)((a)/(b)) )</span>
  125. <a name="l00103"></a><a class="code" href="PVRTFixedPoint_8h.html#a24">00103</a> <span class="preprocessor"></span><span class="preprocessor"> #define VERTTYPEABS(a) ( (VERTTYPE)(fabs(a)) )</span>
  126. 00104 <span class="preprocessor"></span>
  127. <a name="l00105"></a><a class="code" href="PVRTFixedPoint_8h.html#a25">00105</a> <span class="preprocessor"> #define f2vt(x) (x)</span>
  128. <a name="l00106"></a><a class="code" href="PVRTFixedPoint_8h.html#a26">00106</a> <span class="preprocessor"></span><span class="preprocessor"> #define vt2f(x) (x)</span>
  129. 00107 <span class="preprocessor"></span>
  130. <a name="l00108"></a><a class="code" href="PVRTFixedPoint_8h.html#a27">00108</a> <span class="preprocessor"> #define PVRT_PI_OVER_TWO PVRT_PI_OVER_TWOf</span>
  131. <a name="l00109"></a><a class="code" href="PVRTFixedPoint_8h.html#a28">00109</a> <span class="preprocessor"></span><span class="preprocessor"> #define PVRT_PI PVRT_PIf</span>
  132. <a name="l00110"></a><a class="code" href="PVRTFixedPoint_8h.html#a29">00110</a> <span class="preprocessor"></span><span class="preprocessor"> #define PVRT_TWO_PI PVRT_TWO_PIf</span>
  133. <a name="l00111"></a><a class="code" href="PVRTFixedPoint_8h.html#a30">00111</a> <span class="preprocessor"></span><span class="preprocessor"> #define PVRT_ONE PVRT_ONEf</span>
  134. 00112 <span class="preprocessor"></span>
  135. 00113 <span class="comment">/* If trig tables are forced ON in non-fixed-point builds then convert fixed-point trig tables results to float */</span>
  136. <a name="l00114"></a><a class="code" href="PVRTFixedPoint_8h.html#a31">00114</a> <span class="preprocessor"> #define PVRTCOS(x) PVRTFCOS(x)</span>
  137. <a name="l00115"></a><a class="code" href="PVRTFixedPoint_8h.html#a32">00115</a> <span class="preprocessor"></span><span class="preprocessor"> #define PVRTSIN(x) PVRTFSIN(x)</span>
  138. <a name="l00116"></a><a class="code" href="PVRTFixedPoint_8h.html#a33">00116</a> <span class="preprocessor"></span><span class="preprocessor"> #define PVRTTAN(x) PVRTFTAN(x)</span>
  139. <a name="l00117"></a><a class="code" href="PVRTFixedPoint_8h.html#a34">00117</a> <span class="preprocessor"></span><span class="preprocessor"> #define PVRTACOS(x) PVRTFACOS(x)</span>
  140. 00118 <span class="preprocessor"></span>
  141. 00119 <span class="preprocessor">#endif</span>
  142. 00120 <span class="preprocessor"></span>
  143. 00121
  144. 00122 <span class="comment">// Structure Definitions</span>
  145. 00123
  146. 00124 <span class="comment">/*!***************************************************************************</span>
  147. 00125 <span class="comment"> @Struct HeaderStruct_Mesh</span>
  148. 00126 <span class="comment"> @Brief Defines the format of a header-object as exported by the MAX plugin.</span>
  149. 00127 <span class="comment">*****************************************************************************/</span>
  150. <a name="l00128"></a><a class="code" href="structHeaderStruct__Mesh.html">00128</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
  151. <a name="l00129"></a><a class="code" href="structHeaderStruct__Mesh.html#o0">00129</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nNumVertex;
  152. <a name="l00130"></a><a class="code" href="structHeaderStruct__Mesh.html#o1">00130</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nNumFaces;
  153. <a name="l00131"></a><a class="code" href="structHeaderStruct__Mesh.html#o2">00131</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nNumStrips;
  154. <a name="l00132"></a><a class="code" href="structHeaderStruct__Mesh.html#o3">00132</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nFlags;
  155. <a name="l00133"></a><a class="code" href="structHeaderStruct__Mesh.html#o4">00133</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nMaterial;
  156. <a name="l00134"></a><a class="code" href="structHeaderStruct__Mesh.html#o5">00134</a> <span class="keywordtype">float</span> fCenter[3];
  157. <a name="l00135"></a><a class="code" href="structHeaderStruct__Mesh.html#o6">00135</a> <span class="keywordtype">float</span> *pVertex;
  158. <a name="l00136"></a><a class="code" href="structHeaderStruct__Mesh.html#o7">00136</a> <span class="keywordtype">float</span> *pUV;
  159. <a name="l00137"></a><a class="code" href="structHeaderStruct__Mesh.html#o8">00137</a> <span class="keywordtype">float</span> *pNormals;
  160. <a name="l00138"></a><a class="code" href="structHeaderStruct__Mesh.html#o9">00138</a> <span class="keywordtype">float</span> *pPackedVertex;
  161. <a name="l00139"></a><a class="code" href="structHeaderStruct__Mesh.html#o10">00139</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *pVertexColor;
  162. <a name="l00140"></a><a class="code" href="structHeaderStruct__Mesh.html#o11">00140</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *pVertexMaterial;
  163. <a name="l00141"></a><a class="code" href="structHeaderStruct__Mesh.html#o12">00141</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> *pFaces;
  164. <a name="l00142"></a><a class="code" href="structHeaderStruct__Mesh.html#o13">00142</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> *pStrips;
  165. <a name="l00143"></a><a class="code" href="structHeaderStruct__Mesh.html#o14">00143</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> *pStripLength;
  166. 00144 <span class="keyword">struct</span>
  167. 00145 <span class="keyword"> </span>{
  168. <a name="l00146"></a><a class="code" href="structHeaderStruct__Mesh.html#o15">00146</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nType;
  169. <a name="l00147"></a><a class="code" href="structHeaderStruct__Mesh.html#o16">00147</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nNumPatches;
  170. <a name="l00148"></a><a class="code" href="structHeaderStruct__Mesh.html#o17">00148</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nNumVertices;
  171. <a name="l00149"></a><a class="code" href="structHeaderStruct__Mesh.html#o18">00149</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nNumSubdivisions;
  172. <a name="l00150"></a><a class="code" href="structHeaderStruct__Mesh.html#o19">00150</a> <span class="keywordtype">float</span> *pControlPoints;
  173. <a name="l00151"></a><a class="code" href="structHeaderStruct__Mesh.html#o20">00151</a> <span class="keywordtype">float</span> *pUVs;
  174. 00152 } Patch;
  175. 00153 } <a class="code" href="structHeaderStruct__Mesh.html">HeaderStruct_Mesh</a>;
  176. 00154
  177. 00155
  178. 00156 <span class="preprocessor">#ifdef PVRT_FIXED_POINT_ENABLE</span>
  179. 00157 <span class="preprocessor"></span>
  180. 00158 <span class="comment">/*!***************************************************************************</span>
  181. 00159 <span class="comment"> Defines the format of a header-object as when converted to</span>
  182. 00160 <span class="comment"> fixed point.</span>
  183. 00161 <span class="comment">*****************************************************************************/</span>
  184. 00162 <span class="comment">/*!***************************************************************************</span>
  185. 00163 <span class="comment"> @Struct HeaderStruct_Fixed_Mesh</span>
  186. 00164 <span class="comment"> @Brief Defines the format of a header-object as when converted to fixed point.</span>
  187. 00165 <span class="comment">*****************************************************************************/</span>
  188. 00166 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
  189. 00167 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nNumVertex;
  190. 00168 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nNumFaces;
  191. 00169 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nNumStrips;
  192. 00170 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nFlags;
  193. 00171 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nMaterial;
  194. 00172 <a class="code" href="PVRTFixedPoint_8h.html#a0">VERTTYPE</a> fCenter[3];
  195. 00173 <a class="code" href="PVRTFixedPoint_8h.html#a0">VERTTYPE</a> *pVertex;
  196. 00174 <a class="code" href="PVRTFixedPoint_8h.html#a0">VERTTYPE</a> *pUV;
  197. 00175 <a class="code" href="PVRTFixedPoint_8h.html#a0">VERTTYPE</a> *pNormals;
  198. 00176 <a class="code" href="PVRTFixedPoint_8h.html#a0">VERTTYPE</a> *pPackedVertex;
  199. 00177 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *pVertexColor;
  200. 00178 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *pVertexMaterial;
  201. 00179 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> *pFaces;
  202. 00180 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> *pStrips;
  203. 00181 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> *pStripLength;
  204. 00182 <span class="keyword">struct</span>
  205. 00183 <span class="keyword"> </span>{
  206. 00184 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nType; <span class="comment">// for the moment, these are left as floats</span>
  207. 00185 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nNumPatches;
  208. 00186 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nNumVertices;
  209. 00187 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nNumSubdivisions;
  210. 00188 <span class="keywordtype">float</span> *pControlPoints;
  211. 00189 <span class="keywordtype">float</span> *pUVs;
  212. 00190 } Patch;
  213. 00191 } HeaderStruct_Fixed_Mesh;
  214. 00192
  215. 00193 <span class="keyword">typedef</span> HeaderStruct_Fixed_Mesh <a class="code" href="structHeaderStruct__Mesh.html">HeaderStruct_Mesh_Type</a>;
  216. 00194 <span class="preprocessor">#else</span>
  217. <a name="l00195"></a><a class="code" href="PVRTFixedPoint_8h.html#a35">00195</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="structHeaderStruct__Mesh.html">HeaderStruct_Mesh</a> <a class="code" href="PVRTFixedPoint_8h.html#a35">HeaderStruct_Mesh_Type</a>;
  218. 00196 <span class="preprocessor">#endif</span>
  219. 00197 <span class="preprocessor"></span>
  220. 00198 <span class="comment">// Function prototypes</span>
  221. 00199
  222. 00200 <span class="comment">/*!***************************************************************************</span>
  223. 00201 <span class="comment"> @Function PVRTLoadHeaderObject</span>
  224. 00202 <span class="comment"> @Input headerObj Pointer to object structure in the header file</span>
  225. 00203 <span class="comment"> @Return directly usable geometry in fixed or float format as appropriate</span>
  226. 00204 <span class="comment"> @Description Converts the data exported by MAX to fixed point when used in OpenGL</span>
  227. 00205 <span class="comment"> ES common-lite profile.</span>
  228. 00206 <span class="comment">*****************************************************************************/</span>
  229. 00207 <a class="code" href="PVRTFixedPoint_8h.html#a35">HeaderStruct_Mesh_Type</a>* <a class="code" href="PVRTFixedPoint_8h.html#a36">PVRTLoadHeaderObject</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *headerObj);
  230. 00208
  231. 00209 <span class="comment">/*!***************************************************************************</span>
  232. 00210 <span class="comment"> @Function PVRTUnloadHeaderObject</span>
  233. 00211 <span class="comment"> @Input headerObj Pointer returned by LoadHeaderObject</span>
  234. 00212 <span class="comment"> @Description Releases memory allocated by LoadHeaderObject when geometry no longer</span>
  235. 00213 <span class="comment"> needed.</span>
  236. 00214 <span class="comment">*****************************************************************************/</span>
  237. 00215 <span class="keywordtype">void</span> <a class="code" href="PVRTFixedPoint_8h.html#a37">PVRTUnloadHeaderObject</a>(HeaderStruct_Mesh_Type* headerObj);
  238. 00216
  239. 00217
  240. 00218 <span class="preprocessor">#endif </span><span class="comment">/* _PVRTFIXEDPOINT_H_ */</span>
  241. 00219
  242. 00220 <span class="comment">/*****************************************************************************</span>
  243. 00221 <span class="comment"> End of file (PVRTFixedPoint.h)</span>
  244. 00222 <span class="comment">*****************************************************************************/</span>
  245. 00223
  246. </pre></div><br>
  247. <br>
  248. <P align=left><FONT size=2><STRONG><A
  249. href="http://www.imgtec.com/powervr/insider/legal/index.asp">Copyright</A> ©
  250. 1999-2008, Imagination Technologies Ltd.</STRONG></FONT></P>
  251. <hr>
  252. <address style="align: left;"><small><FONT color=f0f>
  253. Generated by <a href="http://www.doxygen.org/index.html">DOXYGEN</a> 1.3.6</small></address>
  254. </body>
  255. </html>