-
Notifications
You must be signed in to change notification settings - Fork 0
/
_camera_component_8h_source.html
116 lines (114 loc) · 29 KB
/
_camera_component_8h_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
<!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.8.11"/>
<title>OpenGP: /home/drebain/Workspace/research/OpenGPFork/src/OpenGP/GL/Components/CameraComponent.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/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="style.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 id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">OpenGP
 <span id="projectnumber">1.1</span>
</div>
<div id="projectbrief">Open Geometry Processing Library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="tutorial.html"><span>Tutorial</span></a></li>
<li><a href="devel.html"><span>Development</span></a></li>
<li><a href="annotated.html"><span>Reference Manual</span></a></li>
<li><a href="https://github.com/OpenGP/OpenGP/issues"><span>Report Bug</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="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.png" alt=""/></a>
</span>
</div>
</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">
<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><li class="navelem"><a class="el" href="dir_ceaee8241810cc418efcd8e45299d116.html">OpenGP</a></li><li class="navelem"><a class="el" href="dir_6a0bf43eddd697684442bde9dbb98fcf.html">GL</a></li><li class="navelem"><a class="el" href="dir_dc92aa175729e999c0f7f9cf7270beab.html">Components</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">CameraComponent.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// This Source Code Form is subject to the terms of the Mozilla Public</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// License, v. 2.0. If a copy of the MPL was not distributed with this</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// file, You can obtain one at http://mozilla.org/MPL/2.0/.</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> </div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> </div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#include <OpenGP/GL/Entity.h></span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#include <OpenGP/GL/Components/WorldRenderComponent.h></span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#include <OpenGP/GL/Components/TransformComponent.h></span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#include <OpenGP/GL/MaterialRenderer.h></span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#include <OpenGP/GL/Window.h></span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#include <OpenGP/MLogger.h></span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> </div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> </div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">//=============================================================================</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="keyword">namespace </span><a class="code" href="namespace_open_g_p.html">OpenGP</a> {</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment">//=============================================================================</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="struct_open_g_p_1_1_g_u_i_render_event.html"> 20</a></span> <span class="keyword">struct </span><a class="code" href="struct_open_g_p_1_1_g_u_i_render_event.html">GUIRenderEvent</a> {};</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="class_open_g_p_1_1_camera_component.html"> 23</a></span> <span class="keyword">class </span><a class="code" href="class_open_g_p_1_1_camera_component.html">CameraComponent</a> : <span class="keyword">public</span> <a class="code" href="class_open_g_p_1_1_component.html">Component</a>, <span class="keyword">public</span> <a class="code" href="class_open_g_p_1_1_event_provider.html">EventProvider</a> {</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  <a class="code" href="class_open_g_p_1_1_window.html">Window</a> *window = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="class_open_g_p_1_1_camera_component.html#a6e6b40e2c01bbd1ef444d6b56bc5ff32"> 31</a></span>  <span class="keywordtype">float</span> near_plane = 0.1f;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="class_open_g_p_1_1_camera_component.html#a730c8e608662923dd9d9c1f356747f6f"> 34</a></span>  <span class="keywordtype">float</span> far_plane = 1000;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="class_open_g_p_1_1_camera_component.html#a8ce0caafae9f0d36f4bc5dabfe56666d"> 37</a></span>  <span class="keywordtype">float</span> vfov = 60;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <a class="code" href="class_open_g_p_1_1_camera_component.html">CameraComponent</a>() {}</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="class_open_g_p_1_1_camera_component.html#accf94601ea2c69dc812bca30006bc2e7"> 41</a></span>  <span class="keywordtype">void</span> <a class="code" href="class_open_g_p_1_1_camera_component.html#accf94601ea2c69dc812bca30006bc2e7">init</a>() {</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  require<TransformComponent>();</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  }</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> </div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="class_open_g_p_1_1_camera_component.html#a98934725da2808cd39d6e696aa375ebb"> 46</a></span>  <span class="keywordtype">bool</span> <a class="code" href="class_open_g_p_1_1_camera_component.html#a98934725da2808cd39d6e696aa375ebb">has_window</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keywordflow">return</span> window != <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  }</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="class_open_g_p_1_1_camera_component.html#a655c0bd9fad42986de36838e0e791458"> 51</a></span>  Mat4x4 <a class="code" href="class_open_g_p_1_1_camera_component.html#a655c0bd9fad42986de36838e0e791458">get_view</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keyword">auto</span> &t = get<TransformComponent>();</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="keywordflow">return</span> look_at(t.position, Vec3(t.position + t.forward()), t.up());</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  }</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="class_open_g_p_1_1_camera_component.html#a598e6a4c7ced29f916e10281b93d7364"> 57</a></span>  Mat4x4 <a class="code" href="class_open_g_p_1_1_camera_component.html#a598e6a4c7ced29f916e10281b93d7364">get_projection</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keywordtype">int</span> width, height;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  std::tie(width, height) = window-><a class="code" href="class_open_g_p_1_1_window.html#a1fe47f2ff657187c75100aaf10ba81f7">get_size</a>();</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keywordflow">return</span> get_projection(width, height);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  }</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> </div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="class_open_g_p_1_1_camera_component.html#a2a34bde2b6b5ab4874c433bed8c74961"> 65</a></span>  Mat4x4 <a class="code" href="class_open_g_p_1_1_camera_component.html#a2a34bde2b6b5ab4874c433bed8c74961">get_projection</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height)<span class="keyword"> const </span>{</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordflow">return</span> perspective(vfov, (<span class="keywordtype">float</span>)width / (<span class="keywordtype">float</span>)height, near_plane, far_plane);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  }</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> </div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="class_open_g_p_1_1_camera_component.html#a2082e4736002b9299e021845c42a8c2f"> 70</a></span>  <span class="keywordtype">void</span> <a class="code" href="class_open_g_p_1_1_camera_component.html#a2082e4736002b9299e021845c42a8c2f">draw</a>() {</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> </div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordflow">if</span> (window == <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  mFatal() << <span class="stringliteral">"Camera window not set"</span>;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  }</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> </div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordtype">int</span> width, height;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  std::tie(width, height) = window-><a class="code" href="class_open_g_p_1_1_window.html#a1fe47f2ff657187c75100aaf10ba81f7">get_size</a>();</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> </div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  draw(width, height);</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> </div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  }</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> </div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="class_open_g_p_1_1_camera_component.html#a77741dec1e75400934d643f6731dac8e"> 84</a></span>  <span class="keywordtype">void</span> <a class="code" href="class_open_g_p_1_1_camera_component.html#a77741dec1e75400934d643f6731dac8e">draw</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height) {</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> </div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  RenderContext context;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  glViewport(0, 0, width, height);</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  glClearColor(0.15f, 0.15f, 0.15f, 1);</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  glEnable(GL_DEPTH_TEST);</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span> </div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  context.aspect = (float)width / (<span class="keywordtype">float</span>)height;</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  context.vfov = vfov;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  context.near = near_plane;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  context.far = far_plane;</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  context.eye = get<TransformComponent>().position;</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  context.forward = get<TransformComponent>().forward();</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  context.up = get<TransformComponent>().up();</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span> </div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  context.update_view();</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  context.update_projection();</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span> </div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> &renderable : get_scene().all_of_type<WorldRenderComponent>()) {</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span> </div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="keywordflow">if</span> (!renderable.visible)</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span> </div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keyword">auto</span> &transform = renderable.get<<a class="code" href="class_open_g_p_1_1_transform_component.html">TransformComponent</a>>();</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span> </div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  context.translation = transform.position;</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  context.scale = transform.scale;</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  context.rotation = transform.rotation;</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span> </div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  context.update_model();</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> </div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  renderable.get_renderer().render(context);</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  }</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span> </div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <a class="code" href="struct_open_g_p_1_1_g_u_i_render_event.html">GUIRenderEvent</a> event;</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> </div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  send_event(event);</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span> </div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  }</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span> </div><div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="class_open_g_p_1_1_camera_component.html#a474125bc448fd2a0e65206b99a06b143"> 127</a></span>  <a class="code" href="class_open_g_p_1_1_window.html">Window</a> &<a class="code" href="class_open_g_p_1_1_camera_component.html#a474125bc448fd2a0e65206b99a06b143">get_window</a>() {</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keywordflow">return</span> *window;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  }</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span> </div><div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="class_open_g_p_1_1_camera_component.html#ad5795eeadbad4f24d3db9ff5e8fac89a"> 132</a></span>  <span class="keywordtype">void</span> <a class="code" href="class_open_g_p_1_1_camera_component.html#ad5795eeadbad4f24d3db9ff5e8fac89a">set_window</a>(<a class="code" href="class_open_g_p_1_1_window.html">Window</a> &window) {</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  this->window = &window;</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  }</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span> </div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span> };</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span> </div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span> <span class="comment">//=============================================================================</span></div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span> } <span class="comment">// OpenGP::</span></div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span> <span class="comment">//=============================================================================</span></div><div class="ttc" id="class_open_g_p_1_1_camera_component_html_a77741dec1e75400934d643f6731dac8e"><div class="ttname"><a href="class_open_g_p_1_1_camera_component.html#a77741dec1e75400934d643f6731dac8e">OpenGP::CameraComponent::draw</a></div><div class="ttdeci">void draw(int width, int height)</div><div class="ttdoc">Draw the scene from the camera POV into the bound framebuffer with given dimensions. </div><div class="ttdef"><b>Definition:</b> CameraComponent.h:84</div></div>
<div class="ttc" id="class_open_g_p_1_1_camera_component_html_a98934725da2808cd39d6e696aa375ebb"><div class="ttname"><a href="class_open_g_p_1_1_camera_component.html#a98934725da2808cd39d6e696aa375ebb">OpenGP::CameraComponent::has_window</a></div><div class="ttdeci">bool has_window() const </div><div class="ttdoc">Check if there is a window associated with the camera. </div><div class="ttdef"><b>Definition:</b> CameraComponent.h:46</div></div>
<div class="ttc" id="class_open_g_p_1_1_camera_component_html_a2a34bde2b6b5ab4874c433bed8c74961"><div class="ttname"><a href="class_open_g_p_1_1_camera_component.html#a2a34bde2b6b5ab4874c433bed8c74961">OpenGP::CameraComponent::get_projection</a></div><div class="ttdeci">Mat4x4 get_projection(int width, int height) const </div><div class="ttdoc">Get the projection matrix of the camera used when rendering to a framebuffer with width width and hei...</div><div class="ttdef"><b>Definition:</b> CameraComponent.h:65</div></div>
<div class="ttc" id="class_open_g_p_1_1_camera_component_html_accf94601ea2c69dc812bca30006bc2e7"><div class="ttname"><a href="class_open_g_p_1_1_camera_component.html#accf94601ea2c69dc812bca30006bc2e7">OpenGP::CameraComponent::init</a></div><div class="ttdeci">void init()</div><div class="ttdoc">Overridable method that handles object initialization. </div><div class="ttdef"><b>Definition:</b> CameraComponent.h:41</div></div>
<div class="ttc" id="class_open_g_p_1_1_camera_component_html_a655c0bd9fad42986de36838e0e791458"><div class="ttname"><a href="class_open_g_p_1_1_camera_component.html#a655c0bd9fad42986de36838e0e791458">OpenGP::CameraComponent::get_view</a></div><div class="ttdeci">Mat4x4 get_view() const </div><div class="ttdoc">Get the view matrix of the camera. </div><div class="ttdef"><b>Definition:</b> CameraComponent.h:51</div></div>
<div class="ttc" id="class_open_g_p_1_1_component_html"><div class="ttname"><a href="class_open_g_p_1_1_component.html">OpenGP::Component</a></div><div class="ttdoc">The base class for all components. </div><div class="ttdef"><b>Definition:</b> Entity.h:23</div></div>
<div class="ttc" id="class_open_g_p_1_1_camera_component_html_ad5795eeadbad4f24d3db9ff5e8fac89a"><div class="ttname"><a href="class_open_g_p_1_1_camera_component.html#ad5795eeadbad4f24d3db9ff5e8fac89a">OpenGP::CameraComponent::set_window</a></div><div class="ttdeci">void set_window(Window &window)</div><div class="ttdoc">Attach a window to the camera. </div><div class="ttdef"><b>Definition:</b> CameraComponent.h:132</div></div>
<div class="ttc" id="class_open_g_p_1_1_window_html_a1fe47f2ff657187c75100aaf10ba81f7"><div class="ttname"><a href="class_open_g_p_1_1_window.html#a1fe47f2ff657187c75100aaf10ba81f7">OpenGP::Window::get_size</a></div><div class="ttdeci">HEADERONLY_INLINE std::tuple< int, int > get_size()</div><div class="ttdoc">Get the size in pixels of the window as reported by the OS. </div><div class="ttdef"><b>Definition:</b> Window.cpp:116</div></div>
<div class="ttc" id="class_open_g_p_1_1_camera_component_html"><div class="ttname"><a href="class_open_g_p_1_1_camera_component.html">OpenGP::CameraComponent</a></div><div class="ttdoc">A component representing a camera in the scene. </div><div class="ttdef"><b>Definition:</b> CameraComponent.h:23</div></div>
<div class="ttc" id="namespace_open_g_p_html"><div class="ttname"><a href="namespace_open_g_p.html">OpenGP</a></div><div class="ttdef"><b>Definition:</b> VirtualDepthSensor.h:19</div></div>
<div class="ttc" id="struct_open_g_p_1_1_g_u_i_render_event_html"><div class="ttname"><a href="struct_open_g_p_1_1_g_u_i_render_event.html">OpenGP::GUIRenderEvent</a></div><div class="ttdoc">An event indicating that any canvases should draw their UI elements. </div><div class="ttdef"><b>Definition:</b> CameraComponent.h:20</div></div>
<div class="ttc" id="class_open_g_p_1_1_window_html"><div class="ttname"><a href="class_open_g_p_1_1_window.html">OpenGP::Window</a></div><div class="ttdoc">A wrapper object that manages a window. </div><div class="ttdef"><b>Definition:</b> Window.h:58</div></div>
<div class="ttc" id="class_open_g_p_1_1_camera_component_html_a598e6a4c7ced29f916e10281b93d7364"><div class="ttname"><a href="class_open_g_p_1_1_camera_component.html#a598e6a4c7ced29f916e10281b93d7364">OpenGP::CameraComponent::get_projection</a></div><div class="ttdeci">Mat4x4 get_projection() const </div><div class="ttdoc">Get the projection matrix of the camera used when rendering to the attached window. </div><div class="ttdef"><b>Definition:</b> CameraComponent.h:57</div></div>
<div class="ttc" id="class_open_g_p_1_1_transform_component_html"><div class="ttname"><a href="class_open_g_p_1_1_transform_component.html">OpenGP::TransformComponent</a></div><div class="ttdoc">A component representing the position, orientation and scale of an entity. </div><div class="ttdef"><b>Definition:</b> TransformComponent.h:16</div></div>
<div class="ttc" id="class_open_g_p_1_1_camera_component_html_a474125bc448fd2a0e65206b99a06b143"><div class="ttname"><a href="class_open_g_p_1_1_camera_component.html#a474125bc448fd2a0e65206b99a06b143">OpenGP::CameraComponent::get_window</a></div><div class="ttdeci">Window & get_window()</div><div class="ttdoc">Get the attached window assuming it exists. </div><div class="ttdef"><b>Definition:</b> CameraComponent.h:127</div></div>
<div class="ttc" id="class_open_g_p_1_1_camera_component_html_a2082e4736002b9299e021845c42a8c2f"><div class="ttname"><a href="class_open_g_p_1_1_camera_component.html#a2082e4736002b9299e021845c42a8c2f">OpenGP::CameraComponent::draw</a></div><div class="ttdeci">void draw()</div><div class="ttdoc">Draw the scene from the camera POV assuming there is a window attached and bound. ...</div><div class="ttdef"><b>Definition:</b> CameraComponent.h:70</div></div>
<div class="ttc" id="class_open_g_p_1_1_event_provider_html"><div class="ttname"><a href="class_open_g_p_1_1_event_provider.html">OpenGP::EventProvider</a></div><div class="ttdoc">Base class that provides derived classes the abillity to register callbacks and send events...</div><div class="ttdef"><b>Definition:</b> EventProvider.h:51</div></div>
</div><!-- fragment --></div><!-- contents -->
<div id="footer">
<!-- <address>
<small>
Copyright © 2013
</small>
</address> -->
</div>
</body>
</html>