mirror of
https://github.com/g-truc/glm.git
synced 2024-11-15 22:34:35 +00:00
171 lines
18 KiB
HTML
171 lines
18 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>matrix_transform.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.7.4 -->
|
||
|
<div id="top">
|
||
|
<div id="titlearea">
|
||
|
<table cellspacing="0" cellpadding="0">
|
||
|
<tbody>
|
||
|
<tr style="height: 56px;">
|
||
|
<td id="projectlogo"><img alt="Logo" src="logo-mini.png"/></td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div id="navrow1" class="tabs">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div id="navrow2" class="tabs2">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="header">
|
||
|
<div class="headertitle">
|
||
|
<div class="title">matrix_transform.hpp</div> </div>
|
||
|
</div>
|
||
|
<div class="contents">
|
||
|
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
|
||
|
<a name="l00002"></a>00002 <span class="comment">// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)</span>
|
||
|
<a name="l00004"></a>00004 <span class="comment"></span><span class="comment">// Created : 2009-04-29</span>
|
||
|
<a name="l00005"></a>00005 <span class="comment">// Updated : 2009-04-29</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/gtc/matrix_transform.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="l00011"></a>00011 <span class="comment">// - GLM_GTC_matrix_operation</span>
|
||
|
<a name="l00013"></a>00013 <span class="comment"></span>
|
||
|
<a name="l00014"></a>00014 <span class="preprocessor">#ifndef glm_gtc_matrix_transform</span>
|
||
|
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define glm_gtc_matrix_transform</span>
|
||
|
<a name="l00016"></a>00016 <span class="preprocessor"></span>
|
||
|
<a name="l00017"></a>00017 <span class="comment">// Dependency:</span>
|
||
|
<a name="l00018"></a>00018 <span class="preprocessor">#include "../glm.hpp"</span>
|
||
|
<a name="l00019"></a>00019
|
||
|
<a name="l00020"></a>00020 <span class="preprocessor">#if(defined(GLM_MESSAGES) && !defined(glm_ext))</span>
|
||
|
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor"># pragma message("GLM: GLM_GTC_matrix_transform extension included")</span>
|
||
|
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||
|
<a name="l00023"></a>00023 <span class="preprocessor"></span>
|
||
|
<a name="l00024"></a>00024 <span class="keyword">namespace </span>glm{
|
||
|
<a name="l00025"></a>00025 <span class="keyword">namespace </span>gtc{
|
||
|
<a name="l00026"></a><a class="code" href="a00163.html">00026</a> <span class="keyword">namespace </span>matrix_transform
|
||
|
<a name="l00027"></a>00027 {
|
||
|
<a name="l00030"></a>00030
|
||
|
<a name="l00033"></a>00033 <span class="keyword">template</span> <<span class="keyword">typename</span> T>
|
||
|
<a name="l00034"></a>00034 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <a class="code" href="a00244.html#ga4683c446c8432476750ade56f2537397" title="Builds a translation 4 * 4 matrix created from a vector of 3 components.">translate</a>(
|
||
|
<a name="l00035"></a>00035 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <span class="keyword">const</span> & m,
|
||
|
<a name="l00036"></a>00036 <a class="code" href="a00021.html" title="Basic 3D vector type.">detail::tvec3<T></a> <span class="keyword">const</span> & v);
|
||
|
<a name="l00037"></a>00037
|
||
|
<a name="l00040"></a>00040 <span class="keyword">template</span> <<span class="keyword">typename</span> T>
|
||
|
<a name="l00041"></a>00041 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <a class="code" href="a00244.html#ga48168ff70412019857ceb28b3b2b1f5e" title="Builds a rotation 4 * 4 matrix created from an axis vector and an angle expressed in degrees...">rotate</a>(
|
||
|
<a name="l00042"></a>00042 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <span class="keyword">const</span> & m,
|
||
|
<a name="l00043"></a>00043 T <span class="keyword">const</span> & <a class="code" href="a00286.html#ga6a3387a7d60728f60d86546b2f4d4d30" title="Returns the quaternion rotation angle.">angle</a>,
|
||
|
<a name="l00044"></a>00044 <a class="code" href="a00021.html" title="Basic 3D vector type.">detail::tvec3<T></a> <span class="keyword">const</span> & v);
|
||
|
<a name="l00045"></a>00045
|
||
|
<a name="l00048"></a>00048 <span class="keyword">template</span> <<span class="keyword">typename</span> T>
|
||
|
<a name="l00049"></a>00049 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <a class="code" href="a00244.html#ga6da77ee2c33d0d33de557a37ff35b197" title="Builds a scale 4 * 4 matrix created from 3 scalars.">scale</a>(
|
||
|
<a name="l00050"></a>00050 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <span class="keyword">const</span> & m,
|
||
|
<a name="l00051"></a>00051 <a class="code" href="a00021.html" title="Basic 3D vector type.">detail::tvec3<T></a> <span class="keyword">const</span> & v);
|
||
|
<a name="l00052"></a>00052
|
||
|
<a name="l00055"></a>00055 <span class="keyword">template</span> <<span class="keyword">typename</span> T>
|
||
|
<a name="l00056"></a>00056 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <a class="code" href="a00244.html#gad25e5b029ebefac5b657861378c17aa8" title="Creates a matrix for an orthographic parallel viewing volume.">ortho</a>(
|
||
|
<a name="l00057"></a>00057 T <span class="keyword">const</span> & left,
|
||
|
<a name="l00058"></a>00058 T <span class="keyword">const</span> & right,
|
||
|
<a name="l00059"></a>00059 T <span class="keyword">const</span> & bottom,
|
||
|
<a name="l00060"></a>00060 T <span class="keyword">const</span> & top,
|
||
|
<a name="l00061"></a>00061 T <span class="keyword">const</span> & zNear,
|
||
|
<a name="l00062"></a>00062 T <span class="keyword">const</span> & zFar);
|
||
|
<a name="l00063"></a>00063
|
||
|
<a name="l00066"></a>00066 <span class="keyword">template</span> <<span class="keyword">typename</span> T>
|
||
|
<a name="l00067"></a>00067 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <a class="code" href="a00244.html#gad25e5b029ebefac5b657861378c17aa8" title="Creates a matrix for an orthographic parallel viewing volume.">ortho</a>(
|
||
|
<a name="l00068"></a>00068 T <span class="keyword">const</span> & left,
|
||
|
<a name="l00069"></a>00069 T <span class="keyword">const</span> & right,
|
||
|
<a name="l00070"></a>00070 T <span class="keyword">const</span> & bottom,
|
||
|
<a name="l00071"></a>00071 T <span class="keyword">const</span> & top);
|
||
|
<a name="l00072"></a>00072
|
||
|
<a name="l00075"></a>00075 <span class="keyword">template</span> <<span class="keyword">typename</span> T>
|
||
|
<a name="l00076"></a>00076 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <a class="code" href="a00244.html#ga517623bf6344a9e276b877366143116a" title="Creates a frustum matrix.">frustum</a>(
|
||
|
<a name="l00077"></a>00077 T <span class="keyword">const</span> & left,
|
||
|
<a name="l00078"></a>00078 T <span class="keyword">const</span> & right,
|
||
|
<a name="l00079"></a>00079 T <span class="keyword">const</span> & bottom,
|
||
|
<a name="l00080"></a>00080 T <span class="keyword">const</span> & top,
|
||
|
<a name="l00081"></a>00081 T <span class="keyword">const</span> & nearVal,
|
||
|
<a name="l00082"></a>00082 T <span class="keyword">const</span> & farVal);
|
||
|
<a name="l00083"></a>00083
|
||
|
<a name="l00086"></a>00086 <span class="keyword">template</span> <<span class="keyword">typename</span> T>
|
||
|
<a name="l00087"></a>00087 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <a class="code" href="a00244.html#ga1bb3652e43f824d8c1dd5b9e60c80437" title="Creates a matrix for a symetric perspective-view frustum.">perspective</a>(
|
||
|
<a name="l00088"></a>00088 T <span class="keyword">const</span> & fovy,
|
||
|
<a name="l00089"></a>00089 T <span class="keyword">const</span> & aspect,
|
||
|
<a name="l00090"></a>00090 T <span class="keyword">const</span> & zNear,
|
||
|
<a name="l00091"></a>00091 T <span class="keyword">const</span> & zFar);
|
||
|
<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>00096 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<valType></a> <a class="code" href="a00244.html#ga2d4fab691ace1abbffb3cdd4cc2316e9" title="Builds a perspective projection matrix based on a field of view From GLM_GTC_matrix_transform extensi...">perspectiveFov</a>(
|
||
|
<a name="l00097"></a>00097 valType <span class="keyword">const</span> & fov,
|
||
|
<a name="l00098"></a>00098 valType <span class="keyword">const</span> & width,
|
||
|
<a name="l00099"></a>00099 valType <span class="keyword">const</span> & height,
|
||
|
<a name="l00100"></a>00100 valType <span class="keyword">const</span> & zNear,
|
||
|
<a name="l00101"></a>00101 valType <span class="keyword">const</span> & zFar);
|
||
|
<a name="l00102"></a>00102
|
||
|
<a name="l00105"></a>00105 <span class="keyword">template</span> <<span class="keyword">typename</span> T>
|
||
|
<a name="l00106"></a>00106 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <a class="code" href="a00244.html#gab8bb0d61dfe8a35df79ee3ccc6dd9afe" title="Creates a matrix for a symmetric perspective-view frustum with far plane at infinite ...">infinitePerspective</a>(
|
||
|
<a name="l00107"></a>00107 T fovy, T aspect, T zNear);
|
||
|
<a name="l00108"></a>00108
|
||
|
<a name="l00111"></a>00111 <span class="keyword">template</span> <<span class="keyword">typename</span> T>
|
||
|
<a name="l00112"></a>00112 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <a class="code" href="a00244.html#gac257959595078f003d6a0e4be6f9a2eb" title="Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics har...">tweakedInfinitePerspective</a>(
|
||
|
<a name="l00113"></a>00113 T fovy, T aspect, T zNear);
|
||
|
<a name="l00114"></a>00114
|
||
|
<a name="l00117"></a>00117 <span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
|
||
|
<a name="l00118"></a>00118 <a class="code" href="a00021.html" title="Basic 3D vector type.">detail::tvec3<T></a> <a class="code" href="a00244.html#ga30e98d64189bae49582de8373de9f09f" title="Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.">project</a>(
|
||
|
<a name="l00119"></a>00119 <a class="code" href="a00021.html" title="Basic 3D vector type.">detail::tvec3<T></a> <span class="keyword">const</span> & obj,
|
||
|
<a name="l00120"></a>00120 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <span class="keyword">const</span> & model,
|
||
|
<a name="l00121"></a>00121 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <span class="keyword">const</span> & <a class="code" href="a00285.html#ga2bf24fe9717e1711a4f454430c79d726" title="Projects x on Normal.">proj</a>,
|
||
|
<a name="l00122"></a>00122 <a class="code" href="a00022.html" title="Basic 4D vector type.">detail::tvec4<U></a> <span class="keyword">const</span> & viewport);
|
||
|
<a name="l00123"></a>00123
|
||
|
<a name="l00126"></a>00126 <span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
|
||
|
<a name="l00127"></a>00127 <a class="code" href="a00021.html" title="Basic 3D vector type.">detail::tvec3<T></a> <a class="code" href="a00244.html#gac38d611231b15799a0c06c54ff1ede43" title="Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.">unProject</a>(
|
||
|
<a name="l00128"></a>00128 <a class="code" href="a00021.html" title="Basic 3D vector type.">detail::tvec3<T></a> <span class="keyword">const</span> & win,
|
||
|
<a name="l00129"></a>00129 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <span class="keyword">const</span> & model,
|
||
|
<a name="l00130"></a>00130 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <span class="keyword">const</span> & proj,
|
||
|
<a name="l00131"></a>00131 <a class="code" href="a00022.html" title="Basic 4D vector type.">detail::tvec4<U></a> <span class="keyword">const</span> & viewport);
|
||
|
<a name="l00132"></a>00132
|
||
|
<a name="l00135"></a>00135 <span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
|
||
|
<a name="l00136"></a>00136 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <a class="code" href="a00244.html#ga9ebc45c333c8ec63c5047d6c1fcb9415" title="Define a picking region From GLM_GTC_matrix_transform extension.">pickMatrix</a>(
|
||
|
<a name="l00137"></a>00137 <a class="code" href="a00020.html" title="The basic 2D vector type.">detail::tvec2<T></a> <span class="keyword">const</span> & center,
|
||
|
<a name="l00138"></a>00138 <a class="code" href="a00020.html" title="The basic 2D vector type.">detail::tvec2<T></a> <span class="keyword">const</span> & delta,
|
||
|
<a name="l00139"></a>00139 <a class="code" href="a00022.html" title="Basic 4D vector type.">detail::tvec4<U></a> <span class="keyword">const</span> & viewport);
|
||
|
<a name="l00140"></a>00140
|
||
|
<a name="l00143"></a>00143 <span class="keyword">template</span> <<span class="keyword">typename</span> T>
|
||
|
<a name="l00144"></a>00144 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4<T></a> <a class="code" href="a00244.html#ga2d6b6c381f047ea4d9ca4145fed9edd5" title="Build a look at view matrix.">lookAt</a>(
|
||
|
<a name="l00145"></a>00145 <a class="code" href="a00021.html" title="Basic 3D vector type.">detail::tvec3<T></a> <span class="keyword">const</span> & eye,
|
||
|
<a name="l00146"></a>00146 <a class="code" href="a00021.html" title="Basic 3D vector type.">detail::tvec3<T></a> <span class="keyword">const</span> & center,
|
||
|
<a name="l00147"></a>00147 <a class="code" href="a00021.html" title="Basic 3D vector type.">detail::tvec3<T></a> <span class="keyword">const</span> & up);
|
||
|
<a name="l00148"></a>00148
|
||
|
<a name="l00150"></a>00150 }<span class="comment">//namespace matrix_transform</span>
|
||
|
<a name="l00151"></a>00151 }<span class="comment">//namespace gtc</span>
|
||
|
<a name="l00152"></a>00152 }<span class="comment">//namespace glm</span>
|
||
|
<a name="l00153"></a>00153
|
||
|
<a name="l00154"></a>00154 <span class="preprocessor">#include "matrix_transform.inl"</span>
|
||
|
<a name="l00155"></a>00155
|
||
|
<a name="l00156"></a>00156 <span class="keyword">namespace </span>glm{<span class="keyword">using namespace </span>gtc::matrix_transform;}
|
||
|
<a name="l00157"></a>00157
|
||
|
<a name="l00158"></a>00158 <span class="preprocessor">#endif//glm_gtc_matrix_transform</span>
|
||
|
</pre></div></div>
|
||
|
</div>
|
||
|
<hr class="footer"/><address class="footer"><small>Generated by 
|
||
|
<a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||
|
</body>
|
||
|
</html>
|