-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_intersection_8hpp_source.html
141 lines (139 loc) · 11.6 KB
/
_intersection_8hpp_source.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Rendu: src/engine/raycaster/Intersection.hpp 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/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(document).ready(function() { init_search(); });
/* @license-end */
</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 id="projectrow">
<td id="projectalign">
<div id="projectname">Rendu
</div>
<div id="projectbrief">A lightweight rendering engine for experimentations</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()"> </span>
<input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
</ul>
</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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_2052808828190f934b76e979ee65af8a.html">engine</a></li><li class="navelem"><a class="el" href="dir_a57ba4e304c3a9a2f8bb9f4eca991bd1.html">raycaster</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">Intersection.hpp</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#include "resources/Mesh.hpp"</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#include "Common.hpp"</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"><a class="line" href="struct_ray.html"> 10</a></span><span class="keyword">struct </span><a class="code hl_struct" href="struct_ray.html">Ray</a> {</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"><a class="line" href="struct_ray.html#addaf099589055cfa794b1b5e2323174f"> 11</a></span> <span class="keyword">const</span> glm::vec3 <a class="code hl_variable" href="struct_ray.html#addaf099589055cfa794b1b5e2323174f">pos</a>; </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"><a class="line" href="struct_ray.html#aed0e4b8c219c75beac4845170c96637c"> 12</a></span> <span class="keyword">const</span> glm::vec3 <a class="code hl_variable" href="struct_ray.html#aed0e4b8c219c75beac4845170c96637c">dir</a>; </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="struct_ray.html#a37b6f9babbec30423e8a83495b40c8ec"> 13</a></span> <span class="keyword">const</span> glm::vec3 <a class="code hl_variable" href="struct_ray.html#a37b6f9babbec30423e8a83495b40c8ec">invdir</a>; </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <a class="code hl_struct" href="struct_ray.html">Ray</a>(<span class="keyword">const</span> glm::vec3 & origin, <span class="keyword">const</span> glm::vec3 & direction);</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span>};</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="class_intersection.html"> 27</a></span><span class="keyword">class </span><a class="code hl_class" href="class_intersection.html">Intersection</a> {</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_intersection.html#a1d6c113fff11ec885dcfac2d8ceac8f3">sphere</a>(<span class="keyword">const</span> glm::vec3 & rayOrigin, <span class="keyword">const</span> glm::vec3 & rayDir, <span class="keywordtype">float</span> radius, glm::vec2 & roots);</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_intersection.html#a9a54b0fabc8356fcda6c0bffe2ce7ead">box</a>(<span class="keyword">const</span> <a class="code hl_struct" href="struct_ray.html">Ray</a> & ray, <span class="keyword">const</span> <a class="code hl_class" href="class_bounding_box.html">BoundingBox</a> & <a class="code hl_function" href="class_intersection.html#a9a54b0fabc8356fcda6c0bffe2ce7ead">box</a>, <span class="keywordtype">float</span> mini, <span class="keywordtype">float</span> maxi);</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span>};</div>
<div class="ttc" id="aclass_bounding_box_html"><div class="ttname"><a href="class_bounding_box.html">BoundingBox</a></div><div class="ttdoc">Represent the smallest axis-aligne box containing a given object or region of space.</div><div class="ttdef"><b>Definition:</b> Bounds.hpp:28</div></div>
<div class="ttc" id="aclass_intersection_html"><div class="ttname"><a href="class_intersection.html">Intersection</a></div><div class="ttdoc">Provide helpers for basic analytic intersections.</div><div class="ttdef"><b>Definition:</b> Intersection.hpp:27</div></div>
<div class="ttc" id="aclass_intersection_html_a1d6c113fff11ec885dcfac2d8ceac8f3"><div class="ttname"><a href="class_intersection.html#a1d6c113fff11ec885dcfac2d8ceac8f3">Intersection::sphere</a></div><div class="ttdeci">static bool sphere(const glm::vec3 &rayOrigin, const glm::vec3 &rayDir, float radius, glm::vec2 &roots)</div><div class="ttdef"><b>Definition:</b> Intersection.cpp:7</div></div>
<div class="ttc" id="aclass_intersection_html_a9a54b0fabc8356fcda6c0bffe2ce7ead"><div class="ttname"><a href="class_intersection.html#a9a54b0fabc8356fcda6c0bffe2ce7ead">Intersection::box</a></div><div class="ttdeci">static bool box(const Ray &ray, const BoundingBox &box, float mini, float maxi)</div><div class="ttdef"><b>Definition:</b> Intersection.cpp:22</div></div>
<div class="ttc" id="astruct_ray_html"><div class="ttname"><a href="struct_ray.html">Ray</a></div><div class="ttdoc">Represent a ray, shot from a given position in a specific direction.</div><div class="ttdef"><b>Definition:</b> Intersection.hpp:10</div></div>
<div class="ttc" id="astruct_ray_html_a37b6f9babbec30423e8a83495b40c8ec"><div class="ttname"><a href="struct_ray.html#a37b6f9babbec30423e8a83495b40c8ec">Ray::invdir</a></div><div class="ttdeci">const glm::vec3 invdir</div><div class="ttdoc">Ray reciprocal direction (normalized).</div><div class="ttdef"><b>Definition:</b> Intersection.hpp:13</div></div>
<div class="ttc" id="astruct_ray_html_addaf099589055cfa794b1b5e2323174f"><div class="ttname"><a href="struct_ray.html#addaf099589055cfa794b1b5e2323174f">Ray::pos</a></div><div class="ttdeci">const glm::vec3 pos</div><div class="ttdoc">Ray position.</div><div class="ttdef"><b>Definition:</b> Intersection.hpp:11</div></div>
<div class="ttc" id="astruct_ray_html_aed0e4b8c219c75beac4845170c96637c"><div class="ttname"><a href="struct_ray.html#aed0e4b8c219c75beac4845170c96637c">Ray::dir</a></div><div class="ttdeci">const glm::vec3 dir</div><div class="ttdoc">Ray direction (normalized).</div><div class="ttdef"><b>Definition:</b> Intersection.hpp:12</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="http://www.doxygen.org/index.html">Doxygen</a> 1.9.5
- Theme by <a href="http://simonrodriguez.fr">Simon Rodriguez</a></small></address><br>
</body>
</html>