aboutsummaryrefslogtreecommitdiffstats
path: root/dev/MinGfx/docs/html/mesh_8h_source.html
diff options
context:
space:
mode:
Diffstat (limited to 'dev/MinGfx/docs/html/mesh_8h_source.html')
-rw-r--r--dev/MinGfx/docs/html/mesh_8h_source.html586
1 files changed, 293 insertions, 293 deletions
diff --git a/dev/MinGfx/docs/html/mesh_8h_source.html b/dev/MinGfx/docs/html/mesh_8h_source.html
index fee9a22..86eb3be 100644
--- a/dev/MinGfx/docs/html/mesh_8h_source.html
+++ b/dev/MinGfx/docs/html/mesh_8h_source.html
@@ -1,293 +1,293 @@
-<!-- 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/mesh.h Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="jquery.js"></script>
-<script type="text/javascript" src="dynsections.js"></script>
-<link href="search/search.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="search/searchdata.js"></script>
-<script type="text/javascript" src="search/search.js"></script>
-<script type="text/x-mathjax-config">
- MathJax.Hub.Config({
- extensions: ["tex2jax.js"],
- jax: ["input/TeX","output/HTML-CSS"],
-});
-</script>
-<script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
-<div id="titlearea">
-<table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td style="padding-left: 0.5em;">
- <div id="projectname">MinGfx Toolkit
- &#160;<span id="projectnumber">1.0</span>
- </div>
- <div id="projectbrief">A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.</div>
- </td>
- </tr>
- </tbody>
-</table>
-</div>
-<!-- end header part -->
-<!-- Generated by Doxygen 1.9.1 -->
-<script type="text/javascript">
-/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
-var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
-/* @license-end */
-</script>
-<script type="text/javascript" src="menudata.js"></script>
-<script type="text/javascript" src="menu.js"></script>
-<script type="text/javascript">
-/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
-$(function() {
- initMenu('',true,false,'search.php','Search');
- $(document).ready(function() { init_search(); });
-});
-/* @license-end */</script>
-<div id="main-nav"></div>
-<!-- window showing the filter options -->
-<div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
-</div>
-
-<!-- iframe showing the search results (closed by default) -->
-<div id="MSearchResultsWindow">
-<iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
-</iframe>
-</div>
-
-<div id="nav-path" class="navpath">
- <ul>
-<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
-</div>
-</div><!-- top -->
-<div class="header">
- <div class="headertitle">
-<div class="title">mesh.h</div> </div>
-</div><!--header-->
-<div class="contents">
-<a href="mesh_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
-<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> This file is part of the MinGfx Project.</span></div>
-<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> </span></div>
-<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> Copyright (c) 2017,2018 Regents of the University of Minnesota.</span></div>
-<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> All Rights Reserved.</span></div>
-<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> </span></div>
-<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> Original Author(s) of this File:</span></div>
-<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> Dan Keefe, 2018, University of Minnesota</span></div>
-<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> </span></div>
-<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> Author(s) of Significant Updates/Modifications to the File:</span></div>
-<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> ...</span></div>
-<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> */</span></div>
-<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160; </div>
-<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="preprocessor">#ifndef SRC_MESH_H_</span></div>
-<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="preprocessor">#define SRC_MESH_H_</span></div>
-<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160; </div>
-<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160; </div>
-<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160; </div>
-<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="bvh_8h.html">bvh.h</a>&quot;</span></div>
-<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="color_8h.html">color.h</a>&quot;</span></div>
-<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="opengl__headers_8h.html">opengl_headers.h</a>&quot;</span></div>
-<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="point2_8h.html">point2.h</a>&quot;</span></div>
-<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="point3_8h.html">point3.h</a>&quot;</span></div>
-<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="vector3_8h.html">vector3.h</a>&quot;</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; </div>
-<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
-<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; </div>
-<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; </div>
-<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacemingfx.html">mingfx</a> {</div>
-<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; </div>
-<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="keyword">class </span>Matrix4;</div>
-<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; </div>
-<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html"> 127</a></span>&#160;<span class="keyword">class </span><a class="code" href="classmingfx_1_1_mesh.html">Mesh</a> {</div>
-<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;<span class="keyword">public</span>:</div>
-<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a69613870d54989f4226e50caf4ca9fb9"> 130</a></span>&#160; <a class="code" href="classmingfx_1_1_mesh.html#a69613870d54989f4226e50caf4ca9fb9">Mesh</a>();</div>
-<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; </div>
-<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a76b4977f0a7f156aa8a0027f10dcbdc1"> 133</a></span>&#160; <a class="code" href="classmingfx_1_1_mesh.html#a76b4977f0a7f156aa8a0027f10dcbdc1">Mesh</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_mesh.html">Mesh</a> &amp;other);</div>
-<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; </div>
-<div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ace7b23730dbcb581c4886cf2b9998327"> 135</a></span>&#160; <span class="keyword">virtual</span> <a class="code" href="classmingfx_1_1_mesh.html#ace7b23730dbcb581c4886cf2b9998327">~Mesh</a>();</div>
-<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; </div>
-<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; </div>
-<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a8d05faf18ef8d170fc3c2a343075823f"> 142</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a8d05faf18ef8d170fc3c2a343075823f">LoadFromOBJ</a>(<span class="keyword">const</span> std::string &amp;filename);</div>
-<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; </div>
-<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; </div>
-<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; </div>
-<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="comment">// ---- TRIANGLE LIST MODE ----</span></div>
-<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="comment">// No indices are stored, each set of 3 vertices forms a triangle, and if the</span></div>
-<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="comment">// triangles share vertices, those vertices need to be repeated.</span></div>
-<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; </div>
-<div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a29eeb2e778704350789033ec4940d55a"> 155</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="classmingfx_1_1_mesh.html#a29eeb2e778704350789033ec4940d55a">AddTriangle</a>(<a class="code" href="classmingfx_1_1_point3.html">Point3</a> v1, <a class="code" href="classmingfx_1_1_point3.html">Point3</a> v2, <a class="code" href="classmingfx_1_1_point3.html">Point3</a> v3);</div>
-<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; </div>
-<div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a3e0ac86714f6b7c3f62761ef3952a044"> 159</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a3e0ac86714f6b7c3f62761ef3952a044">UpdateTriangle</a>(<span class="keywordtype">int</span> triangle_id, <a class="code" href="classmingfx_1_1_point3.html">Point3</a> v1, <a class="code" href="classmingfx_1_1_point3.html">Point3</a> v2, <a class="code" href="classmingfx_1_1_point3.html">Point3</a> v3);</div>
-<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; </div>
-<div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a43d5a5cc3ef742a8c2b5e3f1b4da0903"> 163</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a43d5a5cc3ef742a8c2b5e3f1b4da0903">SetNormals</a>(<span class="keywordtype">int</span> triangle_id, <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> n1, <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> n2, <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> n3);</div>
-<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; </div>
-<div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a0f59e19b74f4f9dc2ad580756f8b319f"> 167</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a0f59e19b74f4f9dc2ad580756f8b319f">SetColors</a>(<span class="keywordtype">int</span> triangle_id, <a class="code" href="classmingfx_1_1_color.html">Color</a> c1, <a class="code" href="classmingfx_1_1_color.html">Color</a> c2, <a class="code" href="classmingfx_1_1_color.html">Color</a> c3);</div>
-<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; </div>
-<div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a17cb896939007357014c74a1ece6f1f3"> 172</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a17cb896939007357014c74a1ece6f1f3">SetTexCoords</a>(<span class="keywordtype">int</span> triangle_id, <span class="keywordtype">int</span> texture_unit, <a class="code" href="classmingfx_1_1_point2.html">Point2</a> uv1, <a class="code" href="classmingfx_1_1_point2.html">Point2</a> uv2, <a class="code" href="classmingfx_1_1_point2.html">Point2</a> uv3);</div>
-<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; </div>
-<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; </div>
-<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; </div>
-<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <span class="comment">// ---- INDEXED TRIANGLES MODE ----</span></div>
-<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="comment">// Vertices are stored in an array and indices are stored in a separate array</span></div>
-<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <span class="comment">// each set of 3 indices into the vertex array defines one triangle. Here,</span></div>
-<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; <span class="comment">// you cannot add one triangle at a time to the mesh. Instead you must set</span></div>
-<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <span class="comment">// the arrays of indices, vertices, and other attributes for the mesh at</span></div>
-<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <span class="comment">// once.</span></div>
-<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; </div>
-<div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a1dd243b53826765ba468f505645102a6"> 184</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a1dd243b53826765ba468f505645102a6">SetVertices</a>(<span class="keyword">const</span> std::vector&lt;Point3&gt; &amp;verts);</div>
-<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; </div>
-<div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ad28dbd5b0ab77bec28f30f618dd9e57d"> 187</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#ad28dbd5b0ab77bec28f30f618dd9e57d">SetNormals</a>(<span class="keyword">const</span> std::vector&lt;Vector3&gt; &amp;norms);</div>
-<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; </div>
-<div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ab9b05a77591a9adad12032d513256dae"> 190</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#ab9b05a77591a9adad12032d513256dae">SetColors</a>(<span class="keyword">const</span> std::vector&lt;Color&gt; &amp;colors);</div>
-<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; </div>
-<div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#aba2dfd0ade2d8a728897d411ef3fdaf1"> 193</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#aba2dfd0ade2d8a728897d411ef3fdaf1">SetTexCoords</a>(<span class="keywordtype">int</span> texture_unit, <span class="keyword">const</span> std::vector&lt;Point2&gt; &amp;tex_coords);</div>
-<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; </div>
-<div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a1f94c9ca7867b65e04f7e02813a06581"> 198</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a1f94c9ca7867b65e04f7e02813a06581">SetIndices</a>(<span class="keyword">const</span> std::vector&lt;unsigned int&gt; index_array);</div>
-<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; </div>
-<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; </div>
-<div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a7175238f5874929e2258458b98421d87"> 201</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a7175238f5874929e2258458b98421d87">SetInstanceTransforms</a>(<span class="keyword">const</span> std::vector&lt;Matrix4&gt; &amp;xforms);</div>
-<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; </div>
-<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; </div>
-<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <span class="comment">// ---- These functions can be used instead of the above if you are working with</span></div>
-<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <span class="comment">// regular C-style arrays and floats rather than the higher level types like</span></div>
-<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; <span class="comment">// Point3 and Vector3. ----</span></div>
-<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; </div>
-<div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a033076b9bf1714c9b9e0eeef11ebcd49"> 211</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a033076b9bf1714c9b9e0eeef11ebcd49">SetVertices</a>(<span class="keywordtype">float</span> *verts_array, <span class="keywordtype">int</span> num_verts);</div>
-<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; </div>
-<div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a6ab1128fab6f969564d3a1329baeade6"> 217</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a6ab1128fab6f969564d3a1329baeade6">SetNormals</a>(<span class="keywordtype">float</span> *norms_array, <span class="keywordtype">int</span> num_norms);</div>
-<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; </div>
-<div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#aed172bdd77858f3b59978cb8527e19ae"> 223</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#aed172bdd77858f3b59978cb8527e19ae">SetColors</a>(<span class="keywordtype">float</span> *colors_array, <span class="keywordtype">int</span> num_colors);</div>
-<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; </div>
-<div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ac9cd4e8d67bb70295a48fcbc72ae32f9"> 229</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#ac9cd4e8d67bb70295a48fcbc72ae32f9">SetTexCoords</a>(<span class="keywordtype">int</span> texture_unit, <span class="keywordtype">float</span> *tex_coords_array, <span class="keywordtype">int</span> num_tex_coords);</div>
-<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; </div>
-<div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a84711746b8d37c8d9b12ae748a4c5b8c"> 235</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a84711746b8d37c8d9b12ae748a4c5b8c">SetIndices</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *index_array, <span class="keywordtype">int</span> num_indices);</div>
-<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; </div>
-<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; </div>
-<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; </div>
-<div class="line"><a name="l00246"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ac74345bf4b2994de4ee1c509bcc6840e"> 246</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#ac74345bf4b2994de4ee1c509bcc6840e">UpdateGPUMemory</a>();</div>
-<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; </div>
-<div class="line"><a name="l00252"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a75075d472938fd760477be42585aff5c"> 252</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a75075d472938fd760477be42585aff5c">Draw</a>();</div>
-<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; </div>
-<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; </div>
-<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; </div>
-<div class="line"><a name="l00262"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a1a5cea9cfdf4c672ba0c781ee54718f7"> 262</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a1a5cea9cfdf4c672ba0c781ee54718f7">CalcPerFaceNormals</a>();</div>
-<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; </div>
-<div class="line"><a name="l00270"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#acc7df547b0a2175287cc9f509c04e93c"> 270</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#acc7df547b0a2175287cc9f509c04e93c">CalcPerVertexNormals</a>();</div>
-<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; </div>
-<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; </div>
-<div class="line"><a name="l00276"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a8d96c1b5985cd836f2aa2b2994af64c1"> 276</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a8d96c1b5985cd836f2aa2b2994af64c1">BuildBVH</a>();</div>
-<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; </div>
-<div class="line"><a name="l00282"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a978b1341d5613d399a68e40c61c57ba4"> 282</a></span>&#160; <a class="code" href="classmingfx_1_1_b_v_h.html">BVH</a>* <a class="code" href="classmingfx_1_1_mesh.html#a978b1341d5613d399a68e40c61c57ba4">bvh_ptr</a>();</div>
-<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; </div>
-<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; <span class="comment">// Access to properties indexed by vertex number</span></div>
-<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; </div>
-<div class="line"><a name="l00287"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ab8f6856429466f1b4600a6ec27b84d0d"> 287</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="classmingfx_1_1_mesh.html#ab8f6856429466f1b4600a6ec27b84d0d">num_vertices</a>() <span class="keyword">const</span>;</div>
-<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; </div>
-<div class="line"><a name="l00291"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ada9371e85aa0b61df79b26fc880b1863"> 291</a></span>&#160; <a class="code" href="classmingfx_1_1_point3.html">Point3</a> <a class="code" href="classmingfx_1_1_mesh.html#ada9371e85aa0b61df79b26fc880b1863">read_vertex_data</a>(<span class="keywordtype">int</span> vertex_id) <span class="keyword">const</span>;</div>
-<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; </div>
-<div class="line"><a name="l00295"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a439361e454ca63c35f564aed5cd0de65"> 295</a></span>&#160; <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> <a class="code" href="classmingfx_1_1_mesh.html#a439361e454ca63c35f564aed5cd0de65">read_normal_data</a>(<span class="keywordtype">int</span> vertex_id) <span class="keyword">const</span>;</div>
-<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; </div>
-<div class="line"><a name="l00299"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ac5fc517fd8ea4cea8459d3f4d5d6ced3"> 299</a></span>&#160; <a class="code" href="classmingfx_1_1_color.html">Color</a> <a class="code" href="classmingfx_1_1_mesh.html#ac5fc517fd8ea4cea8459d3f4d5d6ced3">read_color_data</a>(<span class="keywordtype">int</span> vertex_id) <span class="keyword">const</span>;</div>
-<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; </div>
-<div class="line"><a name="l00303"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a51aaa8d6a80af46f22ea9dfecd2f0b31"> 303</a></span>&#160; <a class="code" href="classmingfx_1_1_point2.html">Point2</a> <a class="code" href="classmingfx_1_1_mesh.html#a51aaa8d6a80af46f22ea9dfecd2f0b31">read_tex_coords_data</a>(<span class="keywordtype">int</span> texture_unit, <span class="keywordtype">int</span> vertex_id) <span class="keyword">const</span>;</div>
-<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; </div>
-<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; </div>
-<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; <span class="comment">// Access to triangles</span></div>
-<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; </div>
-<div class="line"><a name="l00309"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ab3f3779506e15e3888ccbb8b9b572b8f"> 309</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="classmingfx_1_1_mesh.html#ab3f3779506e15e3888ccbb8b9b572b8f">num_triangles</a>() <span class="keyword">const</span>;</div>
-<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; </div>
-<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; <span class="comment">// of unsigned ints. Use the SetIndices() function to set (or edit) the indices for the mesh.</span></div>
-<div class="line"><a name="l00313"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a15d79cbc48a6ef72ef1208d734cc2f8a"> 313</a></span>&#160; std::vector&lt;unsigned int&gt; <a class="code" href="classmingfx_1_1_mesh.html#a15d79cbc48a6ef72ef1208d734cc2f8a">read_triangle_indices_data</a>(<span class="keywordtype">int</span> triangle_id) <span class="keyword">const</span>;</div>
-<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; </div>
-<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; </div>
-<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160;<span class="keyword">private</span>:</div>
-<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160; std::vector&lt;float&gt; verts_;</div>
-<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; std::vector&lt;float&gt; norms_;</div>
-<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160; std::vector&lt;float&gt; colors_;</div>
-<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; std::vector&lt; std::vector&lt;float&gt; &gt; tex_coords_;</div>
-<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160; std::vector&lt;unsigned int&gt; indices_;</div>
-<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; std::vector&lt;float&gt; instance_xforms_;</div>
-<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160; </div>
-<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160; <span class="keywordtype">bool</span> gpu_dirty_;</div>
-<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160; GLuint vertex_buffer_;</div>
-<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160; GLuint vertex_array_;</div>
-<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160; GLuint element_buffer_;</div>
-<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160; </div>
-<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160; <span class="keywordtype">bool</span> bvh_dirty_;</div>
-<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160; <a class="code" href="classmingfx_1_1_b_v_h.html">BVH</a> bvh_;</div>
-<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160;};</div>
-<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160; </div>
-<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160; </div>
-<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160;} <span class="comment">// end namespace</span></div>
-<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160; </div>
-<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160; </div>
-<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160;<span class="preprocessor">#endif</span></div>
-<div class="ttc" id="abvh_8h_html"><div class="ttname"><a href="bvh_8h.html">bvh.h</a></div></div>
-<div class="ttc" id="aclassmingfx_1_1_b_v_h_html"><div class="ttname"><a href="classmingfx_1_1_b_v_h.html">mingfx::BVH</a></div><div class="ttdoc">A Bounding Volume Hierarchy (BVH) data structure that can be used to accelerate ray-object intersecti...</div><div class="ttdef"><b>Definition:</b> <a href="bvh_8h_source.html#l00040">bvh.h:40</a></div></div>
-<div class="ttc" id="aclassmingfx_1_1_color_html"><div class="ttname"><a href="classmingfx_1_1_color.html">mingfx::Color</a></div><div class="ttdoc">Represents a 4-component (R,G,B,A) color, stored internally in a float array to be compatable with Op...</div><div class="ttdef"><b>Definition:</b> <a href="color_8h_source.html#l00041">color.h:41</a></div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html"><div class="ttname"><a href="classmingfx_1_1_mesh.html">mingfx::Mesh</a></div><div class="ttdoc">A triangle mesh data structure that can be rendered with a ShaderProgram like DefaultShader.</div><div class="ttdef"><b>Definition:</b> <a href="mesh_8h_source.html#l00127">mesh.h:127</a></div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a033076b9bf1714c9b9e0eeef11ebcd49"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a033076b9bf1714c9b9e0eeef11ebcd49">mingfx::Mesh::SetVertices</a></div><div class="ttdeci">void SetVertices(float *verts_array, int num_verts)</div><div class="ttdoc">Sets the vertex array for the mesh directly. Vertices are stored as (x,y,z), (x,y,...</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a0f59e19b74f4f9dc2ad580756f8b319f"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a0f59e19b74f4f9dc2ad580756f8b319f">mingfx::Mesh::SetColors</a></div><div class="ttdeci">void SetColors(int triangle_id, Color c1, Color c2, Color c3)</div><div class="ttdoc">Sets per-vertex colors for the three vertices of a triangle that has already been added to the mesh.</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a15d79cbc48a6ef72ef1208d734cc2f8a"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a15d79cbc48a6ef72ef1208d734cc2f8a">mingfx::Mesh::read_triangle_indices_data</a></div><div class="ttdeci">std::vector&lt; unsigned int &gt; read_triangle_indices_data(int triangle_id) const</div><div class="ttdoc">Read only access to the indices that make up a particular triangle. Data are returned as a 3-element ...</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a17cb896939007357014c74a1ece6f1f3"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a17cb896939007357014c74a1ece6f1f3">mingfx::Mesh::SetTexCoords</a></div><div class="ttdeci">void SetTexCoords(int triangle_id, int texture_unit, Point2 uv1, Point2 uv2, Point2 uv3)</div><div class="ttdoc">Sets the texture coordinates for the three vertices of a triangle that has already been added to the ...</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a1a5cea9cfdf4c672ba0c781ee54718f7"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a1a5cea9cfdf4c672ba0c781ee54718f7">mingfx::Mesh::CalcPerFaceNormals</a></div><div class="ttdeci">void CalcPerFaceNormals()</div><div class="ttdoc">This (re)calculates the normals for the mesh and stores them with the mesh data structure.</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a1dd243b53826765ba468f505645102a6"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a1dd243b53826765ba468f505645102a6">mingfx::Mesh::SetVertices</a></div><div class="ttdeci">void SetVertices(const std::vector&lt; Point3 &gt; &amp;verts)</div><div class="ttdoc">Sets the vertex array for the mesh directly.</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a1f94c9ca7867b65e04f7e02813a06581"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a1f94c9ca7867b65e04f7e02813a06581">mingfx::Mesh::SetIndices</a></div><div class="ttdeci">void SetIndices(const std::vector&lt; unsigned int &gt; index_array)</div><div class="ttdoc">Sets the indices into the vertex array to use to create the triangles. Each consecutive set of 3 indi...</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a29eeb2e778704350789033ec4940d55a"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a29eeb2e778704350789033ec4940d55a">mingfx::Mesh::AddTriangle</a></div><div class="ttdeci">int AddTriangle(Point3 v1, Point3 v2, Point3 v3)</div><div class="ttdoc">Adds a triangle to the mesh datastructure and returns a triangle ID.</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a3e0ac86714f6b7c3f62761ef3952a044"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a3e0ac86714f6b7c3f62761ef3952a044">mingfx::Mesh::UpdateTriangle</a></div><div class="ttdeci">void UpdateTriangle(int triangle_id, Point3 v1, Point3 v2, Point3 v3)</div><div class="ttdoc">Updates the vertex positions for a triangle that has already been added to the mesh.</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a439361e454ca63c35f564aed5cd0de65"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a439361e454ca63c35f564aed5cd0de65">mingfx::Mesh::read_normal_data</a></div><div class="ttdeci">Vector3 read_normal_data(int vertex_id) const</div><div class="ttdoc">Read only access to per-vertex normal data. Data are returned as a Vector3. Indexed by vertex number....</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a43d5a5cc3ef742a8c2b5e3f1b4da0903"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a43d5a5cc3ef742a8c2b5e3f1b4da0903">mingfx::Mesh::SetNormals</a></div><div class="ttdeci">void SetNormals(int triangle_id, Vector3 n1, Vector3 n2, Vector3 n3)</div><div class="ttdoc">Sets the normals for the three vertices of a triangle that has already been added to the mesh.</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a51aaa8d6a80af46f22ea9dfecd2f0b31"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a51aaa8d6a80af46f22ea9dfecd2f0b31">mingfx::Mesh::read_tex_coords_data</a></div><div class="ttdeci">Point2 read_tex_coords_data(int texture_unit, int vertex_id) const</div><div class="ttdoc">Read only access to per-vertex texture coordinates data. Data are returned as a Point2....</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a69613870d54989f4226e50caf4ca9fb9"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a69613870d54989f4226e50caf4ca9fb9">mingfx::Mesh::Mesh</a></div><div class="ttdeci">Mesh()</div><div class="ttdoc">Creates an empty mesh.</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a6ab1128fab6f969564d3a1329baeade6"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a6ab1128fab6f969564d3a1329baeade6">mingfx::Mesh::SetNormals</a></div><div class="ttdeci">void SetNormals(float *norms_array, int num_norms)</div><div class="ttdoc">Sets the normal array for the mesh directly. Normals are stored as (x,y,z), (x,y,z),...</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a7175238f5874929e2258458b98421d87"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a7175238f5874929e2258458b98421d87">mingfx::Mesh::SetInstanceTransforms</a></div><div class="ttdeci">void SetInstanceTransforms(const std::vector&lt; Matrix4 &gt; &amp;xforms)</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a75075d472938fd760477be42585aff5c"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a75075d472938fd760477be42585aff5c">mingfx::Mesh::Draw</a></div><div class="ttdeci">void Draw()</div><div class="ttdoc">This sends the mesh vertices and attributes down the graphics pipe using glDrawArrays() for the non-i...</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a76b4977f0a7f156aa8a0027f10dcbdc1"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a76b4977f0a7f156aa8a0027f10dcbdc1">mingfx::Mesh::Mesh</a></div><div class="ttdeci">Mesh(const Mesh &amp;other)</div><div class="ttdoc">Copies all data and sets GPU dirty bit for the new mesh.</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a84711746b8d37c8d9b12ae748a4c5b8c"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a84711746b8d37c8d9b12ae748a4c5b8c">mingfx::Mesh::SetIndices</a></div><div class="ttdeci">void SetIndices(unsigned int *index_array, int num_indices)</div><div class="ttdoc">Sets the indices into the vertex array to use to create the triangles. Each consecutive set of 3 indi...</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a8d05faf18ef8d170fc3c2a343075823f"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a8d05faf18ef8d170fc3c2a343075823f">mingfx::Mesh::LoadFromOBJ</a></div><div class="ttdeci">void LoadFromOBJ(const std::string &amp;filename)</div><div class="ttdoc">This reads a mesh stored in the common Wavefront Obj file format.</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a8d96c1b5985cd836f2aa2b2994af64c1"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a8d96c1b5985cd836f2aa2b2994af64c1">mingfx::Mesh::BuildBVH</a></div><div class="ttdeci">void BuildBVH()</div><div class="ttdoc">This (re)calculates a Bounding Volume Hierarchy for the mesh, which can be used together with Ray::Fa...</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_a978b1341d5613d399a68e40c61c57ba4"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a978b1341d5613d399a68e40c61c57ba4">mingfx::Mesh::bvh_ptr</a></div><div class="ttdeci">BVH * bvh_ptr()</div><div class="ttdoc">Returns a pointer to the underlying BVH data structure.</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_ab3f3779506e15e3888ccbb8b9b572b8f"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ab3f3779506e15e3888ccbb8b9b572b8f">mingfx::Mesh::num_triangles</a></div><div class="ttdeci">int num_triangles() const</div><div class="ttdoc">The total number of triangles in the mesh.</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_ab8f6856429466f1b4600a6ec27b84d0d"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ab8f6856429466f1b4600a6ec27b84d0d">mingfx::Mesh::num_vertices</a></div><div class="ttdeci">int num_vertices() const</div><div class="ttdoc">The total number of vertices in the mesh.</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_ab9b05a77591a9adad12032d513256dae"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ab9b05a77591a9adad12032d513256dae">mingfx::Mesh::SetColors</a></div><div class="ttdeci">void SetColors(const std::vector&lt; Color &gt; &amp;colors)</div><div class="ttdoc">Sets the per-vertex colors array for the mesh directly.</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_aba2dfd0ade2d8a728897d411ef3fdaf1"><div class="ttname"><a href="classmingfx_1_1_mesh.html#aba2dfd0ade2d8a728897d411ef3fdaf1">mingfx::Mesh::SetTexCoords</a></div><div class="ttdeci">void SetTexCoords(int texture_unit, const std::vector&lt; Point2 &gt; &amp;tex_coords)</div><div class="ttdoc">Sets a texture coordinates array for the mesh directly.</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_ac5fc517fd8ea4cea8459d3f4d5d6ced3"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ac5fc517fd8ea4cea8459d3f4d5d6ced3">mingfx::Mesh::read_color_data</a></div><div class="ttdeci">Color read_color_data(int vertex_id) const</div><div class="ttdoc">Read only access to per-vertex color data. Data are returned as a Color. Indexed by vertex number....</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_ac74345bf4b2994de4ee1c509bcc6840e"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ac74345bf4b2994de4ee1c509bcc6840e">mingfx::Mesh::UpdateGPUMemory</a></div><div class="ttdeci">void UpdateGPUMemory()</div><div class="ttdoc">This copies the entire mesh data structure to a vertex array in GPU memory, which must happen before ...</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_ac9cd4e8d67bb70295a48fcbc72ae32f9"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ac9cd4e8d67bb70295a48fcbc72ae32f9">mingfx::Mesh::SetTexCoords</a></div><div class="ttdeci">void SetTexCoords(int texture_unit, float *tex_coords_array, int num_tex_coords)</div><div class="ttdoc">Sets a texture coordinates array for the mesh directly. Tex coords are stored as (u,...</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_acc7df547b0a2175287cc9f509c04e93c"><div class="ttname"><a href="classmingfx_1_1_mesh.html#acc7df547b0a2175287cc9f509c04e93c">mingfx::Mesh::CalcPerVertexNormals</a></div><div class="ttdeci">void CalcPerVertexNormals()</div><div class="ttdoc">This (re)calculates the normals for the mesh and stores them with the mesh data structure.</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_ace7b23730dbcb581c4886cf2b9998327"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ace7b23730dbcb581c4886cf2b9998327">mingfx::Mesh::~Mesh</a></div><div class="ttdeci">virtual ~Mesh()</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_ad28dbd5b0ab77bec28f30f618dd9e57d"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ad28dbd5b0ab77bec28f30f618dd9e57d">mingfx::Mesh::SetNormals</a></div><div class="ttdeci">void SetNormals(const std::vector&lt; Vector3 &gt; &amp;norms)</div><div class="ttdoc">Sets the normal array for the mesh directly.</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_ada9371e85aa0b61df79b26fc880b1863"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ada9371e85aa0b61df79b26fc880b1863">mingfx::Mesh::read_vertex_data</a></div><div class="ttdeci">Point3 read_vertex_data(int vertex_id) const</div><div class="ttdoc">Read only access to the vertex position data. Data are returned as a Point3. Indexed by vertex number...</div></div>
-<div class="ttc" id="aclassmingfx_1_1_mesh_html_aed172bdd77858f3b59978cb8527e19ae"><div class="ttname"><a href="classmingfx_1_1_mesh.html#aed172bdd77858f3b59978cb8527e19ae">mingfx::Mesh::SetColors</a></div><div class="ttdeci">void SetColors(float *colors_array, int num_colors)</div><div class="ttdoc">Sets the per-vertex colors array for the mesh directly. Colors are stored as (r,g,...</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_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="acolor_8h_html"><div class="ttname"><a href="color_8h.html">color.h</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="aopengl__headers_8h_html"><div class="ttname"><a href="opengl__headers_8h.html">opengl_headers.h</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="avector3_8h_html"><div class="ttname"><a href="vector3_8h.html">vector3.h</a></div></div>
-</div><!-- fragment --></div><!-- contents -->
-<!-- HTML footer for doxygen 1.8.9.1-->
-<!-- start footer part -->
-<hr class="footer"/><address class="footer"><small>
-Generated by &#160;<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/>
-</a> 1.9.1
-</small></address>
-</body>
-</html>
+<!-- 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/mesh.h Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/x-mathjax-config">
+ MathJax.Hub.Config({
+ extensions: ["tex2jax.js"],
+ jax: ["input/TeX","output/HTML-CSS"],
+});
+</script>
+<script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td style="padding-left: 0.5em;">
+ <div id="projectname">MinGfx Toolkit
+ &#160;<span id="projectnumber">1.0</span>
+ </div>
+ <div id="projectbrief">A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.</div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.1 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
+var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+/* @license-end */</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">mesh.h</div> </div>
+</div><!--header-->
+<div class="contents">
+<a href="mesh_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
+<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> This file is part of the MinGfx Project.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> </span></div>
+<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> Copyright (c) 2017,2018 Regents of the University of Minnesota.</span></div>
+<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> All Rights Reserved.</span></div>
+<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> </span></div>
+<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> Original Author(s) of this File:</span></div>
+<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> Dan Keefe, 2018, University of Minnesota</span></div>
+<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> </span></div>
+<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> Author(s) of Significant Updates/Modifications to the File:</span></div>
+<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> ...</span></div>
+<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> */</span></div>
+<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160; </div>
+<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="preprocessor">#ifndef SRC_MESH_H_</span></div>
+<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="preprocessor">#define SRC_MESH_H_</span></div>
+<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160; </div>
+<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160; </div>
+<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160; </div>
+<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="bvh_8h.html">bvh.h</a>&quot;</span></div>
+<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="color_8h.html">color.h</a>&quot;</span></div>
+<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="opengl__headers_8h.html">opengl_headers.h</a>&quot;</span></div>
+<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="point2_8h.html">point2.h</a>&quot;</span></div>
+<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="point3_8h.html">point3.h</a>&quot;</span></div>
+<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="vector3_8h.html">vector3.h</a>&quot;</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; </div>
+<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
+<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; </div>
+<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; </div>
+<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacemingfx.html">mingfx</a> {</div>
+<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; </div>
+<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="keyword">class </span>Matrix4;</div>
+<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; </div>
+<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html"> 127</a></span>&#160;<span class="keyword">class </span><a class="code" href="classmingfx_1_1_mesh.html">Mesh</a> {</div>
+<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;<span class="keyword">public</span>:</div>
+<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a69613870d54989f4226e50caf4ca9fb9"> 130</a></span>&#160; <a class="code" href="classmingfx_1_1_mesh.html#a69613870d54989f4226e50caf4ca9fb9">Mesh</a>();</div>
+<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; </div>
+<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a76b4977f0a7f156aa8a0027f10dcbdc1"> 133</a></span>&#160; <a class="code" href="classmingfx_1_1_mesh.html#a76b4977f0a7f156aa8a0027f10dcbdc1">Mesh</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_mesh.html">Mesh</a> &amp;other);</div>
+<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; </div>
+<div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ace7b23730dbcb581c4886cf2b9998327"> 135</a></span>&#160; <span class="keyword">virtual</span> <a class="code" href="classmingfx_1_1_mesh.html#ace7b23730dbcb581c4886cf2b9998327">~Mesh</a>();</div>
+<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; </div>
+<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; </div>
+<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a8d05faf18ef8d170fc3c2a343075823f"> 142</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a8d05faf18ef8d170fc3c2a343075823f">LoadFromOBJ</a>(<span class="keyword">const</span> std::string &amp;filename);</div>
+<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; </div>
+<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; </div>
+<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; </div>
+<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="comment">// ---- TRIANGLE LIST MODE ----</span></div>
+<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="comment">// No indices are stored, each set of 3 vertices forms a triangle, and if the</span></div>
+<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="comment">// triangles share vertices, those vertices need to be repeated.</span></div>
+<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; </div>
+<div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a29eeb2e778704350789033ec4940d55a"> 155</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="classmingfx_1_1_mesh.html#a29eeb2e778704350789033ec4940d55a">AddTriangle</a>(<a class="code" href="classmingfx_1_1_point3.html">Point3</a> v1, <a class="code" href="classmingfx_1_1_point3.html">Point3</a> v2, <a class="code" href="classmingfx_1_1_point3.html">Point3</a> v3);</div>
+<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; </div>
+<div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a3e0ac86714f6b7c3f62761ef3952a044"> 159</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a3e0ac86714f6b7c3f62761ef3952a044">UpdateTriangle</a>(<span class="keywordtype">int</span> triangle_id, <a class="code" href="classmingfx_1_1_point3.html">Point3</a> v1, <a class="code" href="classmingfx_1_1_point3.html">Point3</a> v2, <a class="code" href="classmingfx_1_1_point3.html">Point3</a> v3);</div>
+<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; </div>
+<div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a43d5a5cc3ef742a8c2b5e3f1b4da0903"> 163</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a43d5a5cc3ef742a8c2b5e3f1b4da0903">SetNormals</a>(<span class="keywordtype">int</span> triangle_id, <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> n1, <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> n2, <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> n3);</div>
+<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; </div>
+<div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a0f59e19b74f4f9dc2ad580756f8b319f"> 167</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a0f59e19b74f4f9dc2ad580756f8b319f">SetColors</a>(<span class="keywordtype">int</span> triangle_id, <a class="code" href="classmingfx_1_1_color.html">Color</a> c1, <a class="code" href="classmingfx_1_1_color.html">Color</a> c2, <a class="code" href="classmingfx_1_1_color.html">Color</a> c3);</div>
+<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; </div>
+<div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a17cb896939007357014c74a1ece6f1f3"> 172</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a17cb896939007357014c74a1ece6f1f3">SetTexCoords</a>(<span class="keywordtype">int</span> triangle_id, <span class="keywordtype">int</span> texture_unit, <a class="code" href="classmingfx_1_1_point2.html">Point2</a> uv1, <a class="code" href="classmingfx_1_1_point2.html">Point2</a> uv2, <a class="code" href="classmingfx_1_1_point2.html">Point2</a> uv3);</div>
+<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; </div>
+<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; </div>
+<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; </div>
+<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <span class="comment">// ---- INDEXED TRIANGLES MODE ----</span></div>
+<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="comment">// Vertices are stored in an array and indices are stored in a separate array</span></div>
+<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <span class="comment">// each set of 3 indices into the vertex array defines one triangle. Here,</span></div>
+<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; <span class="comment">// you cannot add one triangle at a time to the mesh. Instead you must set</span></div>
+<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <span class="comment">// the arrays of indices, vertices, and other attributes for the mesh at</span></div>
+<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <span class="comment">// once.</span></div>
+<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; </div>
+<div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a1dd243b53826765ba468f505645102a6"> 184</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a1dd243b53826765ba468f505645102a6">SetVertices</a>(<span class="keyword">const</span> std::vector&lt;Point3&gt; &amp;verts);</div>
+<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; </div>
+<div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ad28dbd5b0ab77bec28f30f618dd9e57d"> 187</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#ad28dbd5b0ab77bec28f30f618dd9e57d">SetNormals</a>(<span class="keyword">const</span> std::vector&lt;Vector3&gt; &amp;norms);</div>
+<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; </div>
+<div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ab9b05a77591a9adad12032d513256dae"> 190</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#ab9b05a77591a9adad12032d513256dae">SetColors</a>(<span class="keyword">const</span> std::vector&lt;Color&gt; &amp;colors);</div>
+<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; </div>
+<div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#aba2dfd0ade2d8a728897d411ef3fdaf1"> 193</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#aba2dfd0ade2d8a728897d411ef3fdaf1">SetTexCoords</a>(<span class="keywordtype">int</span> texture_unit, <span class="keyword">const</span> std::vector&lt;Point2&gt; &amp;tex_coords);</div>
+<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; </div>
+<div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a1f94c9ca7867b65e04f7e02813a06581"> 198</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a1f94c9ca7867b65e04f7e02813a06581">SetIndices</a>(<span class="keyword">const</span> std::vector&lt;unsigned int&gt; index_array);</div>
+<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; </div>
+<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; </div>
+<div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a7175238f5874929e2258458b98421d87"> 201</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a7175238f5874929e2258458b98421d87">SetInstanceTransforms</a>(<span class="keyword">const</span> std::vector&lt;Matrix4&gt; &amp;xforms);</div>
+<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; </div>
+<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; </div>
+<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <span class="comment">// ---- These functions can be used instead of the above if you are working with</span></div>
+<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <span class="comment">// regular C-style arrays and floats rather than the higher level types like</span></div>
+<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; <span class="comment">// Point3 and Vector3. ----</span></div>
+<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; </div>
+<div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a033076b9bf1714c9b9e0eeef11ebcd49"> 211</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a033076b9bf1714c9b9e0eeef11ebcd49">SetVertices</a>(<span class="keywordtype">float</span> *verts_array, <span class="keywordtype">int</span> num_verts);</div>
+<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; </div>
+<div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a6ab1128fab6f969564d3a1329baeade6"> 217</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a6ab1128fab6f969564d3a1329baeade6">SetNormals</a>(<span class="keywordtype">float</span> *norms_array, <span class="keywordtype">int</span> num_norms);</div>
+<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; </div>
+<div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#aed172bdd77858f3b59978cb8527e19ae"> 223</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#aed172bdd77858f3b59978cb8527e19ae">SetColors</a>(<span class="keywordtype">float</span> *colors_array, <span class="keywordtype">int</span> num_colors);</div>
+<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; </div>
+<div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ac9cd4e8d67bb70295a48fcbc72ae32f9"> 229</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#ac9cd4e8d67bb70295a48fcbc72ae32f9">SetTexCoords</a>(<span class="keywordtype">int</span> texture_unit, <span class="keywordtype">float</span> *tex_coords_array, <span class="keywordtype">int</span> num_tex_coords);</div>
+<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; </div>
+<div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a84711746b8d37c8d9b12ae748a4c5b8c"> 235</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a84711746b8d37c8d9b12ae748a4c5b8c">SetIndices</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *index_array, <span class="keywordtype">int</span> num_indices);</div>
+<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; </div>
+<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; </div>
+<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; </div>
+<div class="line"><a name="l00246"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ac74345bf4b2994de4ee1c509bcc6840e"> 246</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#ac74345bf4b2994de4ee1c509bcc6840e">UpdateGPUMemory</a>();</div>
+<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; </div>
+<div class="line"><a name="l00252"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a75075d472938fd760477be42585aff5c"> 252</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a75075d472938fd760477be42585aff5c">Draw</a>();</div>
+<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; </div>
+<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; </div>
+<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; </div>
+<div class="line"><a name="l00262"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a1a5cea9cfdf4c672ba0c781ee54718f7"> 262</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a1a5cea9cfdf4c672ba0c781ee54718f7">CalcPerFaceNormals</a>();</div>
+<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; </div>
+<div class="line"><a name="l00270"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#acc7df547b0a2175287cc9f509c04e93c"> 270</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#acc7df547b0a2175287cc9f509c04e93c">CalcPerVertexNormals</a>();</div>
+<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; </div>
+<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; </div>
+<div class="line"><a name="l00276"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a8d96c1b5985cd836f2aa2b2994af64c1"> 276</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_mesh.html#a8d96c1b5985cd836f2aa2b2994af64c1">BuildBVH</a>();</div>
+<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; </div>
+<div class="line"><a name="l00282"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a978b1341d5613d399a68e40c61c57ba4"> 282</a></span>&#160; <a class="code" href="classmingfx_1_1_b_v_h.html">BVH</a>* <a class="code" href="classmingfx_1_1_mesh.html#a978b1341d5613d399a68e40c61c57ba4">bvh_ptr</a>();</div>
+<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; </div>
+<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; <span class="comment">// Access to properties indexed by vertex number</span></div>
+<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; </div>
+<div class="line"><a name="l00287"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ab8f6856429466f1b4600a6ec27b84d0d"> 287</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="classmingfx_1_1_mesh.html#ab8f6856429466f1b4600a6ec27b84d0d">num_vertices</a>() <span class="keyword">const</span>;</div>
+<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; </div>
+<div class="line"><a name="l00291"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ada9371e85aa0b61df79b26fc880b1863"> 291</a></span>&#160; <a class="code" href="classmingfx_1_1_point3.html">Point3</a> <a class="code" href="classmingfx_1_1_mesh.html#ada9371e85aa0b61df79b26fc880b1863">read_vertex_data</a>(<span class="keywordtype">int</span> vertex_id) <span class="keyword">const</span>;</div>
+<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; </div>
+<div class="line"><a name="l00295"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a439361e454ca63c35f564aed5cd0de65"> 295</a></span>&#160; <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> <a class="code" href="classmingfx_1_1_mesh.html#a439361e454ca63c35f564aed5cd0de65">read_normal_data</a>(<span class="keywordtype">int</span> vertex_id) <span class="keyword">const</span>;</div>
+<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; </div>
+<div class="line"><a name="l00299"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ac5fc517fd8ea4cea8459d3f4d5d6ced3"> 299</a></span>&#160; <a class="code" href="classmingfx_1_1_color.html">Color</a> <a class="code" href="classmingfx_1_1_mesh.html#ac5fc517fd8ea4cea8459d3f4d5d6ced3">read_color_data</a>(<span class="keywordtype">int</span> vertex_id) <span class="keyword">const</span>;</div>
+<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; </div>
+<div class="line"><a name="l00303"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a51aaa8d6a80af46f22ea9dfecd2f0b31"> 303</a></span>&#160; <a class="code" href="classmingfx_1_1_point2.html">Point2</a> <a class="code" href="classmingfx_1_1_mesh.html#a51aaa8d6a80af46f22ea9dfecd2f0b31">read_tex_coords_data</a>(<span class="keywordtype">int</span> texture_unit, <span class="keywordtype">int</span> vertex_id) <span class="keyword">const</span>;</div>
+<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; </div>
+<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; </div>
+<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; <span class="comment">// Access to triangles</span></div>
+<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; </div>
+<div class="line"><a name="l00309"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#ab3f3779506e15e3888ccbb8b9b572b8f"> 309</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="classmingfx_1_1_mesh.html#ab3f3779506e15e3888ccbb8b9b572b8f">num_triangles</a>() <span class="keyword">const</span>;</div>
+<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; </div>
+<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; <span class="comment">// of unsigned ints. Use the SetIndices() function to set (or edit) the indices for the mesh.</span></div>
+<div class="line"><a name="l00313"></a><span class="lineno"><a class="line" href="classmingfx_1_1_mesh.html#a15d79cbc48a6ef72ef1208d734cc2f8a"> 313</a></span>&#160; std::vector&lt;unsigned int&gt; <a class="code" href="classmingfx_1_1_mesh.html#a15d79cbc48a6ef72ef1208d734cc2f8a">read_triangle_indices_data</a>(<span class="keywordtype">int</span> triangle_id) <span class="keyword">const</span>;</div>
+<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; </div>
+<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; </div>
+<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160;<span class="keyword">private</span>:</div>
+<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160; std::vector&lt;float&gt; verts_;</div>
+<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; std::vector&lt;float&gt; norms_;</div>
+<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160; std::vector&lt;float&gt; colors_;</div>
+<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; std::vector&lt; std::vector&lt;float&gt; &gt; tex_coords_;</div>
+<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160; std::vector&lt;unsigned int&gt; indices_;</div>
+<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; std::vector&lt;float&gt; instance_xforms_;</div>
+<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160; </div>
+<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160; <span class="keywordtype">bool</span> gpu_dirty_;</div>
+<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160; GLuint vertex_buffer_;</div>
+<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160; GLuint vertex_array_;</div>
+<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160; GLuint element_buffer_;</div>
+<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160; </div>
+<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160; <span class="keywordtype">bool</span> bvh_dirty_;</div>
+<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160; <a class="code" href="classmingfx_1_1_b_v_h.html">BVH</a> bvh_;</div>
+<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160;};</div>
+<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160; </div>
+<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160; </div>
+<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160;} <span class="comment">// end namespace</span></div>
+<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160; </div>
+<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160; </div>
+<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160;<span class="preprocessor">#endif</span></div>
+<div class="ttc" id="abvh_8h_html"><div class="ttname"><a href="bvh_8h.html">bvh.h</a></div></div>
+<div class="ttc" id="aclassmingfx_1_1_b_v_h_html"><div class="ttname"><a href="classmingfx_1_1_b_v_h.html">mingfx::BVH</a></div><div class="ttdoc">A Bounding Volume Hierarchy (BVH) data structure that can be used to accelerate ray-object intersecti...</div><div class="ttdef"><b>Definition:</b> <a href="bvh_8h_source.html#l00040">bvh.h:40</a></div></div>
+<div class="ttc" id="aclassmingfx_1_1_color_html"><div class="ttname"><a href="classmingfx_1_1_color.html">mingfx::Color</a></div><div class="ttdoc">Represents a 4-component (R,G,B,A) color, stored internally in a float array to be compatable with Op...</div><div class="ttdef"><b>Definition:</b> <a href="color_8h_source.html#l00041">color.h:41</a></div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html"><div class="ttname"><a href="classmingfx_1_1_mesh.html">mingfx::Mesh</a></div><div class="ttdoc">A triangle mesh data structure that can be rendered with a ShaderProgram like DefaultShader.</div><div class="ttdef"><b>Definition:</b> <a href="mesh_8h_source.html#l00127">mesh.h:127</a></div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a033076b9bf1714c9b9e0eeef11ebcd49"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a033076b9bf1714c9b9e0eeef11ebcd49">mingfx::Mesh::SetVertices</a></div><div class="ttdeci">void SetVertices(float *verts_array, int num_verts)</div><div class="ttdoc">Sets the vertex array for the mesh directly. Vertices are stored as (x,y,z), (x,y,...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a0f59e19b74f4f9dc2ad580756f8b319f"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a0f59e19b74f4f9dc2ad580756f8b319f">mingfx::Mesh::SetColors</a></div><div class="ttdeci">void SetColors(int triangle_id, Color c1, Color c2, Color c3)</div><div class="ttdoc">Sets per-vertex colors for the three vertices of a triangle that has already been added to the mesh.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a15d79cbc48a6ef72ef1208d734cc2f8a"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a15d79cbc48a6ef72ef1208d734cc2f8a">mingfx::Mesh::read_triangle_indices_data</a></div><div class="ttdeci">std::vector&lt; unsigned int &gt; read_triangle_indices_data(int triangle_id) const</div><div class="ttdoc">Read only access to the indices that make up a particular triangle. Data are returned as a 3-element ...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a17cb896939007357014c74a1ece6f1f3"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a17cb896939007357014c74a1ece6f1f3">mingfx::Mesh::SetTexCoords</a></div><div class="ttdeci">void SetTexCoords(int triangle_id, int texture_unit, Point2 uv1, Point2 uv2, Point2 uv3)</div><div class="ttdoc">Sets the texture coordinates for the three vertices of a triangle that has already been added to the ...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a1a5cea9cfdf4c672ba0c781ee54718f7"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a1a5cea9cfdf4c672ba0c781ee54718f7">mingfx::Mesh::CalcPerFaceNormals</a></div><div class="ttdeci">void CalcPerFaceNormals()</div><div class="ttdoc">This (re)calculates the normals for the mesh and stores them with the mesh data structure.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a1dd243b53826765ba468f505645102a6"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a1dd243b53826765ba468f505645102a6">mingfx::Mesh::SetVertices</a></div><div class="ttdeci">void SetVertices(const std::vector&lt; Point3 &gt; &amp;verts)</div><div class="ttdoc">Sets the vertex array for the mesh directly.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a1f94c9ca7867b65e04f7e02813a06581"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a1f94c9ca7867b65e04f7e02813a06581">mingfx::Mesh::SetIndices</a></div><div class="ttdeci">void SetIndices(const std::vector&lt; unsigned int &gt; index_array)</div><div class="ttdoc">Sets the indices into the vertex array to use to create the triangles. Each consecutive set of 3 indi...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a29eeb2e778704350789033ec4940d55a"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a29eeb2e778704350789033ec4940d55a">mingfx::Mesh::AddTriangle</a></div><div class="ttdeci">int AddTriangle(Point3 v1, Point3 v2, Point3 v3)</div><div class="ttdoc">Adds a triangle to the mesh datastructure and returns a triangle ID.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a3e0ac86714f6b7c3f62761ef3952a044"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a3e0ac86714f6b7c3f62761ef3952a044">mingfx::Mesh::UpdateTriangle</a></div><div class="ttdeci">void UpdateTriangle(int triangle_id, Point3 v1, Point3 v2, Point3 v3)</div><div class="ttdoc">Updates the vertex positions for a triangle that has already been added to the mesh.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a439361e454ca63c35f564aed5cd0de65"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a439361e454ca63c35f564aed5cd0de65">mingfx::Mesh::read_normal_data</a></div><div class="ttdeci">Vector3 read_normal_data(int vertex_id) const</div><div class="ttdoc">Read only access to per-vertex normal data. Data are returned as a Vector3. Indexed by vertex number....</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a43d5a5cc3ef742a8c2b5e3f1b4da0903"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a43d5a5cc3ef742a8c2b5e3f1b4da0903">mingfx::Mesh::SetNormals</a></div><div class="ttdeci">void SetNormals(int triangle_id, Vector3 n1, Vector3 n2, Vector3 n3)</div><div class="ttdoc">Sets the normals for the three vertices of a triangle that has already been added to the mesh.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a51aaa8d6a80af46f22ea9dfecd2f0b31"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a51aaa8d6a80af46f22ea9dfecd2f0b31">mingfx::Mesh::read_tex_coords_data</a></div><div class="ttdeci">Point2 read_tex_coords_data(int texture_unit, int vertex_id) const</div><div class="ttdoc">Read only access to per-vertex texture coordinates data. Data are returned as a Point2....</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a69613870d54989f4226e50caf4ca9fb9"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a69613870d54989f4226e50caf4ca9fb9">mingfx::Mesh::Mesh</a></div><div class="ttdeci">Mesh()</div><div class="ttdoc">Creates an empty mesh.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a6ab1128fab6f969564d3a1329baeade6"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a6ab1128fab6f969564d3a1329baeade6">mingfx::Mesh::SetNormals</a></div><div class="ttdeci">void SetNormals(float *norms_array, int num_norms)</div><div class="ttdoc">Sets the normal array for the mesh directly. Normals are stored as (x,y,z), (x,y,z),...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a7175238f5874929e2258458b98421d87"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a7175238f5874929e2258458b98421d87">mingfx::Mesh::SetInstanceTransforms</a></div><div class="ttdeci">void SetInstanceTransforms(const std::vector&lt; Matrix4 &gt; &amp;xforms)</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a75075d472938fd760477be42585aff5c"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a75075d472938fd760477be42585aff5c">mingfx::Mesh::Draw</a></div><div class="ttdeci">void Draw()</div><div class="ttdoc">This sends the mesh vertices and attributes down the graphics pipe using glDrawArrays() for the non-i...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a76b4977f0a7f156aa8a0027f10dcbdc1"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a76b4977f0a7f156aa8a0027f10dcbdc1">mingfx::Mesh::Mesh</a></div><div class="ttdeci">Mesh(const Mesh &amp;other)</div><div class="ttdoc">Copies all data and sets GPU dirty bit for the new mesh.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a84711746b8d37c8d9b12ae748a4c5b8c"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a84711746b8d37c8d9b12ae748a4c5b8c">mingfx::Mesh::SetIndices</a></div><div class="ttdeci">void SetIndices(unsigned int *index_array, int num_indices)</div><div class="ttdoc">Sets the indices into the vertex array to use to create the triangles. Each consecutive set of 3 indi...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a8d05faf18ef8d170fc3c2a343075823f"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a8d05faf18ef8d170fc3c2a343075823f">mingfx::Mesh::LoadFromOBJ</a></div><div class="ttdeci">void LoadFromOBJ(const std::string &amp;filename)</div><div class="ttdoc">This reads a mesh stored in the common Wavefront Obj file format.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a8d96c1b5985cd836f2aa2b2994af64c1"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a8d96c1b5985cd836f2aa2b2994af64c1">mingfx::Mesh::BuildBVH</a></div><div class="ttdeci">void BuildBVH()</div><div class="ttdoc">This (re)calculates a Bounding Volume Hierarchy for the mesh, which can be used together with Ray::Fa...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_a978b1341d5613d399a68e40c61c57ba4"><div class="ttname"><a href="classmingfx_1_1_mesh.html#a978b1341d5613d399a68e40c61c57ba4">mingfx::Mesh::bvh_ptr</a></div><div class="ttdeci">BVH * bvh_ptr()</div><div class="ttdoc">Returns a pointer to the underlying BVH data structure.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_ab3f3779506e15e3888ccbb8b9b572b8f"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ab3f3779506e15e3888ccbb8b9b572b8f">mingfx::Mesh::num_triangles</a></div><div class="ttdeci">int num_triangles() const</div><div class="ttdoc">The total number of triangles in the mesh.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_ab8f6856429466f1b4600a6ec27b84d0d"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ab8f6856429466f1b4600a6ec27b84d0d">mingfx::Mesh::num_vertices</a></div><div class="ttdeci">int num_vertices() const</div><div class="ttdoc">The total number of vertices in the mesh.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_ab9b05a77591a9adad12032d513256dae"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ab9b05a77591a9adad12032d513256dae">mingfx::Mesh::SetColors</a></div><div class="ttdeci">void SetColors(const std::vector&lt; Color &gt; &amp;colors)</div><div class="ttdoc">Sets the per-vertex colors array for the mesh directly.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_aba2dfd0ade2d8a728897d411ef3fdaf1"><div class="ttname"><a href="classmingfx_1_1_mesh.html#aba2dfd0ade2d8a728897d411ef3fdaf1">mingfx::Mesh::SetTexCoords</a></div><div class="ttdeci">void SetTexCoords(int texture_unit, const std::vector&lt; Point2 &gt; &amp;tex_coords)</div><div class="ttdoc">Sets a texture coordinates array for the mesh directly.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_ac5fc517fd8ea4cea8459d3f4d5d6ced3"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ac5fc517fd8ea4cea8459d3f4d5d6ced3">mingfx::Mesh::read_color_data</a></div><div class="ttdeci">Color read_color_data(int vertex_id) const</div><div class="ttdoc">Read only access to per-vertex color data. Data are returned as a Color. Indexed by vertex number....</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_ac74345bf4b2994de4ee1c509bcc6840e"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ac74345bf4b2994de4ee1c509bcc6840e">mingfx::Mesh::UpdateGPUMemory</a></div><div class="ttdeci">void UpdateGPUMemory()</div><div class="ttdoc">This copies the entire mesh data structure to a vertex array in GPU memory, which must happen before ...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_ac9cd4e8d67bb70295a48fcbc72ae32f9"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ac9cd4e8d67bb70295a48fcbc72ae32f9">mingfx::Mesh::SetTexCoords</a></div><div class="ttdeci">void SetTexCoords(int texture_unit, float *tex_coords_array, int num_tex_coords)</div><div class="ttdoc">Sets a texture coordinates array for the mesh directly. Tex coords are stored as (u,...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_acc7df547b0a2175287cc9f509c04e93c"><div class="ttname"><a href="classmingfx_1_1_mesh.html#acc7df547b0a2175287cc9f509c04e93c">mingfx::Mesh::CalcPerVertexNormals</a></div><div class="ttdeci">void CalcPerVertexNormals()</div><div class="ttdoc">This (re)calculates the normals for the mesh and stores them with the mesh data structure.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_ace7b23730dbcb581c4886cf2b9998327"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ace7b23730dbcb581c4886cf2b9998327">mingfx::Mesh::~Mesh</a></div><div class="ttdeci">virtual ~Mesh()</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_ad28dbd5b0ab77bec28f30f618dd9e57d"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ad28dbd5b0ab77bec28f30f618dd9e57d">mingfx::Mesh::SetNormals</a></div><div class="ttdeci">void SetNormals(const std::vector&lt; Vector3 &gt; &amp;norms)</div><div class="ttdoc">Sets the normal array for the mesh directly.</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_ada9371e85aa0b61df79b26fc880b1863"><div class="ttname"><a href="classmingfx_1_1_mesh.html#ada9371e85aa0b61df79b26fc880b1863">mingfx::Mesh::read_vertex_data</a></div><div class="ttdeci">Point3 read_vertex_data(int vertex_id) const</div><div class="ttdoc">Read only access to the vertex position data. Data are returned as a Point3. Indexed by vertex number...</div></div>
+<div class="ttc" id="aclassmingfx_1_1_mesh_html_aed172bdd77858f3b59978cb8527e19ae"><div class="ttname"><a href="classmingfx_1_1_mesh.html#aed172bdd77858f3b59978cb8527e19ae">mingfx::Mesh::SetColors</a></div><div class="ttdeci">void SetColors(float *colors_array, int num_colors)</div><div class="ttdoc">Sets the per-vertex colors array for the mesh directly. Colors are stored as (r,g,...</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_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="acolor_8h_html"><div class="ttname"><a href="color_8h.html">color.h</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="aopengl__headers_8h_html"><div class="ttname"><a href="opengl__headers_8h.html">opengl_headers.h</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="avector3_8h_html"><div class="ttname"><a href="vector3_8h.html">vector3.h</a></div></div>
+</div><!-- fragment --></div><!-- contents -->
+<!-- HTML footer for doxygen 1.8.9.1-->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.9.1
+</small></address>
+</body>
+</html>