mirror of
https://github.com/g-truc/glm.git
synced 2024-12-01 20:24:38 +00:00
193 lines
19 KiB
HTML
193 lines
19 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||
|
<title>GLM: address.hpp Source File</title>
|
||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||
|
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
||
|
</head>
|
||
|
<body>
|
||
|
<!-- Generated by Doxygen 1.6.1 -->
|
||
|
<div class="navigation" id="top">
|
||
|
<div class="tabs">
|
||
|
<ul>
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="tabs">
|
||
|
<ul>
|
||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<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>
|
||
|
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define GLM_EXT_VIRTREV_ADDRESS_HPP</span>
|
||
|
<a name="l00003"></a>00003 <span class="preprocessor"></span>
|
||
|
<a name="l00005"></a>00005 <span class="comment">// OpenGL Mathematics Copyright (c) 2005 - 2009 G-Truc Creation (www.g-truc.net)</span>
|
||
|
<a name="l00006"></a>00006 <span class="comment">// Virtrev SDK copyright matrem (matrem84.free.fr)</span>
|
||
|
<a name="l00008"></a>00008 <span class="comment"></span><span class="comment">// Created : 2008-10-07</span>
|
||
|
<a name="l00009"></a>00009 <span class="comment">// Updated : </span>
|
||
|
<a name="l00010"></a>00010 <span class="comment">// Licence : This source is under MIT License</span>
|
||
|
<a name="l00011"></a>00011 <span class="comment">// File : glm/ext/virtrev/address.h</span>
|
||
|
<a name="l00013"></a>00013 <span class="comment"></span><span class="comment">// Dependency:</span>
|
||
|
<a name="l00014"></a>00014 <span class="comment">// - GLM core</span>
|
||
|
<a name="l00016"></a>00016 <span class="comment"></span>
|
||
|
<a name="l00017"></a>00017 <span class="preprocessor">#include "../glm.hpp"</span>
|
||
|
<a name="l00018"></a>00018
|
||
|
<a name="l00019"></a>00019
|
||
|
<a name="l00020"></a>00020 <span class="keyword">namespace </span>glm
|
||
|
<a name="l00021"></a>00021 {
|
||
|
<a name="l00022"></a>00022 <span class="keyword">namespace </span>virtrev_glmext
|
||
|
<a name="l00023"></a>00023 {
|
||
|
<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>
|
||
|
<a name="l00026"></a>00026 {
|
||
|
<a name="l00028"></a>00028 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> <span class="keyword">const</span> & vec)
|
||
|
<a name="l00030"></a>00030 {
|
||
|
<a name="l00031"></a>00031 <span class="keywordflow">return</span> &(vec.x);
|
||
|
<a name="l00032"></a>00032 }
|
||
|
<a name="l00034"></a>00034 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> & vec)
|
||
|
<a name="l00036"></a>00036 {
|
||
|
<a name="l00037"></a>00037 <span class="keywordflow">return</span> &(vec.x);
|
||
|
<a name="l00038"></a>00038 }
|
||
|
<a name="l00039"></a>00039
|
||
|
<a name="l00041"></a>00041 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> <span class="keyword">const</span> & vec)
|
||
|
<a name="l00043"></a>00043 {
|
||
|
<a name="l00044"></a>00044 <span class="keywordflow">return</span> &(vec.x);
|
||
|
<a name="l00045"></a>00045 }
|
||
|
<a name="l00047"></a>00047 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> & vec)
|
||
|
<a name="l00049"></a>00049 {
|
||
|
<a name="l00050"></a>00050 <span class="keywordflow">return</span> &(vec.x);
|
||
|
<a name="l00051"></a>00051 }
|
||
|
<a name="l00052"></a>00052
|
||
|
<a name="l00054"></a>00054 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> <span class="keyword">const</span> & vec)
|
||
|
<a name="l00056"></a>00056 {
|
||
|
<a name="l00057"></a>00057 <span class="keywordflow">return</span> &(vec.x);
|
||
|
<a name="l00058"></a>00058 }
|
||
|
<a name="l00060"></a>00060 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> & vec)
|
||
|
<a name="l00062"></a>00062 {
|
||
|
<a name="l00063"></a>00063 <span class="keywordflow">return</span> &(vec.x);
|
||
|
<a name="l00064"></a>00064 }
|
||
|
<a name="l00065"></a>00065
|
||
|
<a name="l00067"></a>00067 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> <span class="keyword">const</span> & mat)
|
||
|
<a name="l00069"></a>00069 {
|
||
|
<a name="l00070"></a>00070 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00071"></a>00071 }
|
||
|
<a name="l00073"></a>00073 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> & mat)
|
||
|
<a name="l00075"></a>00075 {
|
||
|
<a name="l00076"></a>00076 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00077"></a>00077 }
|
||
|
<a name="l00078"></a>00078
|
||
|
<a name="l00080"></a>00080 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> <span class="keyword">const</span> & mat)
|
||
|
<a name="l00082"></a>00082 {
|
||
|
<a name="l00083"></a>00083 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00084"></a>00084 }
|
||
|
<a name="l00086"></a>00086 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> & mat)
|
||
|
<a name="l00088"></a>00088 {
|
||
|
<a name="l00089"></a>00089 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00090"></a>00090 }
|
||
|
<a name="l00091"></a>00091
|
||
|
<a name="l00093"></a>00093 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> <span class="keyword">const</span> & mat)
|
||
|
<a name="l00095"></a>00095 {
|
||
|
<a name="l00096"></a>00096 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00097"></a>00097 }
|
||
|
<a name="l00099"></a>00099 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> & mat)
|
||
|
<a name="l00101"></a>00101 {
|
||
|
<a name="l00102"></a>00102 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00103"></a>00103 }
|
||
|
<a name="l00104"></a>00104
|
||
|
<a name="l00106"></a>00106 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> <span class="keyword">const</span> & mat)
|
||
|
<a name="l00108"></a>00108 {
|
||
|
<a name="l00109"></a>00109 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00110"></a>00110 }
|
||
|
<a name="l00112"></a>00112 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> & mat)
|
||
|
<a name="l00114"></a>00114 {
|
||
|
<a name="l00115"></a>00115 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00116"></a>00116 }
|
||
|
<a name="l00117"></a>00117
|
||
|
<a name="l00119"></a>00119 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> <span class="keyword">const</span> & mat)
|
||
|
<a name="l00121"></a>00121 {
|
||
|
<a name="l00122"></a>00122 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00123"></a>00123 }
|
||
|
<a name="l00125"></a>00125 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> & mat)
|
||
|
<a name="l00127"></a>00127 {
|
||
|
<a name="l00128"></a>00128 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00129"></a>00129 }
|
||
|
<a name="l00130"></a>00130
|
||
|
<a name="l00132"></a>00132 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> <span class="keyword">const</span> & mat)
|
||
|
<a name="l00134"></a>00134 {
|
||
|
<a name="l00135"></a>00135 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00136"></a>00136 }
|
||
|
<a name="l00138"></a>00138 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> & mat)
|
||
|
<a name="l00140"></a>00140 {
|
||
|
<a name="l00141"></a>00141 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00142"></a>00142 }
|
||
|
<a name="l00143"></a>00143
|
||
|
<a name="l00145"></a>00145 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> <span class="keyword">const</span> & mat)
|
||
|
<a name="l00147"></a>00147 {
|
||
|
<a name="l00148"></a>00148 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00149"></a>00149 }
|
||
|
<a name="l00151"></a>00151 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> & mat)
|
||
|
<a name="l00153"></a>00153 {
|
||
|
<a name="l00154"></a>00154 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00155"></a>00155 }
|
||
|
<a name="l00156"></a>00156
|
||
|
<a name="l00158"></a>00158 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> <span class="keyword">const</span> & mat)
|
||
|
<a name="l00160"></a>00160 {
|
||
|
<a name="l00161"></a>00161 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00162"></a>00162 }
|
||
|
<a name="l00164"></a>00164 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> & mat)
|
||
|
<a name="l00166"></a>00166 {
|
||
|
<a name="l00167"></a>00167 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00168"></a>00168 }
|
||
|
<a name="l00169"></a>00169
|
||
|
<a name="l00171"></a>00171 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> <span class="keyword">const</span> & mat)
|
||
|
<a name="l00173"></a>00173 {
|
||
|
<a name="l00174"></a>00174 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00175"></a>00175 }
|
||
|
<a name="l00177"></a>00177 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
||
|
<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<T> & mat)
|
||
|
<a name="l00179"></a>00179 {
|
||
|
<a name="l00180"></a>00180 <span class="keywordflow">return</span> &(mat[0].x);
|
||
|
<a name="l00181"></a>00181 }
|
||
|
<a name="l00182"></a>00182 }
|
||
|
<a name="l00183"></a>00183 }
|
||
|
<a name="l00184"></a>00184 }
|
||
|
<a name="l00185"></a>00185
|
||
|
<a name="l00186"></a>00186 <span class="preprocessor">#define GLM_VIRTREV_address namespace virtrev_glmext::address</span>
|
||
|
<a name="l00187"></a>00187 <span class="preprocessor"></span><span class="preprocessor">#ifndef GLM_VIRTREV_GLOBAL</span>
|
||
|
<a name="l00188"></a>00188 <span class="preprocessor"></span><span class="keyword">namespace </span>glm {<span class="keyword">using</span> GLM_VIRTREV_address;}
|
||
|
<a name="l00189"></a>00189 <span class="preprocessor">#endif//GLM_VIRTREV_GLOBAL</span>
|
||
|
<a name="l00190"></a>00190 <span class="preprocessor"></span>
|
||
|
<a name="l00191"></a>00191 <span class="preprocessor">#endif//GLM_EXT_VIRTREV_ADDRESS_HPP</span>
|
||
|
<a name="l00192"></a>00192 <span class="preprocessor"></span>
|
||
|
</pre></div></div>
|
||
|
<hr size="1"/><address style="text-align: right;"><small>Generated on Mon Nov 16 11:23:22 2009 for GLM by
|
||
|
<a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
|
||
|
</body>
|
||
|
</html>
|