aboutsummaryrefslogtreecommitdiffstats
path: root/dev/MinGfx/docs/html/ray_8h_source.html
blob: 58d391cf09131d1bd182acf57261bed6544397c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<!-- 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/ray.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">ray.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="ray_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_RAY_H_</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#define SRC_RAY_H_</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160; </div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="aabb_8h.html">aabb.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="point3_8h.html">point3.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="vector3_8h.html">vector3.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="mesh_8h.html">mesh.h</a>&quot;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160; </div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacemingfx.html">mingfx</a> {</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160; </div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    </div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classmingfx_1_1_ray.html">   54</a></span>&#160;<span class="keyword">class </span><a class="code" href="classmingfx_1_1_ray.html">Ray</a> {</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    </div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="classmingfx_1_1_ray.html#aee3fe586869e00ae657a74bb4bbbbfda">   58</a></span>&#160;    <a class="code" href="classmingfx_1_1_ray.html#aee3fe586869e00ae657a74bb4bbbbfda">Ray</a>();</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    </div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classmingfx_1_1_ray.html#ab38cdd0793b3acfe55fa9ebca5ddebf6">   61</a></span>&#160;    <a class="code" href="classmingfx_1_1_ray.html#ab38cdd0793b3acfe55fa9ebca5ddebf6">Ray</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_point3.html">Point3</a> &amp;<a class="code" href="classmingfx_1_1_ray.html#a2fe0ca901c1a5f3ce5f74aa8e5f0d0fe">origin</a>, <span class="keyword">const</span> <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> &amp;<a class="code" href="classmingfx_1_1_ray.html#a7b7826730a410c10be00122c99fe6dbe">direction</a>);</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    </div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="classmingfx_1_1_ray.html#ac20909f30c07d5375598876c6d294625">   64</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classmingfx_1_1_ray.html#ac20909f30c07d5375598876c6d294625">~Ray</a>();</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    </div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="classmingfx_1_1_ray.html#a87b07c4f7c9f33189efade7e519b5d9d">   67</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classmingfx_1_1_ray.html#a87b07c4f7c9f33189efade7e519b5d9d">operator==</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_ray.html">Ray</a>&amp; other) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    </div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="classmingfx_1_1_ray.html#ab62fa6ea1c20870f67c58401aefe3eff">   70</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classmingfx_1_1_ray.html#ab62fa6ea1c20870f67c58401aefe3eff">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_ray.html">Ray</a>&amp; other) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    </div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="classmingfx_1_1_ray.html#a3c926e2da6dfd1b0a435577617eae984">   73</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classmingfx_1_1_ray.html#a3c926e2da6dfd1b0a435577617eae984">Length</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    </div>
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="classmingfx_1_1_ray.html#a8707604031eb9437c449345d85d69d24">   81</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classmingfx_1_1_ray.html#a8707604031eb9437c449345d85d69d24">IntersectPlane</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_point3.html">Point3</a> &amp;planePt, <span class="keyword">const</span> <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> &amp;planeNormal,</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;                        <span class="keywordtype">float</span> *iTime, <a class="code" href="classmingfx_1_1_point3.html">Point3</a> *iPoint) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    </div>
<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="classmingfx_1_1_ray.html#a1a6130616c4e4eebe9d09181b0f8b734">   90</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classmingfx_1_1_ray.html#a1a6130616c4e4eebe9d09181b0f8b734">IntersectTriangle</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_point3.html">Point3</a> &amp;v1, <span class="keyword">const</span> <a class="code" href="classmingfx_1_1_point3.html">Point3</a> &amp;v2, <span class="keyword">const</span> <a class="code" href="classmingfx_1_1_point3.html">Point3</a> &amp;v3,</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;                           <span class="keywordtype">float</span> *iTime, <a class="code" href="classmingfx_1_1_point3.html">Point3</a> *iPoint) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    </div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="classmingfx_1_1_ray.html#a37689523a0b73d3d3288ce60bdcb7ae3">   99</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classmingfx_1_1_ray.html#a37689523a0b73d3d3288ce60bdcb7ae3">IntersectQuad</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_point3.html">Point3</a> &amp;v1, <span class="keyword">const</span> <a class="code" href="classmingfx_1_1_point3.html">Point3</a> &amp;v2, <span class="keyword">const</span> <a class="code" href="classmingfx_1_1_point3.html">Point3</a> &amp;v3, <span class="keyword">const</span> <a class="code" href="classmingfx_1_1_point3.html">Point3</a> &amp;v4,</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;                       <span class="keywordtype">float</span> *iTime, <a class="code" href="classmingfx_1_1_point3.html">Point3</a> *iPoint) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160; </div>
<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="classmingfx_1_1_ray.html#a970c7dbc19167be625967fabfb39b4ff">  106</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classmingfx_1_1_ray.html#a970c7dbc19167be625967fabfb39b4ff">IntersectSphere</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_point3.html">Point3</a> &amp;center, <span class="keywordtype">float</span> radius,</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;                         <span class="keywordtype">float</span> *iTime, <a class="code" href="classmingfx_1_1_point3.html">Point3</a> *iPoint) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    </div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classmingfx_1_1_ray.html#a79caa1df0839d13339575d3d5527ae6f">  114</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classmingfx_1_1_ray.html#a79caa1df0839d13339575d3d5527ae6f">IntersectMesh</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_mesh.html">Mesh</a> &amp;mesh, <span class="keywordtype">float</span> *iTime,</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;                       <a class="code" href="classmingfx_1_1_point3.html">Point3</a> *iPoint, <span class="keywordtype">int</span> *iTriangleID) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    </div>
<div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="classmingfx_1_1_ray.html#ac90097090f0f8f49db13f6f232712afc">  126</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classmingfx_1_1_ray.html#ac90097090f0f8f49db13f6f232712afc">FastIntersectMesh</a>(<a class="code" href="classmingfx_1_1_mesh.html">Mesh</a> *mesh, <span class="keywordtype">float</span> *iTime,</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;                           <a class="code" href="classmingfx_1_1_point3.html">Point3</a> *iPoint, <span class="keywordtype">int</span> *iTriangleID) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    </div>
<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="classmingfx_1_1_ray.html#a57d3ee10518ed361ae02d9cbdef842b7">  142</a></span>&#160;     <span class="keywordtype">bool</span> <a class="code" href="classmingfx_1_1_ray.html#a57d3ee10518ed361ae02d9cbdef842b7">IntersectAABB</a>(<span class="keyword">const</span> <a class="code" href="classmingfx_1_1_a_a_b_b.html">AABB</a> &amp;box, <span class="keywordtype">float</span> *iTime) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    </div>
<div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="classmingfx_1_1_ray.html#a2fe0ca901c1a5f3ce5f74aa8e5f0d0fe">  145</a></span>&#160;    <a class="code" href="classmingfx_1_1_point3.html">Point3</a> <a class="code" href="classmingfx_1_1_ray.html#a2fe0ca901c1a5f3ce5f74aa8e5f0d0fe">origin</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    </div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="classmingfx_1_1_ray.html#a7b7826730a410c10be00122c99fe6dbe">  148</a></span>&#160;    <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> <a class="code" href="classmingfx_1_1_ray.html#a7b7826730a410c10be00122c99fe6dbe">direction</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160; </div>
<div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="classmingfx_1_1_ray.html#a75593293307b4eead15a876bf3597071">  151</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classmingfx_1_1_ray.html#a75593293307b4eead15a876bf3597071">set</a>(<a class="code" href="classmingfx_1_1_point3.html">Point3</a> newOrigin, <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> newDir);</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    </div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    <a class="code" href="classmingfx_1_1_point3.html">Point3</a> p_;</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <a class="code" href="classmingfx_1_1_vector3.html">Vector3</a> d_;</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;};</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160; </div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160; </div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;<span class="comment">// --- Stream operators ---</span></div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160; </div>
<div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="namespacemingfx.html#ad7c839e598b7be6c1b407330dfacc980">  161</a></span>&#160;std::ostream &amp; <a class="code" href="namespacemingfx.html#a6bc967741341f4f318a505d884192906">operator&lt;&lt; </a>( std::ostream &amp;os, <span class="keyword">const</span> <a class="code" href="classmingfx_1_1_ray.html">Ray</a> &amp;r);</div>
<div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="namespacemingfx.html#a0412270963460363fa015b9b4785cc59">  162</a></span>&#160;std::istream &amp; <a class="code" href="namespacemingfx.html#a6eb31e6e81c6e29144799be4c9db404d">operator&gt;&gt; </a>( std::istream &amp;is, <a class="code" href="classmingfx_1_1_ray.html">Ray</a> &amp;r);</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160; </div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    </div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;} <span class="comment">// end namespace</span></div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160; </div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="aaabb_8h_html"><div class="ttname"><a href="aabb_8h.html">aabb.h</a></div></div>
<div class="ttc" id="aclassmingfx_1_1_a_a_b_b_html"><div class="ttname"><a href="classmingfx_1_1_a_a_b_b.html">mingfx::AABB</a></div><div class="ttdoc">A 3D axis-aligned bounding box defined by two corners (min and max).</div><div class="ttdef"><b>Definition:</b> <a href="aabb_8h_source.html#l00031">aabb.h:31</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_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_ray_html"><div class="ttname"><a href="classmingfx_1_1_ray.html">mingfx::Ray</a></div><div class="ttdoc">Stores the mathematical object of a ray that begins at an origin (a 3D point) and points in a directi...</div><div class="ttdef"><b>Definition:</b> <a href="ray_8h_source.html#l00054">ray.h:54</a></div></div>
<div class="ttc" id="aclassmingfx_1_1_ray_html_a1a6130616c4e4eebe9d09181b0f8b734"><div class="ttname"><a href="classmingfx_1_1_ray.html#a1a6130616c4e4eebe9d09181b0f8b734">mingfx::Ray::IntersectTriangle</a></div><div class="ttdeci">bool IntersectTriangle(const Point3 &amp;v1, const Point3 &amp;v2, const Point3 &amp;v3, float *iTime, Point3 *iPoint) const</div><div class="ttdoc">Checks to see if the ray intersects a triangle defined by the vertices v1, v2, and v3.</div></div>
<div class="ttc" id="aclassmingfx_1_1_ray_html_a2fe0ca901c1a5f3ce5f74aa8e5f0d0fe"><div class="ttname"><a href="classmingfx_1_1_ray.html#a2fe0ca901c1a5f3ce5f74aa8e5f0d0fe">mingfx::Ray::origin</a></div><div class="ttdeci">Point3 origin() const</div><div class="ttdoc">Returns the origin.</div></div>
<div class="ttc" id="aclassmingfx_1_1_ray_html_a37689523a0b73d3d3288ce60bdcb7ae3"><div class="ttname"><a href="classmingfx_1_1_ray.html#a37689523a0b73d3d3288ce60bdcb7ae3">mingfx::Ray::IntersectQuad</a></div><div class="ttdeci">bool IntersectQuad(const Point3 &amp;v1, const Point3 &amp;v2, const Point3 &amp;v3, const Point3 &amp;v4, float *iTime, Point3 *iPoint) const</div><div class="ttdoc">Checks to see if the ray intersects a quad defined by the vertices v1, v2, v3, and v4.</div></div>
<div class="ttc" id="aclassmingfx_1_1_ray_html_a3c926e2da6dfd1b0a435577617eae984"><div class="ttname"><a href="classmingfx_1_1_ray.html#a3c926e2da6dfd1b0a435577617eae984">mingfx::Ray::Length</a></div><div class="ttdeci">float Length() const</div><div class="ttdoc">Returns the length of the direction vector.</div></div>
<div class="ttc" id="aclassmingfx_1_1_ray_html_a57d3ee10518ed361ae02d9cbdef842b7"><div class="ttname"><a href="classmingfx_1_1_ray.html#a57d3ee10518ed361ae02d9cbdef842b7">mingfx::Ray::IntersectAABB</a></div><div class="ttdeci">bool IntersectAABB(const AABB &amp;box, float *iTime) const</div><div class="ttdoc">Checks to see if the ray intersects an AABB (Axis-Aligned Bounding Box).</div></div>
<div class="ttc" id="aclassmingfx_1_1_ray_html_a75593293307b4eead15a876bf3597071"><div class="ttname"><a href="classmingfx_1_1_ray.html#a75593293307b4eead15a876bf3597071">mingfx::Ray::set</a></div><div class="ttdeci">void set(Point3 newOrigin, Vector3 newDir)</div><div class="ttdoc">Sets a new origin and direction.</div></div>
<div class="ttc" id="aclassmingfx_1_1_ray_html_a79caa1df0839d13339575d3d5527ae6f"><div class="ttname"><a href="classmingfx_1_1_ray.html#a79caa1df0839d13339575d3d5527ae6f">mingfx::Ray::IntersectMesh</a></div><div class="ttdeci">bool IntersectMesh(const Mesh &amp;mesh, float *iTime, Point3 *iPoint, int *iTriangleID) const</div><div class="ttdoc">Checks to see if the ray intersects a triangle mesh.</div></div>
<div class="ttc" id="aclassmingfx_1_1_ray_html_a7b7826730a410c10be00122c99fe6dbe"><div class="ttname"><a href="classmingfx_1_1_ray.html#a7b7826730a410c10be00122c99fe6dbe">mingfx::Ray::direction</a></div><div class="ttdeci">Vector3 direction() const</div><div class="ttdoc">Returns the direction.</div></div>
<div class="ttc" id="aclassmingfx_1_1_ray_html_a8707604031eb9437c449345d85d69d24"><div class="ttname"><a href="classmingfx_1_1_ray.html#a8707604031eb9437c449345d85d69d24">mingfx::Ray::IntersectPlane</a></div><div class="ttdeci">bool IntersectPlane(const Point3 &amp;planePt, const Vector3 &amp;planeNormal, float *iTime, Point3 *iPoint) const</div><div class="ttdoc">Checks to see if the ray intersects a plane defined by a point and a normal.</div></div>
<div class="ttc" id="aclassmingfx_1_1_ray_html_a87b07c4f7c9f33189efade7e519b5d9d"><div class="ttname"><a href="classmingfx_1_1_ray.html#a87b07c4f7c9f33189efade7e519b5d9d">mingfx::Ray::operator==</a></div><div class="ttdeci">bool operator==(const Ray &amp;other) const</div><div class="ttdoc">Check for &quot;equality&quot;, taking floating point imprecision into account.</div></div>
<div class="ttc" id="aclassmingfx_1_1_ray_html_a970c7dbc19167be625967fabfb39b4ff"><div class="ttname"><a href="classmingfx_1_1_ray.html#a970c7dbc19167be625967fabfb39b4ff">mingfx::Ray::IntersectSphere</a></div><div class="ttdeci">bool IntersectSphere(const Point3 &amp;center, float radius, float *iTime, Point3 *iPoint) const</div><div class="ttdoc">Checks to see if the ray intersects a sphere defined by a center point and a radius.</div></div>
<div class="ttc" id="aclassmingfx_1_1_ray_html_ab38cdd0793b3acfe55fa9ebca5ddebf6"><div class="ttname"><a href="classmingfx_1_1_ray.html#ab38cdd0793b3acfe55fa9ebca5ddebf6">mingfx::Ray::Ray</a></div><div class="ttdeci">Ray(const Point3 &amp;origin, const Vector3 &amp;direction)</div><div class="ttdoc">Creates a ray from a 3D origin and direction.</div></div>
<div class="ttc" id="aclassmingfx_1_1_ray_html_ab62fa6ea1c20870f67c58401aefe3eff"><div class="ttname"><a href="classmingfx_1_1_ray.html#ab62fa6ea1c20870f67c58401aefe3eff">mingfx::Ray::operator!=</a></div><div class="ttdeci">bool operator!=(const Ray &amp;other) const</div><div class="ttdoc">Check for &quot;inequality&quot;, taking floating point imprecision into account.</div></div>
<div class="ttc" id="aclassmingfx_1_1_ray_html_ac20909f30c07d5375598876c6d294625"><div class="ttname"><a href="classmingfx_1_1_ray.html#ac20909f30c07d5375598876c6d294625">mingfx::Ray::~Ray</a></div><div class="ttdeci">virtual ~Ray()</div><div class="ttdoc">Ray destructor.</div></div>
<div class="ttc" id="aclassmingfx_1_1_ray_html_ac90097090f0f8f49db13f6f232712afc"><div class="ttname"><a href="classmingfx_1_1_ray.html#ac90097090f0f8f49db13f6f232712afc">mingfx::Ray::FastIntersectMesh</a></div><div class="ttdeci">bool FastIntersectMesh(Mesh *mesh, float *iTime, Point3 *iPoint, int *iTriangleID) const</div><div class="ttdoc">Checks to see if the ray intersects a triangle mesh.</div></div>
<div class="ttc" id="aclassmingfx_1_1_ray_html_aee3fe586869e00ae657a74bb4bbbbfda"><div class="ttname"><a href="classmingfx_1_1_ray.html#aee3fe586869e00ae657a74bb4bbbbfda">mingfx::Ray::Ray</a></div><div class="ttdeci">Ray()</div><div class="ttdoc">Defaults to a ray at the origin and pointing in the -Z direction.</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="amesh_8h_html"><div class="ttname"><a href="mesh_8h.html">mesh.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="anamespacemingfx_html_a6bc967741341f4f318a505d884192906"><div class="ttname"><a href="namespacemingfx.html#a6bc967741341f4f318a505d884192906">mingfx::operator&lt;&lt;</a></div><div class="ttdeci">std::ostream &amp; operator&lt;&lt;(std::ostream &amp;os, const Color &amp;c)</div></div>
<div class="ttc" id="anamespacemingfx_html_a6eb31e6e81c6e29144799be4c9db404d"><div class="ttname"><a href="namespacemingfx.html#a6eb31e6e81c6e29144799be4c9db404d">mingfx::operator&gt;&gt;</a></div><div class="ttdeci">std::istream &amp; operator&gt;&gt;(std::istream &amp;is, Color &amp;c)</div></div>
<div class="ttc" id="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>