mirror of
https://github.com/g-truc/glm.git
synced 2024-11-23 01:14:34 +00:00
211 lines
21 KiB
HTML
211 lines
21 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: type_ptr.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>type_ptr.hpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
|
|
<a name="l00002"></a>00002 <span class="comment">// OpenGL Mathematics Copyright (c) 2005 - 2009 G-Truc Creation (www.g-truc.net)</span>
|
|
<a name="l00004"></a>00004 <span class="comment"></span><span class="comment">// Created : 2009-05-06</span>
|
|
<a name="l00005"></a>00005 <span class="comment">// Updated : 2009-05-06</span>
|
|
<a name="l00006"></a>00006 <span class="comment">// Licence : This source is under MIT License</span>
|
|
<a name="l00007"></a>00007 <span class="comment">// File : glm/gtx/type_ptr.hpp</span>
|
|
<a name="l00009"></a>00009 <span class="comment"></span><span class="comment">// Dependency:</span>
|
|
<a name="l00010"></a>00010 <span class="comment">// - GLM core</span>
|
|
<a name="l00012"></a>00012 <span class="comment"></span>
|
|
<a name="l00013"></a>00013 <span class="preprocessor">#ifndef glm_gtx_type_ptr</span>
|
|
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define glm_gtx_type_ptr</span>
|
|
<a name="l00015"></a>00015 <span class="preprocessor"></span>
|
|
<a name="l00016"></a>00016 <span class="comment">// Dependency:</span>
|
|
<a name="l00017"></a>00017 <span class="preprocessor">#include "../glm.hpp"</span>
|
|
<a name="l00018"></a>00018
|
|
<a name="l00019"></a>00019 <span class="keyword">namespace </span>glm
|
|
<a name="l00020"></a>00020 {
|
|
<a name="l00021"></a>00021 <span class="keyword">namespace </span>test{
|
|
<a name="l00022"></a>00022 <span class="keywordtype">void</span> main_gtx_type_ptr();
|
|
<a name="l00023"></a>00023 }<span class="comment">//namespace test</span>
|
|
<a name="l00024"></a>00024
|
|
<a name="l00025"></a>00025 <span class="keyword">namespace </span>gtx{
|
|
<a name="l00027"></a><a class="code" href="a00210.html">00027</a> <span class="keyword">namespace </span>type_ptr{
|
|
<a name="l00028"></a>00028
|
|
<a name="l00031"></a>00031 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00032"></a><a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522">00032</a> <span class="keyword">inline</span> valType <span class="keyword">const</span> * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tvec2<valType> <span class="keyword">const</span> & vec)
|
|
<a name="l00033"></a>00033 {
|
|
<a name="l00034"></a>00034 <span class="keywordflow">return</span> &(vec.x);
|
|
<a name="l00035"></a>00035 }
|
|
<a name="l00036"></a>00036
|
|
<a name="l00039"></a>00039 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00040"></a><a class="code" href="a00210.html#a40799ab64ca49c54965224e44c2d91c9">00040</a> <span class="keyword">inline</span> valType * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tvec2<valType> & vec)
|
|
<a name="l00041"></a>00041 {
|
|
<a name="l00042"></a>00042 <span class="keywordflow">return</span> &(vec.x);
|
|
<a name="l00043"></a>00043 }
|
|
<a name="l00044"></a>00044
|
|
<a name="l00047"></a>00047 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00048"></a><a class="code" href="a00210.html#ab4d76fee8c7898a44843a830728f5ba4">00048</a> <span class="keyword">inline</span> valType <span class="keyword">const</span> * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tvec3<valType> <span class="keyword">const</span> & 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="l00055"></a>00055 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00056"></a><a class="code" href="a00210.html#a6d71a6f5c597852841f6363c83495715">00056</a> <span class="keyword">inline</span> valType * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tvec3<valType> & vec)
|
|
<a name="l00057"></a>00057 {
|
|
<a name="l00058"></a>00058 <span class="keywordflow">return</span> &(vec.x);
|
|
<a name="l00059"></a>00059 }
|
|
<a name="l00060"></a>00060
|
|
<a name="l00063"></a>00063 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00064"></a><a class="code" href="a00210.html#aea51c23622fcd538232ef306c7c72ba4">00064</a> <span class="keyword">inline</span> valType <span class="keyword">const</span> * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tvec4<valType> <span class="keyword">const</span> & vec)
|
|
<a name="l00065"></a>00065 {
|
|
<a name="l00066"></a>00066 <span class="keywordflow">return</span> &(vec.x);
|
|
<a name="l00067"></a>00067 }
|
|
<a name="l00068"></a>00068
|
|
<a name="l00071"></a>00071 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00072"></a><a class="code" href="a00210.html#add9464cd26939657bc3d9dea9c8563ad">00072</a> <span class="keyword">inline</span> valType * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tvec4<valType> & vec)
|
|
<a name="l00073"></a>00073 {
|
|
<a name="l00074"></a>00074 <span class="keywordflow">return</span> &(vec.x);
|
|
<a name="l00075"></a>00075 }
|
|
<a name="l00076"></a>00076
|
|
<a name="l00079"></a>00079 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00080"></a><a class="code" href="a00210.html#acdf8fa15c126244a83e1310f8f59ace8">00080</a> <span class="keyword">inline</span> valType <span class="keyword">const</span> * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat2x2<valType> <span class="keyword">const</span> & mat)
|
|
<a name="l00081"></a>00081 {
|
|
<a name="l00082"></a>00082 <span class="keywordflow">return</span> &(mat[0].x);
|
|
<a name="l00083"></a>00083 }
|
|
<a name="l00084"></a>00084
|
|
<a name="l00087"></a>00087 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00088"></a><a class="code" href="a00210.html#af60f1fcb457103f187e050befb49130d">00088</a> <span class="keyword">inline</span> valType * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat2x2<valType> & mat)
|
|
<a name="l00089"></a>00089 {
|
|
<a name="l00090"></a>00090 <span class="keywordflow">return</span> &(mat[0].x);
|
|
<a name="l00091"></a>00091 }
|
|
<a name="l00092"></a>00092
|
|
<a name="l00095"></a>00095 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00096"></a><a class="code" href="a00210.html#ad861d5006830cc0406c1676db9100f25">00096</a> <span class="keyword">inline</span> valType <span class="keyword">const</span> * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat3x3<valType> <span class="keyword">const</span> & mat)
|
|
<a name="l00097"></a>00097 {
|
|
<a name="l00098"></a>00098 <span class="keywordflow">return</span> &(mat[0].x);
|
|
<a name="l00099"></a>00099 }
|
|
<a name="l00100"></a>00100
|
|
<a name="l00103"></a>00103 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00104"></a><a class="code" href="a00210.html#ae3399f3b9fe52972c1f7c78d6a066f7b">00104</a> <span class="keyword">inline</span> valType * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat3x3<valType> & mat)
|
|
<a name="l00105"></a>00105 {
|
|
<a name="l00106"></a>00106 <span class="keywordflow">return</span> &(mat[0].x);
|
|
<a name="l00107"></a>00107 }
|
|
<a name="l00108"></a>00108
|
|
<a name="l00111"></a>00111 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00112"></a><a class="code" href="a00210.html#a0c97efd44b8b7a133b56d8e53ef51504">00112</a> <span class="keyword">inline</span> valType <span class="keyword">const</span> * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat4x4<valType> <span class="keyword">const</span> & mat)
|
|
<a name="l00113"></a>00113 {
|
|
<a name="l00114"></a>00114 <span class="keywordflow">return</span> &(mat[0].x);
|
|
<a name="l00115"></a>00115 }
|
|
<a name="l00116"></a>00116
|
|
<a name="l00119"></a>00119 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00120"></a><a class="code" href="a00210.html#a7838696f2a7503baa608ca73bbf23360">00120</a> <span class="keyword">inline</span> valType * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat4x4<valType> & 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="l00124"></a>00124
|
|
<a name="l00127"></a>00127 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00128"></a><a class="code" href="a00210.html#a098e00199ba3f616c23444519323712a">00128</a> <span class="keyword">inline</span> valType <span class="keyword">const</span> * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat2x3<valType> <span class="keyword">const</span> & mat)
|
|
<a name="l00129"></a>00129 {
|
|
<a name="l00130"></a>00130 <span class="keywordflow">return</span> &(mat[0].x);
|
|
<a name="l00131"></a>00131 }
|
|
<a name="l00132"></a>00132
|
|
<a name="l00135"></a>00135 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00136"></a><a class="code" href="a00210.html#a135c3f311673e79d23e866e6a8712a68">00136</a> <span class="keyword">inline</span> valType * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat2x3<valType> & mat)
|
|
<a name="l00137"></a>00137 {
|
|
<a name="l00138"></a>00138 <span class="keywordflow">return</span> &(mat[0].x);
|
|
<a name="l00139"></a>00139 }
|
|
<a name="l00140"></a>00140
|
|
<a name="l00143"></a>00143 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00144"></a><a class="code" href="a00210.html#ae516ea1eb8dbed20b8f516f97f1bd3fe">00144</a> <span class="keyword">inline</span> valType <span class="keyword">const</span> * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat3x2<valType> <span class="keyword">const</span> & mat)
|
|
<a name="l00145"></a>00145 {
|
|
<a name="l00146"></a>00146 <span class="keywordflow">return</span> &(mat[0].x);
|
|
<a name="l00147"></a>00147 }
|
|
<a name="l00148"></a>00148
|
|
<a name="l00151"></a>00151 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00152"></a><a class="code" href="a00210.html#a21795c1d6f7e74c923620918836b5795">00152</a> <span class="keyword">inline</span> valType * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat3x2<valType> & 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="l00159"></a>00159 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00160"></a><a class="code" href="a00210.html#a2b8b55618c9f10ae887501b177d32616">00160</a> <span class="keyword">inline</span> valType <span class="keyword">const</span> * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat2x4<valType> <span class="keyword">const</span> & mat)
|
|
<a name="l00161"></a>00161 {
|
|
<a name="l00162"></a>00162 <span class="keywordflow">return</span> &(mat[0].x);
|
|
<a name="l00163"></a>00163 }
|
|
<a name="l00164"></a>00164
|
|
<a name="l00167"></a>00167 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00168"></a><a class="code" href="a00210.html#af5799d52fc413b81eeb0dda93ba57aaf">00168</a> <span class="keyword">inline</span> valType * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat2x4<valType> & mat)
|
|
<a name="l00169"></a>00169 {
|
|
<a name="l00170"></a>00170 <span class="keywordflow">return</span> &(mat[0].x);
|
|
<a name="l00171"></a>00171 }
|
|
<a name="l00172"></a>00172
|
|
<a name="l00175"></a>00175 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00176"></a><a class="code" href="a00210.html#aabbd8a4c8a5cd4d0ed3e1fc0e3f2f0d5">00176</a> <span class="keyword">inline</span> valType <span class="keyword">const</span> * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat4x2<valType> <span class="keyword">const</span> & mat)
|
|
<a name="l00177"></a>00177 {
|
|
<a name="l00178"></a>00178 <span class="keywordflow">return</span> &(mat[0].x);
|
|
<a name="l00179"></a>00179 }
|
|
<a name="l00180"></a>00180
|
|
<a name="l00183"></a>00183 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00184"></a><a class="code" href="a00210.html#a6aa8749bd6dead0b681ccf1e71c85080">00184</a> <span class="keyword">inline</span> valType * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat4x2<valType> & mat)
|
|
<a name="l00185"></a>00185 {
|
|
<a name="l00186"></a>00186 <span class="keywordflow">return</span> &(mat[0].x);
|
|
<a name="l00187"></a>00187 }
|
|
<a name="l00188"></a>00188
|
|
<a name="l00191"></a>00191 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00192"></a><a class="code" href="a00210.html#aac15b96346267b2571465de2ddb6b7ee">00192</a> <span class="keyword">inline</span> valType <span class="keyword">const</span> * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat3x4<valType> <span class="keyword">const</span> & mat)
|
|
<a name="l00193"></a>00193 {
|
|
<a name="l00194"></a>00194 <span class="keywordflow">return</span> &(mat[0].x);
|
|
<a name="l00195"></a>00195 }
|
|
<a name="l00196"></a>00196
|
|
<a name="l00199"></a>00199 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00200"></a><a class="code" href="a00210.html#a1aba416ccd7ffe97df1ed5ca0c2a8bf2">00200</a> <span class="keyword">inline</span> valType * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat3x4<valType> & mat)
|
|
<a name="l00201"></a>00201 {
|
|
<a name="l00202"></a>00202 <span class="keywordflow">return</span> &(mat[0].x);
|
|
<a name="l00203"></a>00203 }
|
|
<a name="l00204"></a>00204
|
|
<a name="l00207"></a>00207 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00208"></a><a class="code" href="a00210.html#aa01a4973ee1251a9bf9f630ec2fa1fdc">00208</a> <span class="keyword">inline</span> valType <span class="keyword">const</span> * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat4x3<valType> <span class="keyword">const</span> & mat)
|
|
<a name="l00209"></a>00209 {
|
|
<a name="l00210"></a>00210 <span class="keywordflow">return</span> &(mat[0].x);
|
|
<a name="l00211"></a>00211 }
|
|
<a name="l00212"></a>00212
|
|
<a name="l00215"></a>00215 <span class="keyword">template</span><<span class="keyword">typename</span> valType>
|
|
<a name="l00216"></a><a class="code" href="a00210.html#a4e4b6510adc61fc9b5c45a5efde5a9f4">00216</a> <span class="keyword">inline</span> valType * <a class="code" href="a00210.html#a6a6a7dc4324b8cb4d1a6507427f6d522" title="Get the const address of the vector content.">value_ptr</a>(detail::tmat4x3<valType> & mat)
|
|
<a name="l00217"></a>00217 {
|
|
<a name="l00218"></a>00218 <span class="keywordflow">return</span> &(mat[0].x);
|
|
<a name="l00219"></a>00219 }
|
|
<a name="l00220"></a>00220
|
|
<a name="l00221"></a>00221 }<span class="comment">//namespace type_ptr</span>
|
|
<a name="l00222"></a>00222 }<span class="comment">//namespace gtx</span>
|
|
<a name="l00223"></a>00223 }<span class="comment">//namespace glm</span>
|
|
<a name="l00224"></a>00224
|
|
<a name="l00225"></a>00225 <span class="preprocessor">#define GLM_GTX_type_ptr namespace gtx::type_ptr</span>
|
|
<a name="l00226"></a>00226 <span class="preprocessor"></span><span class="preprocessor">#ifndef GLM_GTX_GLOBAL</span>
|
|
<a name="l00227"></a>00227 <span class="preprocessor"></span><span class="keyword">namespace </span>glm {<span class="keyword">using</span> GLM_GTX_type_ptr;}
|
|
<a name="l00228"></a>00228 <span class="preprocessor">#endif//GLM_GTX_GLOBAL</span>
|
|
<a name="l00229"></a>00229 <span class="preprocessor"></span>
|
|
<a name="l00230"></a>00230 <span class="preprocessor">#include "type_ptr.inl"</span>
|
|
<a name="l00231"></a>00231
|
|
<a name="l00232"></a>00232 <span class="preprocessor">#endif//glm_gtx_type_ptr</span>
|
|
<a name="l00233"></a>00233 <span class="preprocessor"></span>
|
|
</pre></div></div>
|
|
<hr size="1"/><address style="text-align: right;"><small>Generated on Mon Nov 16 11:23:23 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>
|