glm/doc/api-0.9.2/a00036_source.html

151 lines
15 KiB
HTML
Raw Normal View History

2011-10-24 14:24:48 +00:00
<!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>euler_angles.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&#160;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&#160;List</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">euler_angles.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 : 2005-12-21</span>
<a name="l00005"></a>00005 <span class="comment">// Updated : 2007-08-14</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/euler_angles.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_half_float</span>
<a name="l00013"></a>00013 <span class="comment"></span><span class="comment">// ToDo:</span>
<a name="l00014"></a>00014 <span class="comment">// - mat2 mat2GTX(const vec2&amp; angles) undefined</span>
<a name="l00015"></a>00015 <span class="comment">// - mat3 mat3GTX(const vec2&amp; angles) undefined</span>
<a name="l00017"></a>00017 <span class="comment"></span>
<a name="l00018"></a>00018 <span class="preprocessor">#ifndef glm_gtx_euler_angles</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define glm_gtx_euler_angles</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span>
<a name="l00021"></a>00021 <span class="comment">// Dependency:</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;../glm.hpp&quot;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;../gtc/half_float.hpp&quot;</span>
<a name="l00024"></a>00024
<a name="l00025"></a>00025 <span class="preprocessor">#if(defined(GLM_MESSAGES) &amp;&amp; !defined(glm_ext))</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor"># pragma message(&quot;GLM: GLM_GTX_euler_angles extension included&quot;)</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span>
<a name="l00029"></a>00029 <span class="keyword">namespace </span>glm{
<a name="l00030"></a>00030 <span class="keyword">namespace </span>gtx{
<a name="l00031"></a><a class="code" href="a00178.html">00031</a> <span class="keyword">namespace </span>euler_angles
<a name="l00032"></a>00032 {
<a name="l00035"></a>00035
<a name="l00038"></a>00038 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> valType&gt;
<a name="l00039"></a>00039 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4&lt;valType&gt;</a> <a class="code" href="a00258.html#ga383b615b7c516d129d8a569caeb02e60" title="Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X.">eulerAngleX</a>(
<a name="l00040"></a>00040 valType <span class="keyword">const</span> &amp; angleX);
<a name="l00041"></a>00041
<a name="l00044"></a>00044 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> valType&gt;
<a name="l00045"></a>00045 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4&lt;valType&gt;</a> <a class="code" href="a00258.html#ga19efbeee8e1e51be3424fad187aada03" title="Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y.">eulerAngleY</a>(
<a name="l00046"></a>00046 valType <span class="keyword">const</span> &amp; angleY);
<a name="l00047"></a>00047
<a name="l00050"></a>00050 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> valType&gt;
<a name="l00051"></a>00051 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4&lt;valType&gt;</a> <a class="code" href="a00258.html#ga950aebf621ca275949b90845a1e76d79" title="Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z.">eulerAngleZ</a>(
<a name="l00052"></a>00052 valType <span class="keyword">const</span> &amp; angleZ);
<a name="l00053"></a>00053
<a name="l00056"></a>00056 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> valType&gt;
<a name="l00057"></a>00057 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4&lt;valType&gt;</a> <a class="code" href="a00258.html#gab31953fcb1febf66c095f80928c11880" title="Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y).">eulerAngleXY</a>(
<a name="l00058"></a>00058 valType <span class="keyword">const</span> &amp; angleX,
<a name="l00059"></a>00059 valType <span class="keyword">const</span> &amp; angleY);
<a name="l00060"></a>00060
<a name="l00063"></a>00063 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> valType&gt;
<a name="l00064"></a>00064 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4&lt;valType&gt;</a> <a class="code" href="a00258.html#gac7eb231dc5b6519dcd1e28f8662d0db6" title="Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X).">eulerAngleYX</a>(
<a name="l00065"></a>00065 valType <span class="keyword">const</span> &amp; angleY,
<a name="l00066"></a>00066 valType <span class="keyword">const</span> &amp; angleX);
<a name="l00067"></a>00067
<a name="l00070"></a>00070 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> valType&gt;
<a name="l00071"></a>00071 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4&lt;valType&gt;</a> <a class="code" href="a00258.html#gaacdf1305fa3190de23ebff5f717d5b1a" title="Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z).">eulerAngleXZ</a>(
<a name="l00072"></a>00072 valType <span class="keyword">const</span> &amp; angleX,
<a name="l00073"></a>00073 valType <span class="keyword">const</span> &amp; angleZ);
<a name="l00074"></a>00074
<a name="l00077"></a>00077 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> valType&gt;
<a name="l00078"></a>00078 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4&lt;valType&gt;</a> <a class="code" href="a00258.html#ga5afd9174575eab4105c9e3c07a9f68f7" title="Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X).">eulerAngleZX</a>(
<a name="l00079"></a>00079 valType <span class="keyword">const</span> &amp; angleZ,
<a name="l00080"></a>00080 valType <span class="keyword">const</span> &amp; angleX);
<a name="l00081"></a>00081
<a name="l00084"></a>00084 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> valType&gt;
<a name="l00085"></a>00085 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4&lt;valType&gt;</a> <a class="code" href="a00258.html#gac528b349b40a8c1d1b34c4a17221bb48" title="Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z).">eulerAngleYZ</a>(
<a name="l00086"></a>00086 valType <span class="keyword">const</span> &amp; angleY,
<a name="l00087"></a>00087 valType <span class="keyword">const</span> &amp; angleZ);
<a name="l00088"></a>00088
<a name="l00091"></a>00091 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> valType&gt;
<a name="l00092"></a>00092 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4&lt;valType&gt;</a> <a class="code" href="a00258.html#gade7193b3d889285671cdfafd62339a87" title="Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y).">eulerAngleZY</a>(
<a name="l00093"></a>00093 valType <span class="keyword">const</span> &amp; angleZ,
<a name="l00094"></a>00094 valType <span class="keyword">const</span> &amp; angleY);
<a name="l00095"></a>00095
<a name="l00098"></a>00098 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> valType&gt;
<a name="l00099"></a>00099 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4&lt;valType&gt;</a> <a class="code" href="a00258.html#ga9a1c23259481176631e5910b8a294c0c" title="Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).">eulerAngleYXZ</a>(
<a name="l00100"></a>00100 valType <span class="keyword">const</span> &amp; <a class="code" href="a00286.html#ga4795f1cc522d82d672f7be9a405583c4" title="Returns yaw value of euler angles in degrees.">yaw</a>,
<a name="l00101"></a>00101 valType <span class="keyword">const</span> &amp; <a class="code" href="a00286.html#gafad23e37f1723bbbbd7f9498cd729126" title="Returns pitch value of euler angles in degrees.">pitch</a>,
<a name="l00102"></a>00102 valType <span class="keyword">const</span> &amp; <a class="code" href="a00286.html#ga60a4f955b2836d85f3d21ded84879926" title="Returns roll value of euler angles in degrees.">roll</a>);
<a name="l00103"></a>00103
<a name="l00106"></a>00106 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> valType&gt;
<a name="l00107"></a>00107 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4&lt;valType&gt;</a> <a class="code" href="a00258.html#gab21847188e03d21037f895642252dcc7" title="Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).">yawPitchRoll</a>(
<a name="l00108"></a>00108 valType <span class="keyword">const</span> &amp; yaw,
<a name="l00109"></a>00109 valType <span class="keyword">const</span> &amp; pitch,
<a name="l00110"></a>00110 valType <span class="keyword">const</span> &amp; roll);
<a name="l00111"></a>00111
<a name="l00114"></a>00114 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00115"></a>00115 <a class="code" href="a00010.html" title="Template for 2 * 2 matrix of floating-point numbers.">detail::tmat2x2&lt;T&gt;</a> <a class="code" href="a00258.html#ga6b666a8d6dede8301520d023d0e96470" title="Creates a 2D 2 * 2 rotation matrix from an euler angle.">orientate2</a>(T <span class="keyword">const</span> &amp; <a class="code" href="a00286.html#ga6a3387a7d60728f60d86546b2f4d4d30" title="Returns the quaternion rotation angle.">angle</a>);
<a name="l00116"></a>00116
<a name="l00119"></a>00119 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00120"></a>00120 <a class="code" href="a00014.html" title="Template for 3 * 3 matrix of floating-point numbers.">detail::tmat3x3&lt;T&gt;</a> <a class="code" href="a00258.html#gaabc9340ff9d773e8117f2bed0b1bcacd" title="Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle.">orientate3</a>(T <span class="keyword">const</span> &amp; angle);
<a name="l00121"></a>00121
<a name="l00124"></a>00124 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00125"></a>00125 <a class="code" href="a00014.html" title="Template for 3 * 3 matrix of floating-point numbers.">detail::tmat3x3&lt;T&gt;</a> <a class="code" href="a00258.html#gaabc9340ff9d773e8117f2bed0b1bcacd" title="Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle.">orientate3</a>(<a class="code" href="a00021.html" title="Basic 3D vector type.">detail::tvec3&lt;T&gt;</a> <span class="keyword">const</span> &amp; angles);
<a name="l00126"></a>00126
<a name="l00129"></a>00129 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00130"></a>00130 <a class="code" href="a00018.html" title="Template for 4 * 4 matrix of floating-point numbers.">detail::tmat4x4&lt;T&gt;</a> <a class="code" href="a00258.html#gac9b9ee10382d273e6f2497f0c34ba125" title="Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).">orientate4</a>(<a class="code" href="a00021.html" title="Basic 3D vector type.">detail::tvec3&lt;T&gt;</a> <span class="keyword">const</span> &amp; angles);
<a name="l00131"></a>00131
<a name="l00133"></a>00133 }<span class="comment">//namespace euler_angles</span>
<a name="l00134"></a>00134 }<span class="comment">//namespace gtx</span>
<a name="l00135"></a>00135 }<span class="comment">//namespace glm</span>
<a name="l00136"></a>00136
<a name="l00137"></a>00137 <span class="preprocessor">#include &quot;euler_angles.inl&quot;</span>
<a name="l00138"></a>00138
<a name="l00139"></a>00139 <span class="keyword">namespace </span>glm{<span class="keyword">using namespace </span>gtx::euler_angles;}
<a name="l00140"></a>00140
<a name="l00141"></a>00141 <span class="preprocessor">#endif//glm_gtx_euler_angles</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>