diff options
Diffstat (limited to 'dev/MinGfx/docs/html/unicam_8h_source.html')
-rw-r--r-- | dev/MinGfx/docs/html/unicam_8h_source.html | 468 |
1 files changed, 234 insertions, 234 deletions
diff --git a/dev/MinGfx/docs/html/unicam_8h_source.html b/dev/MinGfx/docs/html/unicam_8h_source.html index 80fa0dc..36527be 100644 --- a/dev/MinGfx/docs/html/unicam_8h_source.html +++ b/dev/MinGfx/docs/html/unicam_8h_source.html @@ -1,234 +1,234 @@ -<!-- 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/unicam.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 -  <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&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&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">unicam.h</div> </div> -</div><!--header--> -<div class="contents"> -<a href="unicam_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> <span class="comment">/*</span></div> -<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <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> <span class="comment"> </span></div> -<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <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> <span class="comment"> All Rights Reserved.</span></div> -<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> </span></div> -<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> Original Author(s) of this File:</span></div> -<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> Dan Keefe, 2018, University of Minnesota</span></div> -<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> </span></div> -<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <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> <span class="comment"> ...</span></div> -<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> */</span></div> -<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  </div> -<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#ifndef SRC_UNICAM_H_</span></div> -<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#define SRC_UNICAM_H_</span></div> -<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>  </div> -<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include "<a class="code" href="quick__shapes_8h.html">quick_shapes.h</a>"</span></div> -<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include "<a class="code" href="point2_8h.html">point2.h</a>"</span></div> -<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include "<a class="code" href="point3_8h.html">point3.h</a>"</span></div> -<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include "<a class="code" href="vector2_8h.html">vector2.h</a>"</span></div> -<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include "<a class="code" href="vector3_8h.html">vector3.h</a>"</span></div> -<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  </div> -<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  </div> -<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">namespace </span><a class="code" href="namespacemingfx.html">mingfx</a> {</div> -<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  </div> -<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  </div> -<div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html"> 105</a></span> <span class="keyword">class </span><a class="code" href="classmingfx_1_1_uni_cam.html">UniCam</a> {</div> -<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="keyword">public</span>: </div> -<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  </div> -<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#a6e7771961011f573b2e2249f602b2d2e"> 109</a></span>  <a class="code" href="classmingfx_1_1_uni_cam.html#a6e7771961011f573b2e2249f602b2d2e">UniCam</a>();</div> -<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  </div> -<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#af507e639c4bceb4c79e21a6f80c48d07"> 112</a></span>  <a class="code" href="classmingfx_1_1_uni_cam.html#af507e639c4bceb4c79e21a6f80c48d07">UniCam</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_matrix4.html">Matrix4</a> &initialViewMatrix);</div> -<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  </div> -<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#af98022627bcb52dbf54779cfaeb6ff7e"> 114</a></span>  <span class="keyword">virtual</span> <a class="code" href="classmingfx_1_1_uni_cam.html#af98022627bcb52dbf54779cfaeb6ff7e">~UniCam</a>();</div> -<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  </div> -<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  </div> -<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="comment">// To make the interaction work, the following set of functions need to be</span></div> -<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="comment">// called from your GraphicsApp or whatever main application class you use</span></div> -<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="comment">// to receive user input events and a draw callback.</span></div> -<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  </div> -<div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#a85afba6e8792636f3c6ba2433db1c52f"> 132</a></span>  <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_uni_cam.html#a85afba6e8792636f3c6ba2433db1c52f">OnButtonDown</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_point2.html">Point2</a> &normalizedMousePos, <span class="keywordtype">float</span> mouseZ);</div> -<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  </div> -<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#a33f1b41fcf53ea78ca2b3640902c5bbe"> 142</a></span>  <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_uni_cam.html#a33f1b41fcf53ea78ca2b3640902c5bbe">OnDrag</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_point2.html">Point2</a> &normalizedMousePos);</div> -<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  </div> -<div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#a2a9431dc3943c8dc485994d88ce2a58a"> 152</a></span>  <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_uni_cam.html#a2a9431dc3943c8dc485994d88ce2a58a">OnButtonUp</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_point2.html">Point2</a> &normalizedMousePos);</div> -<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  </div> -<div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#aab253d966af52ac277ac51194745085c"> 159</a></span>  <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_uni_cam.html#aab253d966af52ac277ac51194745085c">AdvanceAnimation</a>(<span class="keywordtype">double</span> dt);</div> -<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  </div> -<div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#ae45f3c80c205a539baeb4f1b8787777d"> 166</a></span>  <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_uni_cam.html#ae45f3c80c205a539baeb4f1b8787777d">Draw</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_matrix4.html">Matrix4</a> &projectionMatrix);</div> -<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  </div> -<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  </div> -<div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#af7e7276f9390ec57ca577092c99d6ca3"> 178</a></span>  <a class="code" href="classmingfx_1_1_matrix4.html">Matrix4</a> <a class="code" href="classmingfx_1_1_uni_cam.html#af7e7276f9390ec57ca577092c99d6ca3">view_matrix</a>();</div> -<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  </div> -<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  </div> -<div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#a65d5735b4b3a8e38f2b30df4133cadd2"> 183</a></span>  <a class="code" href="classmingfx_1_1_point3.html">Point3</a> <a class="code" href="classmingfx_1_1_uni_cam.html#a65d5735b4b3a8e38f2b30df4133cadd2">eye</a>();</div> -<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  </div> -<div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#a8363576bf0f85c74d80ced697bd73d40"> 187</a></span>  <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> <a class="code" href="classmingfx_1_1_uni_cam.html#a8363576bf0f85c74d80ced697bd73d40">look</a>();</div> -<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  </div> -<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  </div> -<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="comment">// -------------</span></div> -<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  </div> -<div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#a6b17bab82595ca468a3c638512011e5b"> 194</a></span>  <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_uni_cam.html#a6b17bab82595ca468a3c638512011e5b">set_view_matrix</a>(<a class="code" href="classmingfx_1_1_matrix4.html">Matrix4</a> viewMatrix);</div> -<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  </div> -<div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#a71e0351ac19a18b9c02215a60dc51068"> 202</a></span>  <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_uni_cam.html#a71e0351ac19a18b9c02215a60dc51068">set_default_depth</a>(<span class="keywordtype">float</span> d);</div> -<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  </div> -<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  </div> -<div class="line"><a name="l00205"></a><span class="lineno"> 205</span> <span class="keyword">private</span>:</div> -<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  </div> -<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="keywordtype">void</span> recalc_angular_vel();</div> -<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  </div> -<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="keyword">enum class</span> UniCamState {</div> -<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  START,</div> -<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  PAN_DOLLY_ROT_DECISION,</div> -<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  PAN_DOLLY_DECISION,</div> -<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  ROT_WAIT_FOR_SECOND_CLICK,</div> -<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  PAN,</div> -<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  DOLLY,</div> -<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  ROT,</div> -<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  SPINNING</div> -<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  };</div> -<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  UniCamState state_;</div> -<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  </div> -<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <a class="code" href="classmingfx_1_1_point2.html">Point2</a> mouseLast_;</div> -<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <span class="keywordtype">double</span> elapsedTime_;</div> -<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  </div> -<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <a class="code" href="classmingfx_1_1_point2.html">Point2</a> initialClickPos_;</div> -<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <span class="keywordtype">bool</span> hitGeometry_;</div> -<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <a class="code" href="classmingfx_1_1_point3.html">Point3</a> hitPoint_;</div> -<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  </div> -<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keywordtype">bool</span> rotInitialized_;</div> -<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <a class="code" href="classmingfx_1_1_point3.html">Point3</a> rotLastIPoint_;</div> -<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <span class="keywordtype">float</span> boundingSphereRad_;</div> -<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <a class="code" href="classmingfx_1_1_point3.html">Point3</a> boundingSphereCtr_;</div> -<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <span class="keywordtype">double</span> rotLastTime_;</div> -<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  std::vector<std::pair<double, double>> rotAngularVelBuffer_;</div> -<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <span class="keywordtype">double</span> rotAngularVel_;</div> -<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> rotAxis_;</div> -<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  </div> -<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="keywordtype">bool</span> dollyInitialized_;</div> -<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="keywordtype">float</span> dollyFactor_;</div> -<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <span class="keywordtype">float</span> defaultDepth_;</div> -<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  </div> -<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="keywordtype">bool</span> showIcon_;</div> -<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  <a class="code" href="classmingfx_1_1_quick_shapes.html">QuickShapes</a> quickShapes_;</div> -<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  </div> -<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  <a class="code" href="classmingfx_1_1_matrix4.html">Matrix4</a> V_;</div> -<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <a class="code" href="classmingfx_1_1_matrix4.html">Matrix4</a> Vstart_;</div> -<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  </div> -<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <span class="comment">// saved from the last draw call in order to unproject the mouse pos</span></div> -<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <a class="code" href="classmingfx_1_1_matrix4.html">Matrix4</a> Pdraw_;</div> -<div class="line"><a name="l00249"></a><span class="lineno"> 249</span> };</div> -<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  </div> -<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  </div> -<div class="line"><a name="l00252"></a><span class="lineno"> 252</span> } <span class="comment">// end namespace</span></div> -<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  </div> -<div class="line"><a name="l00254"></a><span class="lineno"> 254</span> <span class="preprocessor">#endif</span></div> -<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  </div> -<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  </div> -<div class="ttc" id="aclassmingfx_1_1_matrix4_html"><div class="ttname"><a href="classmingfx_1_1_matrix4.html">mingfx::Matrix4</a></div><div class="ttdoc">A 4x4 transformation matrix stored internally as an array of floats in column-major order so as to be...</div><div class="ttdef"><b>Definition:</b> <a href="matrix4_8h_source.html#l00050">matrix4.h:50</a></div></div> -<div class="ttc" id="aclassmingfx_1_1_point2_html"><div class="ttname"><a href="classmingfx_1_1_point2.html">mingfx::Point2</a></div><div class="ttdoc">A 2D Point with floating point coordinates, used for storing 2D texture coordinates,...</div><div class="ttdef"><b>Definition:</b> <a href="point2_8h_source.html#l00028">point2.h:28</a></div></div> -<div class="ttc" id="aclassmingfx_1_1_point3_html"><div class="ttname"><a href="classmingfx_1_1_point3.html">mingfx::Point3</a></div><div class="ttdoc">A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graph...</div><div class="ttdef"><b>Definition:</b> <a href="point3_8h_source.html#l00052">point3.h:52</a></div></div> -<div class="ttc" id="aclassmingfx_1_1_quick_shapes_html"><div class="ttname"><a href="classmingfx_1_1_quick_shapes.html">mingfx::QuickShapes</a></div><div class="ttdoc">This class provides a quick way to draw shapes for use in debugging or simple scenes.</div><div class="ttdef"><b>Definition:</b> <a href="quick__shapes_8h_source.html#l00069">quick_shapes.h:69</a></div></div> -<div class="ttc" id="aclassmingfx_1_1_uni_cam_html"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html">mingfx::UniCam</a></div><div class="ttdoc">This implements a user interface for controlling the camera with the mouse.</div><div class="ttdef"><b>Definition:</b> <a href="unicam_8h_source.html#l00105">unicam.h:105</a></div></div> -<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_a2a9431dc3943c8dc485994d88ce2a58a"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#a2a9431dc3943c8dc485994d88ce2a58a">mingfx::UniCam::OnButtonUp</a></div><div class="ttdeci">void OnButtonUp(const Point2 &normalizedMousePos)</div><div class="ttdoc">Attach this to the corresponding button up event, for example, call this from within GraphicsApp::OnR...</div></div> -<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_a33f1b41fcf53ea78ca2b3640902c5bbe"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#a33f1b41fcf53ea78ca2b3640902c5bbe">mingfx::UniCam::OnDrag</a></div><div class="ttdeci">void OnDrag(const Point2 &normalizedMousePos)</div><div class="ttdoc">Attach this to the corresponding mouse move event, for example, call this from within GraphicsApp::On...</div></div> -<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_a65d5735b4b3a8e38f2b30df4133cadd2"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#a65d5735b4b3a8e38f2b30df4133cadd2">mingfx::UniCam::eye</a></div><div class="ttdeci">Point3 eye()</div><div class="ttdoc">Returns the "eye" point (i.e., focal point) of the camera in world space coordinates.</div></div> -<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_a6b17bab82595ca468a3c638512011e5b"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#a6b17bab82595ca468a3c638512011e5b">mingfx::UniCam::set_view_matrix</a></div><div class="ttdeci">void set_view_matrix(Matrix4 viewMatrix)</div><div class="ttdoc">This is not required, but you may use this if you wish to set an initial view matrix or reset the vie...</div></div> -<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_a6e7771961011f573b2e2249f602b2d2e"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#a6e7771961011f573b2e2249f602b2d2e">mingfx::UniCam::UniCam</a></div><div class="ttdeci">UniCam()</div><div class="ttdoc">Creates a UniCam object with an initial view matrix = identity.</div></div> -<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_a71e0351ac19a18b9c02215a60dc51068"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#a71e0351ac19a18b9c02215a60dc51068">mingfx::UniCam::set_default_depth</a></div><div class="ttdeci">void set_default_depth(float d)</div><div class="ttdoc">This sets the depth of the center of rotation for the case when the user's click does not intersect a...</div></div> -<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_a8363576bf0f85c74d80ced697bd73d40"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#a8363576bf0f85c74d80ced697bd73d40">mingfx::UniCam::look</a></div><div class="ttdeci">Vector3 look()</div><div class="ttdoc">Returns the look direction (i.e., -Z axis of the camera matrix) in world space coordinates.</div></div> -<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_a85afba6e8792636f3c6ba2433db1c52f"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#a85afba6e8792636f3c6ba2433db1c52f">mingfx::UniCam::OnButtonDown</a></div><div class="ttdeci">void OnButtonDown(const Point2 &normalizedMousePos, float mouseZ)</div><div class="ttdoc">Attach this to whatever mouse button you wish, for example, call this from within GraphicsApp::OnRigh...</div></div> -<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_aab253d966af52ac277ac51194745085c"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#aab253d966af52ac277ac51194745085c">mingfx::UniCam::AdvanceAnimation</a></div><div class="ttdeci">void AdvanceAnimation(double dt)</div><div class="ttdoc">Attach this to a callback that can be used to control animation. Within GraphicsApp::UpdateSimulation...</div></div> -<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_ae45f3c80c205a539baeb4f1b8787777d"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#ae45f3c80c205a539baeb4f1b8787777d">mingfx::UniCam::Draw</a></div><div class="ttdeci">void Draw(const Matrix4 &projectionMatrix)</div><div class="ttdoc">Finally, attach this to your draw callback routine. Within GraphicsApp::DrawUsingOpenGL(),...</div></div> -<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_af507e639c4bceb4c79e21a6f80c48d07"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#af507e639c4bceb4c79e21a6f80c48d07">mingfx::UniCam::UniCam</a></div><div class="ttdeci">UniCam(const Matrix4 &initialViewMatrix)</div><div class="ttdoc">Creates a UniCam object with the supplied initial view matrix.</div></div> -<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_af7e7276f9390ec57ca577092c99d6ca3"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#af7e7276f9390ec57ca577092c99d6ca3">mingfx::UniCam::view_matrix</a></div><div class="ttdeci">Matrix4 view_matrix()</div><div class="ttdoc">Access the camera view matrix created by the UniCam interactions via this method and use it to draw t...</div></div> -<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_af98022627bcb52dbf54779cfaeb6ff7e"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#af98022627bcb52dbf54779cfaeb6ff7e">mingfx::UniCam::~UniCam</a></div><div class="ttdeci">virtual ~UniCam()</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="apoint2_8h_html"><div class="ttname"><a href="point2_8h.html">point2.h</a></div></div> -<div class="ttc" id="apoint3_8h_html"><div class="ttname"><a href="point3_8h.html">point3.h</a></div></div> -<div class="ttc" id="aquick__shapes_8h_html"><div class="ttname"><a href="quick__shapes_8h.html">quick_shapes.h</a></div></div> -<div class="ttc" id="avector2_8h_html"><div class="ttname"><a href="vector2_8h.html">vector2.h</a></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  <a href="http://www.doxygen.org/index.html"> -<img class="footer" src="doxygen.png" alt="doxygen"/> -</a> 1.9.1 -</small></address> -</body> -</html> +<!-- 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/unicam.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
+  <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&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&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">unicam.h</div> </div>
+</div><!--header-->
+<div class="contents">
+<a href="unicam_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> <span class="comment">/*</span></div>
+<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <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> <span class="comment"> </span></div>
+<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <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> <span class="comment"> All Rights Reserved.</span></div>
+<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> </span></div>
+<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> Original Author(s) of this File:</span></div>
+<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> Dan Keefe, 2018, University of Minnesota</span></div>
+<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> </span></div>
+<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <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> <span class="comment"> ...</span></div>
+<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  </div>
+<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#ifndef SRC_UNICAM_H_</span></div>
+<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#define SRC_UNICAM_H_</span></div>
+<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>  </div>
+<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include "<a class="code" href="quick__shapes_8h.html">quick_shapes.h</a>"</span></div>
+<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include "<a class="code" href="point2_8h.html">point2.h</a>"</span></div>
+<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include "<a class="code" href="point3_8h.html">point3.h</a>"</span></div>
+<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include "<a class="code" href="vector2_8h.html">vector2.h</a>"</span></div>
+<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include "<a class="code" href="vector3_8h.html">vector3.h</a>"</span></div>
+<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  </div>
+<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  </div>
+<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">namespace </span><a class="code" href="namespacemingfx.html">mingfx</a> {</div>
+<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  </div>
+<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  </div>
+<div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html"> 105</a></span> <span class="keyword">class </span><a class="code" href="classmingfx_1_1_uni_cam.html">UniCam</a> {</div>
+<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="keyword">public</span>: </div>
+<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  </div>
+<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#a6e7771961011f573b2e2249f602b2d2e"> 109</a></span>  <a class="code" href="classmingfx_1_1_uni_cam.html#a6e7771961011f573b2e2249f602b2d2e">UniCam</a>();</div>
+<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  </div>
+<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#af507e639c4bceb4c79e21a6f80c48d07"> 112</a></span>  <a class="code" href="classmingfx_1_1_uni_cam.html#af507e639c4bceb4c79e21a6f80c48d07">UniCam</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_matrix4.html">Matrix4</a> &initialViewMatrix);</div>
+<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  </div>
+<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#af98022627bcb52dbf54779cfaeb6ff7e"> 114</a></span>  <span class="keyword">virtual</span> <a class="code" href="classmingfx_1_1_uni_cam.html#af98022627bcb52dbf54779cfaeb6ff7e">~UniCam</a>();</div>
+<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  </div>
+<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  </div>
+<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="comment">// To make the interaction work, the following set of functions need to be</span></div>
+<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="comment">// called from your GraphicsApp or whatever main application class you use</span></div>
+<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="comment">// to receive user input events and a draw callback.</span></div>
+<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  </div>
+<div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#a85afba6e8792636f3c6ba2433db1c52f"> 132</a></span>  <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_uni_cam.html#a85afba6e8792636f3c6ba2433db1c52f">OnButtonDown</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_point2.html">Point2</a> &normalizedMousePos, <span class="keywordtype">float</span> mouseZ);</div>
+<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  </div>
+<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#a33f1b41fcf53ea78ca2b3640902c5bbe"> 142</a></span>  <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_uni_cam.html#a33f1b41fcf53ea78ca2b3640902c5bbe">OnDrag</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_point2.html">Point2</a> &normalizedMousePos);</div>
+<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  </div>
+<div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#a2a9431dc3943c8dc485994d88ce2a58a"> 152</a></span>  <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_uni_cam.html#a2a9431dc3943c8dc485994d88ce2a58a">OnButtonUp</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_point2.html">Point2</a> &normalizedMousePos);</div>
+<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  </div>
+<div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#aab253d966af52ac277ac51194745085c"> 159</a></span>  <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_uni_cam.html#aab253d966af52ac277ac51194745085c">AdvanceAnimation</a>(<span class="keywordtype">double</span> dt);</div>
+<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  </div>
+<div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#ae45f3c80c205a539baeb4f1b8787777d"> 166</a></span>  <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_uni_cam.html#ae45f3c80c205a539baeb4f1b8787777d">Draw</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_matrix4.html">Matrix4</a> &projectionMatrix);</div>
+<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  </div>
+<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  </div>
+<div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#af7e7276f9390ec57ca577092c99d6ca3"> 178</a></span>  <a class="code" href="classmingfx_1_1_matrix4.html">Matrix4</a> <a class="code" href="classmingfx_1_1_uni_cam.html#af7e7276f9390ec57ca577092c99d6ca3">view_matrix</a>();</div>
+<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  </div>
+<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  </div>
+<div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#a65d5735b4b3a8e38f2b30df4133cadd2"> 183</a></span>  <a class="code" href="classmingfx_1_1_point3.html">Point3</a> <a class="code" href="classmingfx_1_1_uni_cam.html#a65d5735b4b3a8e38f2b30df4133cadd2">eye</a>();</div>
+<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  </div>
+<div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#a8363576bf0f85c74d80ced697bd73d40"> 187</a></span>  <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> <a class="code" href="classmingfx_1_1_uni_cam.html#a8363576bf0f85c74d80ced697bd73d40">look</a>();</div>
+<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  </div>
+<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  </div>
+<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="comment">// -------------</span></div>
+<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  </div>
+<div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#a6b17bab82595ca468a3c638512011e5b"> 194</a></span>  <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_uni_cam.html#a6b17bab82595ca468a3c638512011e5b">set_view_matrix</a>(<a class="code" href="classmingfx_1_1_matrix4.html">Matrix4</a> viewMatrix);</div>
+<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  </div>
+<div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="classmingfx_1_1_uni_cam.html#a71e0351ac19a18b9c02215a60dc51068"> 202</a></span>  <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_uni_cam.html#a71e0351ac19a18b9c02215a60dc51068">set_default_depth</a>(<span class="keywordtype">float</span> d);</div>
+<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  </div>
+<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  </div>
+<div class="line"><a name="l00205"></a><span class="lineno"> 205</span> <span class="keyword">private</span>:</div>
+<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  </div>
+<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="keywordtype">void</span> recalc_angular_vel();</div>
+<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  </div>
+<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="keyword">enum class</span> UniCamState {</div>
+<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  START,</div>
+<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  PAN_DOLLY_ROT_DECISION,</div>
+<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  PAN_DOLLY_DECISION,</div>
+<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  ROT_WAIT_FOR_SECOND_CLICK,</div>
+<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  PAN,</div>
+<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  DOLLY,</div>
+<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  ROT,</div>
+<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  SPINNING</div>
+<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  };</div>
+<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  UniCamState state_;</div>
+<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  </div>
+<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <a class="code" href="classmingfx_1_1_point2.html">Point2</a> mouseLast_;</div>
+<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <span class="keywordtype">double</span> elapsedTime_;</div>
+<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  </div>
+<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <a class="code" href="classmingfx_1_1_point2.html">Point2</a> initialClickPos_;</div>
+<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <span class="keywordtype">bool</span> hitGeometry_;</div>
+<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <a class="code" href="classmingfx_1_1_point3.html">Point3</a> hitPoint_;</div>
+<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  </div>
+<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keywordtype">bool</span> rotInitialized_;</div>
+<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <a class="code" href="classmingfx_1_1_point3.html">Point3</a> rotLastIPoint_;</div>
+<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <span class="keywordtype">float</span> boundingSphereRad_;</div>
+<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <a class="code" href="classmingfx_1_1_point3.html">Point3</a> boundingSphereCtr_;</div>
+<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <span class="keywordtype">double</span> rotLastTime_;</div>
+<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  std::vector<std::pair<double, double>> rotAngularVelBuffer_;</div>
+<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <span class="keywordtype">double</span> rotAngularVel_;</div>
+<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> rotAxis_;</div>
+<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  </div>
+<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="keywordtype">bool</span> dollyInitialized_;</div>
+<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="keywordtype">float</span> dollyFactor_;</div>
+<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <span class="keywordtype">float</span> defaultDepth_;</div>
+<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  </div>
+<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="keywordtype">bool</span> showIcon_;</div>
+<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  <a class="code" href="classmingfx_1_1_quick_shapes.html">QuickShapes</a> quickShapes_;</div>
+<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  </div>
+<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  <a class="code" href="classmingfx_1_1_matrix4.html">Matrix4</a> V_;</div>
+<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <a class="code" href="classmingfx_1_1_matrix4.html">Matrix4</a> Vstart_;</div>
+<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  </div>
+<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <span class="comment">// saved from the last draw call in order to unproject the mouse pos</span></div>
+<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <a class="code" href="classmingfx_1_1_matrix4.html">Matrix4</a> Pdraw_;</div>
+<div class="line"><a name="l00249"></a><span class="lineno"> 249</span> };</div>
+<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  </div>
+<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  </div>
+<div class="line"><a name="l00252"></a><span class="lineno"> 252</span> } <span class="comment">// end namespace</span></div>
+<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  </div>
+<div class="line"><a name="l00254"></a><span class="lineno"> 254</span> <span class="preprocessor">#endif</span></div>
+<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  </div>
+<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  </div>
+<div class="ttc" id="aclassmingfx_1_1_matrix4_html"><div class="ttname"><a href="classmingfx_1_1_matrix4.html">mingfx::Matrix4</a></div><div class="ttdoc">A 4x4 transformation matrix stored internally as an array of floats in column-major order so as to be...</div><div class="ttdef"><b>Definition:</b> <a href="matrix4_8h_source.html#l00050">matrix4.h:50</a></div></div>
+<div class="ttc" id="aclassmingfx_1_1_point2_html"><div class="ttname"><a href="classmingfx_1_1_point2.html">mingfx::Point2</a></div><div class="ttdoc">A 2D Point with floating point coordinates, used for storing 2D texture coordinates,...</div><div class="ttdef"><b>Definition:</b> <a href="point2_8h_source.html#l00028">point2.h:28</a></div></div>
+<div class="ttc" id="aclassmingfx_1_1_point3_html"><div class="ttname"><a href="classmingfx_1_1_point3.html">mingfx::Point3</a></div><div class="ttdoc">A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graph...</div><div class="ttdef"><b>Definition:</b> <a href="point3_8h_source.html#l00052">point3.h:52</a></div></div>
+<div class="ttc" id="aclassmingfx_1_1_quick_shapes_html"><div class="ttname"><a href="classmingfx_1_1_quick_shapes.html">mingfx::QuickShapes</a></div><div class="ttdoc">This class provides a quick way to draw shapes for use in debugging or simple scenes.</div><div class="ttdef"><b>Definition:</b> <a href="quick__shapes_8h_source.html#l00069">quick_shapes.h:69</a></div></div>
+<div class="ttc" id="aclassmingfx_1_1_uni_cam_html"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html">mingfx::UniCam</a></div><div class="ttdoc">This implements a user interface for controlling the camera with the mouse.</div><div class="ttdef"><b>Definition:</b> <a href="unicam_8h_source.html#l00105">unicam.h:105</a></div></div>
+<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_a2a9431dc3943c8dc485994d88ce2a58a"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#a2a9431dc3943c8dc485994d88ce2a58a">mingfx::UniCam::OnButtonUp</a></div><div class="ttdeci">void OnButtonUp(const Point2 &normalizedMousePos)</div><div class="ttdoc">Attach this to the corresponding button up event, for example, call this from within GraphicsApp::OnR...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_a33f1b41fcf53ea78ca2b3640902c5bbe"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#a33f1b41fcf53ea78ca2b3640902c5bbe">mingfx::UniCam::OnDrag</a></div><div class="ttdeci">void OnDrag(const Point2 &normalizedMousePos)</div><div class="ttdoc">Attach this to the corresponding mouse move event, for example, call this from within GraphicsApp::On...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_a65d5735b4b3a8e38f2b30df4133cadd2"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#a65d5735b4b3a8e38f2b30df4133cadd2">mingfx::UniCam::eye</a></div><div class="ttdeci">Point3 eye()</div><div class="ttdoc">Returns the "eye" point (i.e., focal point) of the camera in world space coordinates.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_a6b17bab82595ca468a3c638512011e5b"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#a6b17bab82595ca468a3c638512011e5b">mingfx::UniCam::set_view_matrix</a></div><div class="ttdeci">void set_view_matrix(Matrix4 viewMatrix)</div><div class="ttdoc">This is not required, but you may use this if you wish to set an initial view matrix or reset the vie...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_a6e7771961011f573b2e2249f602b2d2e"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#a6e7771961011f573b2e2249f602b2d2e">mingfx::UniCam::UniCam</a></div><div class="ttdeci">UniCam()</div><div class="ttdoc">Creates a UniCam object with an initial view matrix = identity.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_a71e0351ac19a18b9c02215a60dc51068"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#a71e0351ac19a18b9c02215a60dc51068">mingfx::UniCam::set_default_depth</a></div><div class="ttdeci">void set_default_depth(float d)</div><div class="ttdoc">This sets the depth of the center of rotation for the case when the user's click does not intersect a...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_a8363576bf0f85c74d80ced697bd73d40"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#a8363576bf0f85c74d80ced697bd73d40">mingfx::UniCam::look</a></div><div class="ttdeci">Vector3 look()</div><div class="ttdoc">Returns the look direction (i.e., -Z axis of the camera matrix) in world space coordinates.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_a85afba6e8792636f3c6ba2433db1c52f"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#a85afba6e8792636f3c6ba2433db1c52f">mingfx::UniCam::OnButtonDown</a></div><div class="ttdeci">void OnButtonDown(const Point2 &normalizedMousePos, float mouseZ)</div><div class="ttdoc">Attach this to whatever mouse button you wish, for example, call this from within GraphicsApp::OnRigh...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_aab253d966af52ac277ac51194745085c"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#aab253d966af52ac277ac51194745085c">mingfx::UniCam::AdvanceAnimation</a></div><div class="ttdeci">void AdvanceAnimation(double dt)</div><div class="ttdoc">Attach this to a callback that can be used to control animation. Within GraphicsApp::UpdateSimulation...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_ae45f3c80c205a539baeb4f1b8787777d"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#ae45f3c80c205a539baeb4f1b8787777d">mingfx::UniCam::Draw</a></div><div class="ttdeci">void Draw(const Matrix4 &projectionMatrix)</div><div class="ttdoc">Finally, attach this to your draw callback routine. Within GraphicsApp::DrawUsingOpenGL(),...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_af507e639c4bceb4c79e21a6f80c48d07"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#af507e639c4bceb4c79e21a6f80c48d07">mingfx::UniCam::UniCam</a></div><div class="ttdeci">UniCam(const Matrix4 &initialViewMatrix)</div><div class="ttdoc">Creates a UniCam object with the supplied initial view matrix.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_af7e7276f9390ec57ca577092c99d6ca3"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#af7e7276f9390ec57ca577092c99d6ca3">mingfx::UniCam::view_matrix</a></div><div class="ttdeci">Matrix4 view_matrix()</div><div class="ttdoc">Access the camera view matrix created by the UniCam interactions via this method and use it to draw t...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_uni_cam_html_af98022627bcb52dbf54779cfaeb6ff7e"><div class="ttname"><a href="classmingfx_1_1_uni_cam.html#af98022627bcb52dbf54779cfaeb6ff7e">mingfx::UniCam::~UniCam</a></div><div class="ttdeci">virtual ~UniCam()</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="apoint2_8h_html"><div class="ttname"><a href="point2_8h.html">point2.h</a></div></div>
+<div class="ttc" id="apoint3_8h_html"><div class="ttname"><a href="point3_8h.html">point3.h</a></div></div>
+<div class="ttc" id="aquick__shapes_8h_html"><div class="ttname"><a href="quick__shapes_8h.html">quick_shapes.h</a></div></div>
+<div class="ttc" id="avector2_8h_html"><div class="ttname"><a href="vector2_8h.html">vector2.h</a></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  <a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.9.1
+</small></address>
+</body>
+</html>
|