summaryrefslogtreecommitdiffstats
path: root/dev/MinGfx/docs/html/quaternion_8h_source.html
blob: 78bd6328025d349842dd563a55979b9e10cf9f07 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!-- HTML header for doxygen 1.8.9.1-->
<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<title>MinGfx Toolkit: src/quaternion.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">MinGfx Toolkit
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">quaternion.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="quaternion_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> This file is part of the MinGfx Project.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> </span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> Copyright (c) 2017,2018 Regents of the University of Minnesota.</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> All Rights Reserved.</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> </span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> Original Author(s) of this File:</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">    Dan Keefe, 2018, University of Minnesota</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">    </span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> Author(s) of Significant Updates/Modifications to the File:</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">    ...</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#ifndef SRC_QUATERNION_H_</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#define SRC_QUATERNION_H_</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160; </div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="vector3_8h.html">vector3.h</a>&quot;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160; </div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacemingfx.html">mingfx</a> {</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html">   41</a></span>&#160;<span class="keyword">class </span><a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> {</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#ad58ac80804ec63af354912a71361f165">   44</a></span>&#160;    <a class="code" href="classmingfx_1_1_quaternion.html#ad58ac80804ec63af354912a71361f165">Quaternion</a>();</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#a5c6cbe4fc70e8e4ec23142d0a5a2ba97">   47</a></span>&#160;    <a class="code" href="classmingfx_1_1_quaternion.html#a5c6cbe4fc70e8e4ec23142d0a5a2ba97">Quaternion</a>(<span class="keywordtype">float</span> qx, <span class="keywordtype">float</span> qy, <span class="keywordtype">float</span> qz, <span class="keywordtype">float</span> qw);</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    </div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#a07bb09eb7d0b368ef5e8d9da02fbdad6">   51</a></span>&#160;    <a class="code" href="classmingfx_1_1_quaternion.html#a07bb09eb7d0b368ef5e8d9da02fbdad6">Quaternion</a>(<span class="keywordtype">float</span> *ptr);</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160; </div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#a0be885a1b3f2d54675c6866ec3578243">   54</a></span>&#160;    <a class="code" href="classmingfx_1_1_quaternion.html#a0be885a1b3f2d54675c6866ec3578243">Quaternion</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a>&amp; other);</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    </div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#a1f9ddd82678ccf51a462e4e03a02c7cc">   56</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classmingfx_1_1_quaternion.html#a1f9ddd82678ccf51a462e4e03a02c7cc">~Quaternion</a>();</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    </div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#aa89165641485cf9337cd6279df40a403">   59</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classmingfx_1_1_quaternion.html#aa89165641485cf9337cd6279df40a403">operator==</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a>&amp; q) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    </div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#ad72c021d2d1fa543c96ac4a8b360dd2e">   62</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classmingfx_1_1_quaternion.html#ad72c021d2d1fa543c96ac4a8b360dd2e">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a>&amp; q) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    </div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#ac5f82b7ed1d620c3c15f57aca028fcdd">   65</a></span>&#160;    <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a>&amp; <a class="code" href="classmingfx_1_1_quaternion.html#ac5f82b7ed1d620c3c15f57aca028fcdd">operator=</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a>&amp; q);</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    </div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#a548d09ecd25788241d734240c0dd7ea8">   68</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classmingfx_1_1_quaternion.html#a548d09ecd25788241d734240c0dd7ea8">operator[]</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> i) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    </div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#a40e6587cc0511572297c5507634db7e1">   71</a></span>&#160;    <span class="keywordtype">float</span>&amp; <a class="code" href="classmingfx_1_1_quaternion.html#a40e6587cc0511572297c5507634db7e1">operator[]</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> i);</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    </div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#a85464500e1d3c8ba10f1968426dc24ae">   74</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classmingfx_1_1_quaternion.html#a85464500e1d3c8ba10f1968426dc24ae">x</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> q[0]; }</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160; </div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#adb294449db2a80bd11426148592d9e0b">   77</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classmingfx_1_1_quaternion.html#adb294449db2a80bd11426148592d9e0b">y</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> q[1]; }</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    </div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#a75ec001cbbf08cf5c4e1f8978082a55f">   80</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classmingfx_1_1_quaternion.html#a75ec001cbbf08cf5c4e1f8978082a55f">z</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> q[2]; }</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160; </div>
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#a8aa53f71892f02c981d98d100a8b57c7">   83</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classmingfx_1_1_quaternion.html#a8aa53f71892f02c981d98d100a8b57c7">w</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> q[3]; }</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    </div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#abca597e756f257dc33838734ae19baf9">   86</a></span>&#160;    <span class="keyword">const</span> <span class="keywordtype">float</span> * <a class="code" href="classmingfx_1_1_quaternion.html#abca597e756f257dc33838734ae19baf9">value_ptr</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#a90a9b715d06c75ba60eb1164dc6e9c6f">   89</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classmingfx_1_1_quaternion.html#a90a9b715d06c75ba60eb1164dc6e9c6f">Dot</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a>&amp; q) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#af6527ae19f31be2b265b8b8c4b34b77a">   92</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classmingfx_1_1_quaternion.html#af6527ae19f31be2b265b8b8c4b34b77a">Length</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    </div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#a05def5c8eb729037b3d9522711a5c2a2">   95</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_quaternion.html#a05def5c8eb729037b3d9522711a5c2a2">Normalize</a>();</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    </div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#a3572b35419c51332204adb5bf35f0b03">   99</a></span>&#160;    <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> <a class="code" href="classmingfx_1_1_quaternion.html#a3572b35419c51332204adb5bf35f0b03">ToUnit</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    </div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#ab0e3e20f78e537de0187def78d808584">  102</a></span>&#160;    <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> <a class="code" href="classmingfx_1_1_quaternion.html#ab0e3e20f78e537de0187def78d808584">Conjugate</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    </div>
<div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#a033f05ed7e7215a5c3c4cd26548c8007">  105</a></span>&#160;    <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> <a class="code" href="classmingfx_1_1_quaternion.html#a033f05ed7e7215a5c3c4cd26548c8007">ToEulerAnglesZYX</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#a0290914928a2618f7faaa40989113d22">  109</a></span>&#160;    <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> <a class="code" href="classmingfx_1_1_quaternion.html#a0290914928a2618f7faaa40989113d22">Slerp</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> &amp;other, <span class="keywordtype">float</span> alpha) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160; </div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <span class="comment">// the specified axis.</span></div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#a5bacec2f9a3cbbcf24572f9c8eeb480c">  113</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> <a class="code" href="classmingfx_1_1_quaternion.html#a5bacec2f9a3cbbcf24572f9c8eeb480c">FromAxisAngle</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> &amp;axis, <span class="keywordtype">float</span> angle);</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    </div>
<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#a9548599ea5c527f9f67d2ea6710e3d18">  116</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> <a class="code" href="classmingfx_1_1_quaternion.html#a9548599ea5c527f9f67d2ea6710e3d18">FromEulerAnglesZYX</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> &amp;angles);</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    </div>
<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="classmingfx_1_1_quaternion.html#a31d37561099fab3d75a74455c5f43133">  120</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> <a class="code" href="classmingfx_1_1_quaternion.html#a31d37561099fab3d75a74455c5f43133">Slerp</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> &amp;a, <span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> &amp;b, <span class="keywordtype">float</span> alpha);</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    </div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <span class="keywordtype">float</span> q[4];</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;};</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160; </div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160; </div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="namespacemingfx.html#a0a456bccfb238b9644cf21669cf35b8c">  127</a></span>&#160;<a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> <a class="code" href="namespacemingfx.html#ae5708e414f585dde2a5418ddae259a57">operator*</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a>&amp; q1, <span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a>&amp; q2);</div>
<div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="namespacemingfx.html#a444ae88d836b913ac8307fbf4357f7ed">  128</a></span>&#160;<a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> <a class="code" href="namespacemingfx.html#a444ae88d836b913ac8307fbf4357f7ed">operator/</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a>&amp; q, <span class="keyword">const</span> <span class="keywordtype">float</span> s);</div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="namespacemingfx.html#a55f694123e83d1649c112e806359d4b6">  129</a></span>&#160;<a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> <a class="code" href="namespacemingfx.html#ae5708e414f585dde2a5418ddae259a57">operator*</a>(<span class="keyword">const</span> <span class="keywordtype">float</span> s, <span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a>&amp; q);</div>
<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="namespacemingfx.html#adb96b0188d1ceda03ed8d297817502c9">  130</a></span>&#160;<a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> <a class="code" href="namespacemingfx.html#ae5708e414f585dde2a5418ddae259a57">operator*</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a>&amp; q, <span class="keyword">const</span> <span class="keywordtype">float</span> s);</div>
<div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="namespacemingfx.html#a2f5a225a54f07164d5172a3721a3aee6">  131</a></span>&#160;<a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> <a class="code" href="namespacemingfx.html#a2f5a225a54f07164d5172a3721a3aee6">operator-</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a>&amp; q);</div>
<div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="namespacemingfx.html#ad49375487853a642b3f372c95cff1a96">  132</a></span>&#160;<a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> <a class="code" href="namespacemingfx.html#a3c3b45ed6edf3fe76f98a7fd165dca03">operator+</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a>&amp; q1, <span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a>&amp; q2);</div>
<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="namespacemingfx.html#a61f2d974c78e8884bb64c2759e455101">  133</a></span>&#160;<a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> <a class="code" href="namespacemingfx.html#a2f5a225a54f07164d5172a3721a3aee6">operator-</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a>&amp; q1, <span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a>&amp; q2);</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160; </div>
<div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="namespacemingfx.html#ac4b78a682ff8d1ec298e0df7f742658d">  135</a></span>&#160;std::ostream &amp; <a class="code" href="namespacemingfx.html#a6bc967741341f4f318a505d884192906">operator&lt;&lt; </a>( std::ostream &amp;os, <span class="keyword">const</span> <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> &amp;q);</div>
<div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="namespacemingfx.html#a59fb7a99df5c572849e31065884b2235">  136</a></span>&#160;std::istream &amp; <a class="code" href="namespacemingfx.html#a6eb31e6e81c6e29144799be4c9db404d">operator&gt;&gt; </a>( std::istream &amp;is, <a class="code" href="classmingfx_1_1_quaternion.html">Quaternion</a> &amp;q);</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160; </div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    </div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;} <span class="comment">// end namespace</span></div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160; </div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160; </div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html"><div class="ttname"><a href="classmingfx_1_1_quaternion.html">mingfx::Quaternion</a></div><div class="ttdoc">A quaternion to represent rotations in 3D space.</div><div class="ttdef"><b>Definition:</b> <a href="quaternion_8h_source.html#l00041">quaternion.h:41</a></div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_a0290914928a2618f7faaa40989113d22"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#a0290914928a2618f7faaa40989113d22">mingfx::Quaternion::Slerp</a></div><div class="ttdeci">Quaternion Slerp(const Quaternion &amp;other, float alpha) const</div><div class="ttdoc">Uses spherical interpolation to interpoloate between the rotation stored in this quaternion and the r...</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_a033f05ed7e7215a5c3c4cd26548c8007"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#a033f05ed7e7215a5c3c4cd26548c8007">mingfx::Quaternion::ToEulerAnglesZYX</a></div><div class="ttdeci">Vector3 ToEulerAnglesZYX() const</div><div class="ttdoc">Converts the rotation specified by the quaternion into Euler angles.</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_a05def5c8eb729037b3d9522711a5c2a2"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#a05def5c8eb729037b3d9522711a5c2a2">mingfx::Quaternion::Normalize</a></div><div class="ttdeci">void Normalize()</div><div class="ttdoc">Normalizes the quat by making it unit length.</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_a07bb09eb7d0b368ef5e8d9da02fbdad6"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#a07bb09eb7d0b368ef5e8d9da02fbdad6">mingfx::Quaternion::Quaternion</a></div><div class="ttdeci">Quaternion(float *ptr)</div><div class="ttdoc">Creates a quate from a pointer to 4 floating point numbers in the order qx, qy, qz,...</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_a0be885a1b3f2d54675c6866ec3578243"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#a0be885a1b3f2d54675c6866ec3578243">mingfx::Quaternion::Quaternion</a></div><div class="ttdeci">Quaternion(const Quaternion &amp;other)</div><div class="ttdoc">Copy constructor.</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_a1f9ddd82678ccf51a462e4e03a02c7cc"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#a1f9ddd82678ccf51a462e4e03a02c7cc">mingfx::Quaternion::~Quaternion</a></div><div class="ttdeci">virtual ~Quaternion()</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_a31d37561099fab3d75a74455c5f43133"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#a31d37561099fab3d75a74455c5f43133">mingfx::Quaternion::Slerp</a></div><div class="ttdeci">static Quaternion Slerp(const Quaternion &amp;a, const Quaternion &amp;b, float alpha)</div><div class="ttdoc">Uses spherical interpolation to interpoloate between the rotations specified by two quaternions.</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_a3572b35419c51332204adb5bf35f0b03"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#a3572b35419c51332204adb5bf35f0b03">mingfx::Quaternion::ToUnit</a></div><div class="ttdeci">Quaternion ToUnit() const</div><div class="ttdoc">Returns a normalized (i.e., unit length) version of the quaternion without modifying the original.</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_a40e6587cc0511572297c5507634db7e1"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#a40e6587cc0511572297c5507634db7e1">mingfx::Quaternion::operator[]</a></div><div class="ttdeci">float &amp; operator[](const int i)</div><div class="ttdoc">Writable access the ith coordinate of the quaternion (qx, qy, qz, qw).</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_a548d09ecd25788241d734240c0dd7ea8"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#a548d09ecd25788241d734240c0dd7ea8">mingfx::Quaternion::operator[]</a></div><div class="ttdeci">float operator[](const int i) const</div><div class="ttdoc">Read only access to the ith coordinate of the quaternion (qx, qy, qz, qw).</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_a5bacec2f9a3cbbcf24572f9c8eeb480c"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#a5bacec2f9a3cbbcf24572f9c8eeb480c">mingfx::Quaternion::FromAxisAngle</a></div><div class="ttdeci">static Quaternion FromAxisAngle(const Vector3 &amp;axis, float angle)</div><div class="ttdoc">Creates a new quaternion that describes a rotation by angle radians about.</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_a5c6cbe4fc70e8e4ec23142d0a5a2ba97"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#a5c6cbe4fc70e8e4ec23142d0a5a2ba97">mingfx::Quaternion::Quaternion</a></div><div class="ttdeci">Quaternion(float qx, float qy, float qz, float qw)</div><div class="ttdoc">Creates a quat from the 4 parameters.</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_a75ec001cbbf08cf5c4e1f8978082a55f"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#a75ec001cbbf08cf5c4e1f8978082a55f">mingfx::Quaternion::z</a></div><div class="ttdeci">float z() const</div><div class="ttdoc">Read only access to the z coordinate of the imaginary part of the quaternion.</div><div class="ttdef"><b>Definition:</b> <a href="quaternion_8h_source.html#l00080">quaternion.h:80</a></div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_a85464500e1d3c8ba10f1968426dc24ae"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#a85464500e1d3c8ba10f1968426dc24ae">mingfx::Quaternion::x</a></div><div class="ttdeci">float x() const</div><div class="ttdoc">Read only access to the x coordinate of the imaginary part of the quaternion.</div><div class="ttdef"><b>Definition:</b> <a href="quaternion_8h_source.html#l00074">quaternion.h:74</a></div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_a8aa53f71892f02c981d98d100a8b57c7"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#a8aa53f71892f02c981d98d100a8b57c7">mingfx::Quaternion::w</a></div><div class="ttdeci">float w() const</div><div class="ttdoc">Read only access to the w, real part, of the quaternion.</div><div class="ttdef"><b>Definition:</b> <a href="quaternion_8h_source.html#l00083">quaternion.h:83</a></div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_a90a9b715d06c75ba60eb1164dc6e9c6f"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#a90a9b715d06c75ba60eb1164dc6e9c6f">mingfx::Quaternion::Dot</a></div><div class="ttdeci">float Dot(const Quaternion &amp;q) const</div><div class="ttdoc">Returns the dot product of this quaternion with another.</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_a9548599ea5c527f9f67d2ea6710e3d18"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#a9548599ea5c527f9f67d2ea6710e3d18">mingfx::Quaternion::FromEulerAnglesZYX</a></div><div class="ttdeci">static Quaternion FromEulerAnglesZYX(const Vector3 &amp;angles)</div><div class="ttdoc">Creates a new quaternion from a rotation defined in Euler angles.</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_aa89165641485cf9337cd6279df40a403"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#aa89165641485cf9337cd6279df40a403">mingfx::Quaternion::operator==</a></div><div class="ttdeci">bool operator==(const Quaternion &amp;q) const</div><div class="ttdoc">Check for &quot;equality&quot;, taking floating point imprecision into account.</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_ab0e3e20f78e537de0187def78d808584"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#ab0e3e20f78e537de0187def78d808584">mingfx::Quaternion::Conjugate</a></div><div class="ttdeci">Quaternion Conjugate() const</div><div class="ttdoc">Returns the conjugate of the quaternion.</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_abca597e756f257dc33838734ae19baf9"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#abca597e756f257dc33838734ae19baf9">mingfx::Quaternion::value_ptr</a></div><div class="ttdeci">const float * value_ptr() const</div><div class="ttdoc">Returns a const pointer to the raw data array, stored in the order qx, qy, qz, qw.</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_ac5f82b7ed1d620c3c15f57aca028fcdd"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#ac5f82b7ed1d620c3c15f57aca028fcdd">mingfx::Quaternion::operator=</a></div><div class="ttdeci">Quaternion &amp; operator=(const Quaternion &amp;q)</div><div class="ttdoc">Assignment operator.</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_ad58ac80804ec63af354912a71361f165"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#ad58ac80804ec63af354912a71361f165">mingfx::Quaternion::Quaternion</a></div><div class="ttdeci">Quaternion()</div><div class="ttdoc">Creates a quat with the identity rotation.</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_ad72c021d2d1fa543c96ac4a8b360dd2e"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#ad72c021d2d1fa543c96ac4a8b360dd2e">mingfx::Quaternion::operator!=</a></div><div class="ttdeci">bool operator!=(const Quaternion &amp;q) const</div><div class="ttdoc">Check for &quot;inequality&quot;, taking floating point imprecision into account.</div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_adb294449db2a80bd11426148592d9e0b"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#adb294449db2a80bd11426148592d9e0b">mingfx::Quaternion::y</a></div><div class="ttdeci">float y() const</div><div class="ttdoc">Read only access to the y coordinate of the imaginary part of the quaternion.</div><div class="ttdef"><b>Definition:</b> <a href="quaternion_8h_source.html#l00077">quaternion.h:77</a></div></div>
<div class="ttc" id="aclassmingfx_1_1_quaternion_html_af6527ae19f31be2b265b8b8c4b34b77a"><div class="ttname"><a href="classmingfx_1_1_quaternion.html#af6527ae19f31be2b265b8b8c4b34b77a">mingfx::Quaternion::Length</a></div><div class="ttdeci">float Length() const</div><div class="ttdoc">Returns the length of the quaternion.</div></div>
<div class="ttc" id="aclassmingfx_1_1_vector3_html"><div class="ttname"><a href="classmingfx_1_1_vector3.html">mingfx::Vector3</a></div><div class="ttdoc">A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graph...</div><div class="ttdef"><b>Definition:</b> <a href="vector3_8h_source.html#l00062">vector3.h:62</a></div></div>
<div class="ttc" id="anamespacemingfx_html"><div class="ttname"><a href="namespacemingfx.html">mingfx</a></div><div class="ttdoc">Namespace for the MinGfx Toolkit.</div><div class="ttdef"><b>Definition:</b> <a href="aabb_8h_source.html#l00021">aabb.h:21</a></div></div>
<div class="ttc" id="anamespacemingfx_html_a2f5a225a54f07164d5172a3721a3aee6"><div class="ttname"><a href="namespacemingfx.html#a2f5a225a54f07164d5172a3721a3aee6">mingfx::operator-</a></div><div class="ttdeci">Quaternion operator-(const Quaternion &amp;q)</div></div>
<div class="ttc" id="anamespacemingfx_html_a3c3b45ed6edf3fe76f98a7fd165dca03"><div class="ttname"><a href="namespacemingfx.html#a3c3b45ed6edf3fe76f98a7fd165dca03">mingfx::operator+</a></div><div class="ttdeci">AABB operator+(const AABB &amp;A, const AABB &amp;B)</div></div>
<div class="ttc" id="anamespacemingfx_html_a444ae88d836b913ac8307fbf4357f7ed"><div class="ttname"><a href="namespacemingfx.html#a444ae88d836b913ac8307fbf4357f7ed">mingfx::operator/</a></div><div class="ttdeci">Quaternion operator/(const Quaternion &amp;q, const float s)</div></div>
<div class="ttc" id="anamespacemingfx_html_a6bc967741341f4f318a505d884192906"><div class="ttname"><a href="namespacemingfx.html#a6bc967741341f4f318a505d884192906">mingfx::operator&lt;&lt;</a></div><div class="ttdeci">std::ostream &amp; operator&lt;&lt;(std::ostream &amp;os, const Color &amp;c)</div></div>
<div class="ttc" id="anamespacemingfx_html_a6eb31e6e81c6e29144799be4c9db404d"><div class="ttname"><a href="namespacemingfx.html#a6eb31e6e81c6e29144799be4c9db404d">mingfx::operator&gt;&gt;</a></div><div class="ttdeci">std::istream &amp; operator&gt;&gt;(std::istream &amp;is, Color &amp;c)</div></div>
<div class="ttc" id="anamespacemingfx_html_ae5708e414f585dde2a5418ddae259a57"><div class="ttname"><a href="namespacemingfx.html#ae5708e414f585dde2a5418ddae259a57">mingfx::operator*</a></div><div class="ttdeci">Matrix4 operator*(const Matrix4 &amp;m, const float &amp;s)</div><div class="ttdoc">Multiply matrix and scalar, returns the new matrix.</div></div>
<div class="ttc" id="avector3_8h_html"><div class="ttname"><a href="vector3_8h.html">vector3.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- HTML footer for doxygen 1.8.9.1-->
<!-- start footer part -->
<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.9.1
</small></address>
</body>
</html>