a00003_source.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <title>GLM: address.hpp Source File</title>
  6. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  7. <link href="doxygen.css" rel="stylesheet" type="text/css"/>
  8. </head>
  9. <body>
  10. <!-- Generated by Doxygen 1.6.1 -->
  11. <div class="navigation" id="top">
  12. <div class="tabs">
  13. <ul>
  14. <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
  15. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  16. <li class="current"><a href="files.html"><span>Files</span></a></li>
  17. </ul>
  18. </div>
  19. <div class="tabs">
  20. <ul>
  21. <li><a href="files.html"><span>File&nbsp;List</span></a></li>
  22. </ul>
  23. </div>
  24. <h1>address.hpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef GLM_EXT_VIRTREV_ADDRESS_HPP</span>
  25. <a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define GLM_EXT_VIRTREV_ADDRESS_HPP</span>
  26. <a name="l00003"></a>00003 <span class="preprocessor"></span>
  27. <a name="l00005"></a>00005 <span class="comment">// OpenGL Mathematics Copyright (c) 2005 - 2009 G-Truc Creation (www.g-truc.net)</span>
  28. <a name="l00006"></a>00006 <span class="comment">// Virtrev SDK copyright matrem (matrem84.free.fr)</span>
  29. <a name="l00008"></a>00008 <span class="comment"></span><span class="comment">// Created : 2008-10-07</span>
  30. <a name="l00009"></a>00009 <span class="comment">// Updated : </span>
  31. <a name="l00010"></a>00010 <span class="comment">// Licence : This source is under MIT License</span>
  32. <a name="l00011"></a>00011 <span class="comment">// File : glm/ext/virtrev/address.h</span>
  33. <a name="l00013"></a>00013 <span class="comment"></span><span class="comment">// Dependency:</span>
  34. <a name="l00014"></a>00014 <span class="comment">// - GLM core</span>
  35. <a name="l00016"></a>00016 <span class="comment"></span>
  36. <a name="l00017"></a>00017 <span class="preprocessor">#include &quot;../glm.hpp&quot;</span>
  37. <a name="l00018"></a>00018
  38. <a name="l00019"></a>00019
  39. <a name="l00020"></a>00020 <span class="keyword">namespace </span>glm
  40. <a name="l00021"></a>00021 {
  41. <a name="l00022"></a>00022 <span class="keyword">namespace </span>virtrev_glmext
  42. <a name="l00023"></a>00023 {
  43. <a name="l00025"></a><a class="code" href="a00221.html">00025</a> <span class="keyword">namespace </span><a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>
  44. <a name="l00026"></a>00026 {
  45. <a name="l00028"></a>00028 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  46. <a name="l00029"></a><a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc">00029</a> T <span class="keyword">const</span> * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tvec2&lt;T&gt; <span class="keyword">const</span> &amp; vec)
  47. <a name="l00030"></a>00030 {
  48. <a name="l00031"></a>00031 <span class="keywordflow">return</span> &amp;(vec.x);
  49. <a name="l00032"></a>00032 }
  50. <a name="l00034"></a>00034 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  51. <a name="l00035"></a><a class="code" href="a00221.html#ac7c0fa23b7bd780a576ac6581c892d60">00035</a> T * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tvec2&lt;T&gt; &amp; vec)
  52. <a name="l00036"></a>00036 {
  53. <a name="l00037"></a>00037 <span class="keywordflow">return</span> &amp;(vec.x);
  54. <a name="l00038"></a>00038 }
  55. <a name="l00039"></a>00039
  56. <a name="l00041"></a>00041 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  57. <a name="l00042"></a><a class="code" href="a00221.html#a3ee350219d99db5a39182a817631d724">00042</a> T <span class="keyword">const</span> * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tvec3&lt;T&gt; <span class="keyword">const</span> &amp; vec)
  58. <a name="l00043"></a>00043 {
  59. <a name="l00044"></a>00044 <span class="keywordflow">return</span> &amp;(vec.x);
  60. <a name="l00045"></a>00045 }
  61. <a name="l00047"></a>00047 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  62. <a name="l00048"></a><a class="code" href="a00221.html#a7905c3c0015a2f0d20072fe1b1fe5d48">00048</a> T * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tvec3&lt;T&gt; &amp; vec)
  63. <a name="l00049"></a>00049 {
  64. <a name="l00050"></a>00050 <span class="keywordflow">return</span> &amp;(vec.x);
  65. <a name="l00051"></a>00051 }
  66. <a name="l00052"></a>00052
  67. <a name="l00054"></a>00054 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  68. <a name="l00055"></a><a class="code" href="a00221.html#a015e3dcc001f7da162ca6d5fe41f55bb">00055</a> T <span class="keyword">const</span> * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tvec4&lt;T&gt; <span class="keyword">const</span> &amp; vec)
  69. <a name="l00056"></a>00056 {
  70. <a name="l00057"></a>00057 <span class="keywordflow">return</span> &amp;(vec.x);
  71. <a name="l00058"></a>00058 }
  72. <a name="l00060"></a>00060 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  73. <a name="l00061"></a><a class="code" href="a00221.html#a4222186aa146d0779965bee930052580">00061</a> T * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tvec4&lt;T&gt; &amp; vec)
  74. <a name="l00062"></a>00062 {
  75. <a name="l00063"></a>00063 <span class="keywordflow">return</span> &amp;(vec.x);
  76. <a name="l00064"></a>00064 }
  77. <a name="l00065"></a>00065
  78. <a name="l00067"></a>00067 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  79. <a name="l00068"></a><a class="code" href="a00221.html#a6c2fe9f0ed061206d9f49f0802b78901">00068</a> T <span class="keyword">const</span> * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat2x2&lt;T&gt; <span class="keyword">const</span> &amp; mat)
  80. <a name="l00069"></a>00069 {
  81. <a name="l00070"></a>00070 <span class="keywordflow">return</span> &amp;(mat[0].x);
  82. <a name="l00071"></a>00071 }
  83. <a name="l00073"></a>00073 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  84. <a name="l00074"></a><a class="code" href="a00221.html#afe5348516ec1c4472686be724f7cce2b">00074</a> T * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat2x2&lt;T&gt; &amp; mat)
  85. <a name="l00075"></a>00075 {
  86. <a name="l00076"></a>00076 <span class="keywordflow">return</span> &amp;(mat[0].x);
  87. <a name="l00077"></a>00077 }
  88. <a name="l00078"></a>00078
  89. <a name="l00080"></a>00080 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  90. <a name="l00081"></a><a class="code" href="a00221.html#aa5d3f319a1ee37caf060eeb2c201a97e">00081</a> T <span class="keyword">const</span> * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat3x3&lt;T&gt; <span class="keyword">const</span> &amp; mat)
  91. <a name="l00082"></a>00082 {
  92. <a name="l00083"></a>00083 <span class="keywordflow">return</span> &amp;(mat[0].x);
  93. <a name="l00084"></a>00084 }
  94. <a name="l00086"></a>00086 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  95. <a name="l00087"></a><a class="code" href="a00221.html#abdbdb064ec5d278520115e7172804432">00087</a> T * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat3x3&lt;T&gt; &amp; mat)
  96. <a name="l00088"></a>00088 {
  97. <a name="l00089"></a>00089 <span class="keywordflow">return</span> &amp;(mat[0].x);
  98. <a name="l00090"></a>00090 }
  99. <a name="l00091"></a>00091
  100. <a name="l00093"></a>00093 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  101. <a name="l00094"></a><a class="code" href="a00221.html#a80e4fd582e61edc541e5bc99da9fa7f6">00094</a> T <span class="keyword">const</span> * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat4x4&lt;T&gt; <span class="keyword">const</span> &amp; mat)
  102. <a name="l00095"></a>00095 {
  103. <a name="l00096"></a>00096 <span class="keywordflow">return</span> &amp;(mat[0].x);
  104. <a name="l00097"></a>00097 }
  105. <a name="l00099"></a>00099 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  106. <a name="l00100"></a><a class="code" href="a00221.html#aa1b69cb40acf4219b70e2b44dfcd094d">00100</a> T * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat4x4&lt;T&gt; &amp; mat)
  107. <a name="l00101"></a>00101 {
  108. <a name="l00102"></a>00102 <span class="keywordflow">return</span> &amp;(mat[0].x);
  109. <a name="l00103"></a>00103 }
  110. <a name="l00104"></a>00104
  111. <a name="l00106"></a>00106 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  112. <a name="l00107"></a><a class="code" href="a00221.html#ac9ccd4625f2c9cf547284ba72760563c">00107</a> T <span class="keyword">const</span> * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat2x3&lt;T&gt; <span class="keyword">const</span> &amp; mat)
  113. <a name="l00108"></a>00108 {
  114. <a name="l00109"></a>00109 <span class="keywordflow">return</span> &amp;(mat[0].x);
  115. <a name="l00110"></a>00110 }
  116. <a name="l00112"></a>00112 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  117. <a name="l00113"></a><a class="code" href="a00221.html#aa6440d96abc3643e512398bd46367eb6">00113</a> T * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat2x3&lt;T&gt; &amp; mat)
  118. <a name="l00114"></a>00114 {
  119. <a name="l00115"></a>00115 <span class="keywordflow">return</span> &amp;(mat[0].x);
  120. <a name="l00116"></a>00116 }
  121. <a name="l00117"></a>00117
  122. <a name="l00119"></a>00119 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  123. <a name="l00120"></a><a class="code" href="a00221.html#a958f8560f2416eb40a47b1b1d1e0a51a">00120</a> T <span class="keyword">const</span> * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat3x2&lt;T&gt; <span class="keyword">const</span> &amp; mat)
  124. <a name="l00121"></a>00121 {
  125. <a name="l00122"></a>00122 <span class="keywordflow">return</span> &amp;(mat[0].x);
  126. <a name="l00123"></a>00123 }
  127. <a name="l00125"></a>00125 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  128. <a name="l00126"></a><a class="code" href="a00221.html#ab8d452c561864fc6fbb7ea27c6f55cef">00126</a> T * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat3x2&lt;T&gt; &amp; mat)
  129. <a name="l00127"></a>00127 {
  130. <a name="l00128"></a>00128 <span class="keywordflow">return</span> &amp;(mat[0].x);
  131. <a name="l00129"></a>00129 }
  132. <a name="l00130"></a>00130
  133. <a name="l00132"></a>00132 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  134. <a name="l00133"></a><a class="code" href="a00221.html#ad5c5e3a063807e747e53814720708451">00133</a> T <span class="keyword">const</span> * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat2x4&lt;T&gt; <span class="keyword">const</span> &amp; mat)
  135. <a name="l00134"></a>00134 {
  136. <a name="l00135"></a>00135 <span class="keywordflow">return</span> &amp;(mat[0].x);
  137. <a name="l00136"></a>00136 }
  138. <a name="l00138"></a>00138 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  139. <a name="l00139"></a><a class="code" href="a00221.html#aca40075b816a512591bf2abc8d41daaa">00139</a> T * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat2x4&lt;T&gt; &amp; mat)
  140. <a name="l00140"></a>00140 {
  141. <a name="l00141"></a>00141 <span class="keywordflow">return</span> &amp;(mat[0].x);
  142. <a name="l00142"></a>00142 }
  143. <a name="l00143"></a>00143
  144. <a name="l00145"></a>00145 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  145. <a name="l00146"></a><a class="code" href="a00221.html#a74224f93d12c00926deb1d4ee3eaac8d">00146</a> T <span class="keyword">const</span> * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat4x2&lt;T&gt; <span class="keyword">const</span> &amp; mat)
  146. <a name="l00147"></a>00147 {
  147. <a name="l00148"></a>00148 <span class="keywordflow">return</span> &amp;(mat[0].x);
  148. <a name="l00149"></a>00149 }
  149. <a name="l00151"></a>00151 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  150. <a name="l00152"></a><a class="code" href="a00221.html#a8f75cd4db3915effaaaf12cec7e2d6d3">00152</a> T * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat4x2&lt;T&gt; &amp; mat)
  151. <a name="l00153"></a>00153 {
  152. <a name="l00154"></a>00154 <span class="keywordflow">return</span> &amp;(mat[0].x);
  153. <a name="l00155"></a>00155 }
  154. <a name="l00156"></a>00156
  155. <a name="l00158"></a>00158 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  156. <a name="l00159"></a><a class="code" href="a00221.html#a3714baf56724d5e19a8f5ae98a446268">00159</a> T <span class="keyword">const</span> * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat3x4&lt;T&gt; <span class="keyword">const</span> &amp; mat)
  157. <a name="l00160"></a>00160 {
  158. <a name="l00161"></a>00161 <span class="keywordflow">return</span> &amp;(mat[0].x);
  159. <a name="l00162"></a>00162 }
  160. <a name="l00164"></a>00164 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  161. <a name="l00165"></a><a class="code" href="a00221.html#a504a0e1e973690fc084a0a0eda631f15">00165</a> T * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat3x4&lt;T&gt; &amp; mat)
  162. <a name="l00166"></a>00166 {
  163. <a name="l00167"></a>00167 <span class="keywordflow">return</span> &amp;(mat[0].x);
  164. <a name="l00168"></a>00168 }
  165. <a name="l00169"></a>00169
  166. <a name="l00171"></a>00171 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  167. <a name="l00172"></a><a class="code" href="a00221.html#a4ba2e1a282272aaa1326b7e0a4ffcd8b">00172</a> T <span class="keyword">const</span> * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat4x3&lt;T&gt; <span class="keyword">const</span> &amp; mat)
  168. <a name="l00173"></a>00173 {
  169. <a name="l00174"></a>00174 <span class="keywordflow">return</span> &amp;(mat[0].x);
  170. <a name="l00175"></a>00175 }
  171. <a name="l00177"></a>00177 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
  172. <a name="l00178"></a><a class="code" href="a00221.html#ae8a47af12d3215c7923bb47175adeca8">00178</a> T * <a class="code" href="a00221.html#a36d4605d7efd30d690557b5b357ffefc" title="Get the const address of the vector content.">address</a>(detail::tmat4x3&lt;T&gt; &amp; mat)
  173. <a name="l00179"></a>00179 {
  174. <a name="l00180"></a>00180 <span class="keywordflow">return</span> &amp;(mat[0].x);
  175. <a name="l00181"></a>00181 }
  176. <a name="l00182"></a>00182 }
  177. <a name="l00183"></a>00183 }
  178. <a name="l00184"></a>00184 }
  179. <a name="l00185"></a>00185
  180. <a name="l00186"></a>00186 <span class="preprocessor">#define GLM_VIRTREV_address namespace virtrev_glmext::address</span>
  181. <a name="l00187"></a>00187 <span class="preprocessor"></span><span class="preprocessor">#ifndef GLM_VIRTREV_GLOBAL</span>
  182. <a name="l00188"></a>00188 <span class="preprocessor"></span><span class="keyword">namespace </span>glm {<span class="keyword">using</span> GLM_VIRTREV_address;}
  183. <a name="l00189"></a>00189 <span class="preprocessor">#endif//GLM_VIRTREV_GLOBAL</span>
  184. <a name="l00190"></a>00190 <span class="preprocessor"></span>
  185. <a name="l00191"></a>00191 <span class="preprocessor">#endif//GLM_EXT_VIRTREV_ADDRESS_HPP</span>
  186. <a name="l00192"></a>00192 <span class="preprocessor"></span>
  187. </pre></div></div>
  188. <hr size="1"/><address style="text-align: right;"><small>Generated on Mon Nov 16 11:23:22 2009 for GLM by&nbsp;
  189. <a href="http://www.doxygen.org/index.html">
  190. <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
  191. </body>
  192. </html>