aboutsummaryrefslogtreecommitdiffstats
path: root/dev/MinGfx/docs/html/classmingfx_1_1_craft_cam.html
diff options
context:
space:
mode:
authorunknown <paulx161@umn.edu>2021-02-03 14:22:28 -0600
committerunknown <paulx161@umn.edu>2021-02-03 14:22:28 -0600
commit9b83919815f6a6ce5d73da1c28483970d0ca5589 (patch)
tree4558864445dccc1605e5315e0bb11c46d2018da1 /dev/MinGfx/docs/html/classmingfx_1_1_craft_cam.html
parentAdded worksheet and support code for assignment 2 (diff)
downloadcsci4611-9b83919815f6a6ce5d73da1c28483970d0ca5589.tar
csci4611-9b83919815f6a6ce5d73da1c28483970d0ca5589.tar.gz
csci4611-9b83919815f6a6ce5d73da1c28483970d0ca5589.tar.bz2
csci4611-9b83919815f6a6ce5d73da1c28483970d0ca5589.tar.lz
csci4611-9b83919815f6a6ce5d73da1c28483970d0ca5589.tar.xz
csci4611-9b83919815f6a6ce5d73da1c28483970d0ca5589.tar.zst
csci4611-9b83919815f6a6ce5d73da1c28483970d0ca5589.zip
added dev/MinGfx/
Diffstat (limited to 'dev/MinGfx/docs/html/classmingfx_1_1_craft_cam.html')
-rw-r--r--dev/MinGfx/docs/html/classmingfx_1_1_craft_cam.html541
1 files changed, 541 insertions, 0 deletions
diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_craft_cam.html b/dev/MinGfx/docs/html/classmingfx_1_1_craft_cam.html
new file mode 100644
index 0000000..502b4cb
--- /dev/null
+++ b/dev/MinGfx/docs/html/classmingfx_1_1_craft_cam.html
@@ -0,0 +1,541 @@
+<!-- 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: mingfx::CraftCam Class Reference</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="namespacemingfx.html">mingfx</a></li><li class="navelem"><a class="el" href="classmingfx_1_1_craft_cam.html">CraftCam</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#pub-methods">Public Member Functions</a> &#124;
+<a href="classmingfx_1_1_craft_cam-members.html">List of all members</a> </div>
+ <div class="headertitle">
+<div class="title">mingfx::CraftCam Class Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>This implements a user interface for controlling the camera with the mouse. </p>
+<p>This interface is appropriate for "first person" camera control, as in games like Minecraft.</p>
+<p>Use the arrow keys or A,S,W,Z keys to move around in the virtual world. UP/DOWN and W/Z move forward and back. LEFT/RIGHT or A/S rotate your body to face left or right. You can rotate and tilt your head to look left/right/up/down by moving the mouse. In Minecraft, that movement happens whenever you move the mouse, regardless of whether you are holding down a mouse button, but in some games you want to hold the camera still while you use the mouse to draw on the screen or do something else. It's possible to use this interface both ways by calling the MouseMove() function either every time the mouse moves, or only when the mouse is in a dragging mode.</p>
+<p>Example usage: </p><div class="fragment"><div class="line"><span class="comment">// Create a global or member variable in your MyGraphicsApp class:</span></div>
+<div class="line"><a class="code" href="classmingfx_1_1_craft_cam.html#ae0b0e8d75ffc69c6373a13f1f9c2f171">CraftCam</a> cam_;</div>
+<div class="line"> </div>
+<div class="line"> </div>
+<div class="line"><span class="comment">// If you want to always rotate the view with the mouse, use this:</span></div>
+<div class="line"><span class="keywordtype">void</span> MyGraphicsApp::OnMouseMove(<span class="keyword">const</span> Point2 &amp;pos, <span class="keyword">const</span> Vector2 &amp;delta) {</div>
+<div class="line"> Vector2 delta_ndc = PixelsToNormalizedDeviceCoords(pos);</div>
+<div class="line"> cam_.OnMouseMove(delta_ndc);</div>
+<div class="line">}</div>
+<div class="line"> </div>
+<div class="line"><span class="comment">// Alternatively, if you want to only rotate the view when the mouse button is</span></div>
+<div class="line"><span class="comment">// held down, use this instead. Call cam_.OnMouseMove() in either one function</span></div>
+<div class="line"><span class="comment">// or the other, but not both!</span></div>
+<div class="line"><span class="comment">// void MyGraphicsApp::OnLeftMouseDrag(const Point2 &amp;pos, const Vector2 &amp;delta) {</span></div>
+<div class="line"><span class="comment">// Vector2 delta_ndc = PixelsToNormalizedDeviceCoords(pos);</span></div>
+<div class="line"><span class="comment">// cam_.OnMouseMove(delta_ndc);</span></div>
+<div class="line"><span class="comment">// }</span></div>
+<div class="line"> </div>
+<div class="line"><span class="comment">// This tells the camera to simulate walking based on the keyboard keys currently</span></div>
+<div class="line"><span class="comment">// pressed. You need to pass a pointer to the underlying GLFW window created by</span></div>
+<div class="line"><span class="comment">// GraphicsApp.</span></div>
+<div class="line"><span class="keywordtype">void</span> MyGraphicsApp::UpdateSimulation(<span class="keywordtype">double</span> dt) {</div>
+<div class="line"> cam_.UpdateSimulation(dt, window());</div>
+<div class="line">}</div>
+<div class="line"> </div>
+<div class="line"><span class="keywordtype">void</span> MyGraphicsApp::InitOpenGL() {</div>
+<div class="line"> cam_.set_view_matrix(Matrix4::lookAt(Point3(0,2,2), Point3(0,2,0), Vector3(0,1,0)););</div>
+<div class="line">}</div>
+<div class="line"> </div>
+<div class="line"><span class="keywordtype">void</span> MyGraphicsApp::DrawOpenGL() {</div>
+<div class="line"> <span class="comment">// draw your scene using the view matrix from the camera</span></div>
+<div class="line"> Matrix4 proj_matrix = Matrix4::perspective(60, aspect_ratio(), 1, 200);</div>
+<div class="line"> Matrix4 <a class="code" href="classmingfx_1_1_craft_cam.html#acccdadc08d8d8a0b7b9426f18209ff36">view_matrix</a> = cam_.view_matrix();</div>
+<div class="line"> Matrix4 model_matrix = Matrix4::RotateY(to_radians(45.0));</div>
+<div class="line"> quick_shapes.DrawCube(model_matrix, view_matirx, proj_matrix, Color(1,1,1));</div>
+<div class="line">}</div>
+<div class="ttc" id="aclassmingfx_1_1_craft_cam_html_acccdadc08d8d8a0b7b9426f18209ff36"><div class="ttname"><a href="classmingfx_1_1_craft_cam.html#acccdadc08d8d8a0b7b9426f18209ff36">mingfx::CraftCam::view_matrix</a></div><div class="ttdeci">Matrix4 view_matrix()</div><div class="ttdoc">Access the camera view matrix created by the CraftCam interactions via this method and use it to draw...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_craft_cam_html_ae0b0e8d75ffc69c6373a13f1f9c2f171"><div class="ttname"><a href="classmingfx_1_1_craft_cam.html#ae0b0e8d75ffc69c6373a13f1f9c2f171">mingfx::CraftCam::CraftCam</a></div><div class="ttdeci">CraftCam()</div><div class="ttdoc">Creates a CraftCam object with an initial view matrix = identity.</div></div>
+</div><!-- fragment -->
+<p class="definition">Definition at line <a class="el" href="craft__cam_8h_source.html#l00079">79</a> of file <a class="el" href="craft__cam_8h_source.html">craft_cam.h</a>.</p>
+</div>
+<p><code>#include &lt;<a class="el" href="craft__cam_8h_source.html">craft_cam.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
+Public Member Functions</h2></td></tr>
+<tr class="memitem:ae0b0e8d75ffc69c6373a13f1f9c2f171"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmingfx_1_1_craft_cam.html#ae0b0e8d75ffc69c6373a13f1f9c2f171">CraftCam</a> ()</td></tr>
+<tr class="memdesc:ae0b0e8d75ffc69c6373a13f1f9c2f171"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="classmingfx_1_1_craft_cam.html" title="This implements a user interface for controlling the camera with the mouse.">CraftCam</a> object with an initial view matrix = identity. <a href="classmingfx_1_1_craft_cam.html#ae0b0e8d75ffc69c6373a13f1f9c2f171">More...</a><br /></td></tr>
+<tr class="separator:ae0b0e8d75ffc69c6373a13f1f9c2f171"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab9e1864b5859c22d27ba809b1ba7a51f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmingfx_1_1_craft_cam.html#ab9e1864b5859c22d27ba809b1ba7a51f">CraftCam</a> (const <a class="el" href="classmingfx_1_1_matrix4.html">Matrix4</a> &amp;initial_view_matrix)</td></tr>
+<tr class="memdesc:ab9e1864b5859c22d27ba809b1ba7a51f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="classmingfx_1_1_craft_cam.html" title="This implements a user interface for controlling the camera with the mouse.">CraftCam</a> object with the supplied initial view matrix. <a href="classmingfx_1_1_craft_cam.html#ab9e1864b5859c22d27ba809b1ba7a51f">More...</a><br /></td></tr>
+<tr class="separator:ab9e1864b5859c22d27ba809b1ba7a51f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a85ef9bebdd1595be1288bc104245f4ff"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmingfx_1_1_craft_cam.html#a85ef9bebdd1595be1288bc104245f4ff">~CraftCam</a> ()</td></tr>
+<tr class="separator:a85ef9bebdd1595be1288bc104245f4ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2b7808e489933b117583cf709fa46bc7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmingfx_1_1_craft_cam.html#a2b7808e489933b117583cf709fa46bc7">UpdateSimulation</a> (double dt, GLFWwindow *window_ptr)</td></tr>
+<tr class="memdesc:a2b7808e489933b117583cf709fa46bc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Call this from your app's <a class="el" href="classmingfx_1_1_craft_cam.html#a2b7808e489933b117583cf709fa46bc7" title="Call this from your app&#39;s UpdateSimulation() method. This tells the camera to simulate walking based ...">UpdateSimulation()</a> method. This tells the camera to simulate walking based on the keyboard keys currently pressed. You need to pass a pointer to the underlying GLFW window created by <a class="el" href="classmingfx_1_1_graphics_app.html" title="This is the main application base class for the MinGfx Toolkit.">GraphicsApp</a>. Example: <a href="classmingfx_1_1_craft_cam.html#a2b7808e489933b117583cf709fa46bc7">More...</a><br /></td></tr>
+<tr class="separator:a2b7808e489933b117583cf709fa46bc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8366e9d8e9bb3b048d1dd14af2f76311"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmingfx_1_1_craft_cam.html#a8366e9d8e9bb3b048d1dd14af2f76311">OnMouseMove</a> (const <a class="el" href="classmingfx_1_1_vector2.html">Vector2</a> &amp;normalized_mouse_delta)</td></tr>
+<tr class="memdesc:a8366e9d8e9bb3b048d1dd14af2f76311"><td class="mdescLeft">&#160;</td><td class="mdescRight">Call this from your app's <a class="el" href="classmingfx_1_1_craft_cam.html#a8366e9d8e9bb3b048d1dd14af2f76311" title="Call this from your app&#39;s OnMouseMove() or On*MouseDrag() method. Use OnMouseMove() if you want to al...">OnMouseMove()</a> or On*MouseDrag() method. Use <a class="el" href="classmingfx_1_1_craft_cam.html#a8366e9d8e9bb3b048d1dd14af2f76311" title="Call this from your app&#39;s OnMouseMove() or On*MouseDrag() method. Use OnMouseMove() if you want to al...">OnMouseMove()</a> if you want to always rotate the view with the mouse. Remember to convert the mouse coordinates (usually reported by window managers in pixels) into normalized device coordinates: <a href="classmingfx_1_1_craft_cam.html#a8366e9d8e9bb3b048d1dd14af2f76311">More...</a><br /></td></tr>
+<tr class="separator:a8366e9d8e9bb3b048d1dd14af2f76311"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:acccdadc08d8d8a0b7b9426f18209ff36"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmingfx_1_1_matrix4.html">Matrix4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmingfx_1_1_craft_cam.html#acccdadc08d8d8a0b7b9426f18209ff36">view_matrix</a> ()</td></tr>
+<tr class="memdesc:acccdadc08d8d8a0b7b9426f18209ff36"><td class="mdescLeft">&#160;</td><td class="mdescRight">Access the camera view matrix created by the <a class="el" href="classmingfx_1_1_craft_cam.html" title="This implements a user interface for controlling the camera with the mouse.">CraftCam</a> interactions via this method and use it to draw the geometry in your scence. For example, within <a class="el" href="classmingfx_1_1_graphics_app.html#a5a858fd10651f7617491f37b49dbf8ca" title="Override this to draw graphics using raw OpenGL 2D or 3D graphics calls.">GraphicsApp::DrawUsingOpenGL()</a>, you might have: <a href="classmingfx_1_1_craft_cam.html#acccdadc08d8d8a0b7b9426f18209ff36">More...</a><br /></td></tr>
+<tr class="separator:acccdadc08d8d8a0b7b9426f18209ff36"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a82a8e20596247e2986e5929c1ef7f150"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmingfx_1_1_point3.html">Point3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmingfx_1_1_craft_cam.html#a82a8e20596247e2986e5929c1ef7f150">eye</a> ()</td></tr>
+<tr class="memdesc:a82a8e20596247e2986e5929c1ef7f150"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the "eye" point (i.e., focal point) of the camera in world space coordinates. <a href="classmingfx_1_1_craft_cam.html#a82a8e20596247e2986e5929c1ef7f150">More...</a><br /></td></tr>
+<tr class="separator:a82a8e20596247e2986e5929c1ef7f150"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2c7546bccfbf986eb9cd0a2784f74859"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmingfx_1_1_vector3.html">Vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmingfx_1_1_craft_cam.html#a2c7546bccfbf986eb9cd0a2784f74859">look</a> ()</td></tr>
+<tr class="memdesc:a2c7546bccfbf986eb9cd0a2784f74859"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the look direction (i.e., -Z axis of the camera matrix) in world space coordinates. <a href="classmingfx_1_1_craft_cam.html#a2c7546bccfbf986eb9cd0a2784f74859">More...</a><br /></td></tr>
+<tr class="separator:a2c7546bccfbf986eb9cd0a2784f74859"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae3d9c7ea9307dbbadaa4b6e2f9933a7b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmingfx_1_1_craft_cam.html#ae3d9c7ea9307dbbadaa4b6e2f9933a7b">UpdateHeight</a> (float new_y_value)</td></tr>
+<tr class="memdesc:ae3d9c7ea9307dbbadaa4b6e2f9933a7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the y value of the camera (i.e., the height). If you want to set the entire view matrix, then use <a class="el" href="classmingfx_1_1_craft_cam.html#a79a194be8675a0a968f14fe3dcd79da8" title="This is not required, but you may use this if you wish to set an initial view matrix or reset the vie...">set_view_matrix()</a>, but if you just want to update the height, e.g., while walking around a bumpy terrain, then use this. <a href="classmingfx_1_1_craft_cam.html#ae3d9c7ea9307dbbadaa4b6e2f9933a7b">More...</a><br /></td></tr>
+<tr class="separator:ae3d9c7ea9307dbbadaa4b6e2f9933a7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a79a194be8675a0a968f14fe3dcd79da8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmingfx_1_1_craft_cam.html#a79a194be8675a0a968f14fe3dcd79da8">set_view_matrix</a> (<a class="el" href="classmingfx_1_1_matrix4.html">Matrix4</a> <a class="el" href="classmingfx_1_1_craft_cam.html#acccdadc08d8d8a0b7b9426f18209ff36">view_matrix</a>)</td></tr>
+<tr class="memdesc:a79a194be8675a0a968f14fe3dcd79da8"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is not required, but you may use this if you wish to set an initial view matrix or reset the view matrix. <a href="classmingfx_1_1_craft_cam.html#a79a194be8675a0a968f14fe3dcd79da8">More...</a><br /></td></tr>
+<tr class="separator:a79a194be8675a0a968f14fe3dcd79da8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a93567af7acbae2939d57cfd8a72bcef2"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmingfx_1_1_craft_cam.html#a93567af7acbae2939d57cfd8a72bcef2">translation_scale</a> ()</td></tr>
+<tr class="memdesc:a93567af7acbae2939d57cfd8a72bcef2"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the scale factor used to speed up / slow down forward/backward translation when walking for the UP / DOWN keys. It defaults to 1.0, smaller values will make the camera walk slower, larger values will speed it up. <a href="classmingfx_1_1_craft_cam.html#a93567af7acbae2939d57cfd8a72bcef2">More...</a><br /></td></tr>
+<tr class="separator:a93567af7acbae2939d57cfd8a72bcef2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a151fde09d08001ee2a615f25ec1acea7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmingfx_1_1_craft_cam.html#a151fde09d08001ee2a615f25ec1acea7">set_translation_scale</a> (float s)</td></tr>
+<tr class="memdesc:a151fde09d08001ee2a615f25ec1acea7"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the scale factor used to speed up / slow down forward/backward translation when walking for the UP / DOWN keys. It defaults to 1.0, smaller values will make the camera walk slower, larger values will speed it up. <a href="classmingfx_1_1_craft_cam.html#a151fde09d08001ee2a615f25ec1acea7">More...</a><br /></td></tr>
+<tr class="separator:a151fde09d08001ee2a615f25ec1acea7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9fe22cc3b933b12674a5b8f1b5c834ac"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmingfx_1_1_craft_cam.html#a9fe22cc3b933b12674a5b8f1b5c834ac">rotation_scale</a> ()</td></tr>
+<tr class="memdesc:a9fe22cc3b933b12674a5b8f1b5c834ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the scale factor used to speed up / slow down left/right rotation when walking for the LEFT / RIGHT keys. It defaults to 1.0, smaller values will make the camera turn slower, larger values will speed it up. <a href="classmingfx_1_1_craft_cam.html#a9fe22cc3b933b12674a5b8f1b5c834ac">More...</a><br /></td></tr>
+<tr class="separator:a9fe22cc3b933b12674a5b8f1b5c834ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a352f5a42f6e88d2e599bd5acb42e5831"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmingfx_1_1_craft_cam.html#a352f5a42f6e88d2e599bd5acb42e5831">set_rotation_scale</a> (float s)</td></tr>
+<tr class="memdesc:a352f5a42f6e88d2e599bd5acb42e5831"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the scale factor used to speed up / slow down left/right rotation when walking for the LEFT / RIGHT keys. It defaults to 1.0, smaller values will make the camera turn slower, larger values will speed it up. <a href="classmingfx_1_1_craft_cam.html#a352f5a42f6e88d2e599bd5acb42e5831">More...</a><br /></td></tr>
+<tr class="separator:a352f5a42f6e88d2e599bd5acb42e5831"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a96ba4a36029ca8234576cbf2791c5ccb"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmingfx_1_1_craft_cam.html#a96ba4a36029ca8234576cbf2791c5ccb">look_scale</a> ()</td></tr>
+<tr class="memdesc:a96ba4a36029ca8234576cbf2791c5ccb"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the scale factor used to speed up / slow down looking around when moving the head with the mouse. It defaults to 1.0, smaller values will make the camera turn slower, larger values will speed it up. <a href="classmingfx_1_1_craft_cam.html#a96ba4a36029ca8234576cbf2791c5ccb">More...</a><br /></td></tr>
+<tr class="separator:a96ba4a36029ca8234576cbf2791c5ccb"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a15092ae5de6920546e3ce79aeb196f44"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmingfx_1_1_craft_cam.html#a15092ae5de6920546e3ce79aeb196f44">set_look_scale</a> (float s)</td></tr>
+<tr class="memdesc:a15092ae5de6920546e3ce79aeb196f44"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the scale factor used to speed up / slow down looking around when moving the head with the mouse. It defaults to 1.0, smaller values will make the camera turn slower, larger values will speed it up. <a href="classmingfx_1_1_craft_cam.html#a15092ae5de6920546e3ce79aeb196f44">More...</a><br /></td></tr>
+<tr class="separator:a15092ae5de6920546e3ce79aeb196f44"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
+<a id="ae0b0e8d75ffc69c6373a13f1f9c2f171"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae0b0e8d75ffc69c6373a13f1f9c2f171">&#9670;&nbsp;</a></span>CraftCam() <span class="overload">[1/2]</span></h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">mingfx::CraftCam::CraftCam </td>
+ <td>(</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Creates a <a class="el" href="classmingfx_1_1_craft_cam.html" title="This implements a user interface for controlling the camera with the mouse.">CraftCam</a> object with an initial view matrix = identity. </p>
+
+</div>
+</div>
+<a id="ab9e1864b5859c22d27ba809b1ba7a51f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab9e1864b5859c22d27ba809b1ba7a51f">&#9670;&nbsp;</a></span>CraftCam() <span class="overload">[2/2]</span></h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">mingfx::CraftCam::CraftCam </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classmingfx_1_1_matrix4.html">Matrix4</a> &amp;&#160;</td>
+ <td class="paramname"><em>initial_view_matrix</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Creates a <a class="el" href="classmingfx_1_1_craft_cam.html" title="This implements a user interface for controlling the camera with the mouse.">CraftCam</a> object with the supplied initial view matrix. </p>
+
+</div>
+</div>
+<a id="a85ef9bebdd1595be1288bc104245f4ff"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a85ef9bebdd1595be1288bc104245f4ff">&#9670;&nbsp;</a></span>~CraftCam()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">virtual mingfx::CraftCam::~CraftCam </td>
+ <td>(</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<h2 class="groupheader">Member Function Documentation</h2>
+<a id="a82a8e20596247e2986e5929c1ef7f150"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a82a8e20596247e2986e5929c1ef7f150">&#9670;&nbsp;</a></span>eye()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classmingfx_1_1_point3.html">Point3</a> mingfx::CraftCam::eye </td>
+ <td>(</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Returns the "eye" point (i.e., focal point) of the camera in world space coordinates. </p>
+
+</div>
+</div>
+<a id="a2c7546bccfbf986eb9cd0a2784f74859"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2c7546bccfbf986eb9cd0a2784f74859">&#9670;&nbsp;</a></span>look()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classmingfx_1_1_vector3.html">Vector3</a> mingfx::CraftCam::look </td>
+ <td>(</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Returns the look direction (i.e., -Z axis of the camera matrix) in world space coordinates. </p>
+
+</div>
+</div>
+<a id="a96ba4a36029ca8234576cbf2791c5ccb"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a96ba4a36029ca8234576cbf2791c5ccb">&#9670;&nbsp;</a></span>look_scale()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">float mingfx::CraftCam::look_scale </td>
+ <td>(</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>This is the scale factor used to speed up / slow down looking around when moving the head with the mouse. It defaults to 1.0, smaller values will make the camera turn slower, larger values will speed it up. </p>
+
+</div>
+</div>
+<a id="a8366e9d8e9bb3b048d1dd14af2f76311"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8366e9d8e9bb3b048d1dd14af2f76311">&#9670;&nbsp;</a></span>OnMouseMove()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void mingfx::CraftCam::OnMouseMove </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classmingfx_1_1_vector2.html">Vector2</a> &amp;&#160;</td>
+ <td class="paramname"><em>normalized_mouse_delta</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Call this from your app's <a class="el" href="classmingfx_1_1_craft_cam.html#a8366e9d8e9bb3b048d1dd14af2f76311" title="Call this from your app&#39;s OnMouseMove() or On*MouseDrag() method. Use OnMouseMove() if you want to al...">OnMouseMove()</a> or On*MouseDrag() method. Use <a class="el" href="classmingfx_1_1_craft_cam.html#a8366e9d8e9bb3b048d1dd14af2f76311" title="Call this from your app&#39;s OnMouseMove() or On*MouseDrag() method. Use OnMouseMove() if you want to al...">OnMouseMove()</a> if you want to always rotate the view with the mouse. Remember to convert the mouse coordinates (usually reported by window managers in pixels) into normalized device coordinates: </p>
+<div class="fragment"><div class="line"><span class="keywordtype">void</span> MyGraphicsApp::OnMouseMove(<span class="keyword">const</span> Point2 &amp;pos, <span class="keyword">const</span> Vector2 &amp;delta) {</div>
+<div class="line"> Vector2 delta_ndc = PixelsToNormalizedDeviceCoords(pos);</div>
+<div class="line"> cam_.OnMouseMove(delta_ndc);</div>
+<div class="line">}</div>
+</div><!-- fragment --><p> Alternatively, if you want to only rotate the view when the mouse button is held down, use On*MouseDrag() instead: </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> MyGraphicsApp::OnLeftMouseDrag(<span class="keyword">const</span> Point2 &amp;pos, <span class="keyword">const</span> Vector2 &amp;delta) {</div>
+<div class="line"> Vector2 delta_ndc = PixelsToNormalizedDeviceCoords(pos);</div>
+<div class="line"> cam_.OnMouseMove(delta_ndc);</div>
+<div class="line">}</div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a9fe22cc3b933b12674a5b8f1b5c834ac"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a9fe22cc3b933b12674a5b8f1b5c834ac">&#9670;&nbsp;</a></span>rotation_scale()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">float mingfx::CraftCam::rotation_scale </td>
+ <td>(</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>This is the scale factor used to speed up / slow down left/right rotation when walking for the LEFT / RIGHT keys. It defaults to 1.0, smaller values will make the camera turn slower, larger values will speed it up. </p>
+
+</div>
+</div>
+<a id="a15092ae5de6920546e3ce79aeb196f44"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a15092ae5de6920546e3ce79aeb196f44">&#9670;&nbsp;</a></span>set_look_scale()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void mingfx::CraftCam::set_look_scale </td>
+ <td>(</td>
+ <td class="paramtype">float&#160;</td>
+ <td class="paramname"><em>s</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>This is the scale factor used to speed up / slow down looking around when moving the head with the mouse. It defaults to 1.0, smaller values will make the camera turn slower, larger values will speed it up. </p>
+
+</div>
+</div>
+<a id="a352f5a42f6e88d2e599bd5acb42e5831"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a352f5a42f6e88d2e599bd5acb42e5831">&#9670;&nbsp;</a></span>set_rotation_scale()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void mingfx::CraftCam::set_rotation_scale </td>
+ <td>(</td>
+ <td class="paramtype">float&#160;</td>
+ <td class="paramname"><em>s</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>This is the scale factor used to speed up / slow down left/right rotation when walking for the LEFT / RIGHT keys. It defaults to 1.0, smaller values will make the camera turn slower, larger values will speed it up. </p>
+
+</div>
+</div>
+<a id="a151fde09d08001ee2a615f25ec1acea7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a151fde09d08001ee2a615f25ec1acea7">&#9670;&nbsp;</a></span>set_translation_scale()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void mingfx::CraftCam::set_translation_scale </td>
+ <td>(</td>
+ <td class="paramtype">float&#160;</td>
+ <td class="paramname"><em>s</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>This is the scale factor used to speed up / slow down forward/backward translation when walking for the UP / DOWN keys. It defaults to 1.0, smaller values will make the camera walk slower, larger values will speed it up. </p>
+
+</div>
+</div>
+<a id="a79a194be8675a0a968f14fe3dcd79da8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a79a194be8675a0a968f14fe3dcd79da8">&#9670;&nbsp;</a></span>set_view_matrix()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void mingfx::CraftCam::set_view_matrix </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="classmingfx_1_1_matrix4.html">Matrix4</a>&#160;</td>
+ <td class="paramname"><em>view_matrix</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>This is not required, but you may use this if you wish to set an initial view matrix or reset the view matrix. </p>
+
+</div>
+</div>
+<a id="a93567af7acbae2939d57cfd8a72bcef2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a93567af7acbae2939d57cfd8a72bcef2">&#9670;&nbsp;</a></span>translation_scale()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">float mingfx::CraftCam::translation_scale </td>
+ <td>(</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>This is the scale factor used to speed up / slow down forward/backward translation when walking for the UP / DOWN keys. It defaults to 1.0, smaller values will make the camera walk slower, larger values will speed it up. </p>
+
+</div>
+</div>
+<a id="ae3d9c7ea9307dbbadaa4b6e2f9933a7b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae3d9c7ea9307dbbadaa4b6e2f9933a7b">&#9670;&nbsp;</a></span>UpdateHeight()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void mingfx::CraftCam::UpdateHeight </td>
+ <td>(</td>
+ <td class="paramtype">float&#160;</td>
+ <td class="paramname"><em>new_y_value</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Sets the y value of the camera (i.e., the height). If you want to set the entire view matrix, then use <a class="el" href="classmingfx_1_1_craft_cam.html#a79a194be8675a0a968f14fe3dcd79da8" title="This is not required, but you may use this if you wish to set an initial view matrix or reset the vie...">set_view_matrix()</a>, but if you just want to update the height, e.g., while walking around a bumpy terrain, then use this. </p>
+
+</div>
+</div>
+<a id="a2b7808e489933b117583cf709fa46bc7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2b7808e489933b117583cf709fa46bc7">&#9670;&nbsp;</a></span>UpdateSimulation()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void mingfx::CraftCam::UpdateSimulation </td>
+ <td>(</td>
+ <td class="paramtype">double&#160;</td>
+ <td class="paramname"><em>dt</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">GLFWwindow *&#160;</td>
+ <td class="paramname"><em>window_ptr</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Call this from your app's <a class="el" href="classmingfx_1_1_craft_cam.html#a2b7808e489933b117583cf709fa46bc7" title="Call this from your app&#39;s UpdateSimulation() method. This tells the camera to simulate walking based ...">UpdateSimulation()</a> method. This tells the camera to simulate walking based on the keyboard keys currently pressed. You need to pass a pointer to the underlying GLFW window created by <a class="el" href="classmingfx_1_1_graphics_app.html" title="This is the main application base class for the MinGfx Toolkit.">GraphicsApp</a>. Example: </p>
+<div class="fragment"><div class="line"><span class="keywordtype">void</span> MyGraphicsApp::UpdateSimulation(<span class="keywordtype">double</span> dt) {</div>
+<div class="line"> cam_.UpdateSimulation(dt, window());</div>
+<div class="line">}</div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="acccdadc08d8d8a0b7b9426f18209ff36"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#acccdadc08d8d8a0b7b9426f18209ff36">&#9670;&nbsp;</a></span>view_matrix()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classmingfx_1_1_matrix4.html">Matrix4</a> mingfx::CraftCam::view_matrix </td>
+ <td>(</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Access the camera view matrix created by the <a class="el" href="classmingfx_1_1_craft_cam.html" title="This implements a user interface for controlling the camera with the mouse.">CraftCam</a> interactions via this method and use it to draw the geometry in your scence. For example, within <a class="el" href="classmingfx_1_1_graphics_app.html#a5a858fd10651f7617491f37b49dbf8ca" title="Override this to draw graphics using raw OpenGL 2D or 3D graphics calls.">GraphicsApp::DrawUsingOpenGL()</a>, you might have: </p>
+<div class="fragment"><div class="line">Matrix4 P = <a class="code" href="classmingfx_1_1_matrix4.html#a0e34aee86758a0397074590b87712c5e">Matrix4::Perspective</a>(30, aspect_ratio(), 1, 20);</div>
+<div class="line">Matrix4 V = cam.view_matrix();</div>
+<div class="line">Matrix4 M = Matrix4::RotateY(<a class="code" href="classmingfx_1_1_gfx_math.html#a1336de2695bc3bb750b23fb0ea211637">GfxMath::ToRadians</a>(45.0));</div>
+<div class="line">quick_shapes.DrawCube(M, V, P, Color(1,1,1));</div>
+<div class="ttc" id="aclassmingfx_1_1_gfx_math_html_a1336de2695bc3bb750b23fb0ea211637"><div class="ttname"><a href="classmingfx_1_1_gfx_math.html#a1336de2695bc3bb750b23fb0ea211637">mingfx::GfxMath::ToRadians</a></div><div class="ttdeci">static float ToRadians(float degrees)</div></div>
+<div class="ttc" id="aclassmingfx_1_1_matrix4_html_a0e34aee86758a0397074590b87712c5e"><div class="ttname"><a href="classmingfx_1_1_matrix4.html#a0e34aee86758a0397074590b87712c5e">mingfx::Matrix4::Perspective</a></div><div class="ttdeci">static Matrix4 Perspective(float fov_y_in_degrees, float aspect_ratio, float near_plane_dist, float far_plane_dist)</div><div class="ttdoc">Returns a perspective projection matrix equivalent to the one gluPerspective creates.</div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following file:<ul>
+<li>src/<a class="el" href="craft__cam_8h_source.html">craft_cam.h</a></li>
+</ul>
+</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>