forked from mmistakes/minimal-mistakes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
struct_component.html
333 lines (307 loc) · 16.3 KB
/
struct_component.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
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
<!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.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CS4850 Final Project: Component Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<script type="text/javascript" src="cookie.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>
<link href="doxygen.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">CS4850 Final Project
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(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">
<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><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pro-attribs">Protected Attributes</a> |
<a href="struct_component-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">Component Struct Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div></div>
</div><!--header-->
<div class="contents">
<p>Base class for all components.
<a href="#details">More...</a></p>
<p><code>#include <<a class="el" href="_component_8hpp_source.html">Component.hpp</a>></code></p>
<div class="dynheader">
Inheritance diagram for Component:</div>
<div class="dyncontent">
<div class="center">
<img src="struct_component.png" usemap="#Component_map" alt=""/>
<map id="Component_map" name="Component_map">
<area href="struct_collision2_d_component.html" title="A component that represents a 2D collision box." alt="Collision2DComponent" shape="rect" coords="0,56,139,80"/>
<area href="struct_texture_component.html" title="A component that represents a texture." alt="TextureComponent" shape="rect" coords="149,56,288,80"/>
<area href="struct_transform_component.html" title="A component that represents a 2D transformation." alt="TransformComponent" shape="rect" coords="298,56,437,80"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a85d6bd954d08b01cfad8e8357f98d011" id="r_a85d6bd954d08b01cfad8e8357f98d011"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a85d6bd954d08b01cfad8e8357f98d011">Input</a> (float deltaTime)</td></tr>
<tr class="memdesc:a85d6bd954d08b01cfad8e8357f98d011"><td class="mdescLeft"> </td><td class="mdescRight">Handle input. <br /></td></tr>
<tr class="separator:a85d6bd954d08b01cfad8e8357f98d011"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3c50208a8c7ea021b0ae2b9dfbaec65a" id="r_a3c50208a8c7ea021b0ae2b9dfbaec65a"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a3c50208a8c7ea021b0ae2b9dfbaec65a">Update</a> (float deltaTime)</td></tr>
<tr class="memdesc:a3c50208a8c7ea021b0ae2b9dfbaec65a"><td class="mdescLeft"> </td><td class="mdescRight">Update the game state. <br /></td></tr>
<tr class="separator:a3c50208a8c7ea021b0ae2b9dfbaec65a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a223de42285cca9e02809120c1a44c4ac" id="r_a223de42285cca9e02809120c1a44c4ac"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a223de42285cca9e02809120c1a44c4ac">Render</a> (SDL_Renderer *renderer)</td></tr>
<tr class="memdesc:a223de42285cca9e02809120c1a44c4ac"><td class="mdescLeft"> </td><td class="mdescRight">Render the game. <br /></td></tr>
<tr class="separator:a223de42285cca9e02809120c1a44c4ac"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2e87d60cd7150786e51bfcda7129ed90" id="r_a2e87d60cd7150786e51bfcda7129ed90"><td class="memItemLeft" align="right" valign="top">virtual ComponentType </td><td class="memItemRight" valign="bottom"><a class="el" href="#a2e87d60cd7150786e51bfcda7129ed90">GetType</a> ()=0</td></tr>
<tr class="memdesc:a2e87d60cd7150786e51bfcda7129ed90"><td class="mdescLeft"> </td><td class="mdescRight">Get the type of the component. <br /></td></tr>
<tr class="separator:a2e87d60cd7150786e51bfcda7129ed90"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abd8232c424fe5808f4f3d1cc020a960f" id="r_abd8232c424fe5808f4f3d1cc020a960f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#abd8232c424fe5808f4f3d1cc020a960f">SetGameEntity</a> (std::shared_ptr< <a class="el" href="struct_game_entity.html">GameEntity</a> > gameEntity)</td></tr>
<tr class="memdesc:abd8232c424fe5808f4f3d1cc020a960f"><td class="mdescLeft"> </td><td class="mdescRight">Set the game entity that the component is attached to. <br /></td></tr>
<tr class="separator:abd8232c424fe5808f4f3d1cc020a960f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad1000f79fe140ee4cc90d0b23cd6c035" id="r_ad1000f79fe140ee4cc90d0b23cd6c035"><td class="memItemLeft" align="right" valign="top">std::shared_ptr< <a class="el" href="struct_game_entity.html">GameEntity</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="#ad1000f79fe140ee4cc90d0b23cd6c035">GetGameEntity</a> ()</td></tr>
<tr class="memdesc:ad1000f79fe140ee4cc90d0b23cd6c035"><td class="mdescLeft"> </td><td class="mdescRight">Get the game entity that the component is attached to. <br /></td></tr>
<tr class="separator:ad1000f79fe140ee4cc90d0b23cd6c035"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a0f7c731464b5394b5d58ef3cf7a06d72" id="r_a0f7c731464b5394b5d58ef3cf7a06d72"><td class="memItemLeft" align="right" valign="top"><a id="a0f7c731464b5394b5d58ef3cf7a06d72" name="a0f7c731464b5394b5d58ef3cf7a06d72"></a>
std::shared_ptr< <a class="el" href="struct_game_entity.html">GameEntity</a> > </td><td class="memItemRight" valign="bottom"><b>mGameEntity</b></td></tr>
<tr class="separator:a0f7c731464b5394b5d58ef3cf7a06d72"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Base class for all components. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ad1000f79fe140ee4cc90d0b23cd6c035" name="ad1000f79fe140ee4cc90d0b23cd6c035"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1000f79fe140ee4cc90d0b23cd6c035">◆ </a></span>GetGameEntity()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::shared_ptr< <a class="el" href="struct_game_entity.html">GameEntity</a> > Component::GetGameEntity </td>
<td>(</td>
<td class="paramname"><span class="paramname"></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the game entity that the component is attached to. </p>
<dl class="section return"><dt>Returns</dt><dd>std::shared_ptr<GameEntity> </dd></dl>
</div>
</div>
<a id="a2e87d60cd7150786e51bfcda7129ed90" name="a2e87d60cd7150786e51bfcda7129ed90"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e87d60cd7150786e51bfcda7129ed90">◆ </a></span>GetType()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual ComponentType Component::GetType </td>
<td>(</td>
<td class="paramname"><span class="paramname"></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the type of the component. </p>
<dl class="section return"><dt>Returns</dt><dd>ComponentType </dd></dl>
<p>Implemented in <a class="el" href="struct_collision2_d_component.html#a8fbd37bdb8315708272d3589d6d74a41">Collision2DComponent</a>, <a class="el" href="struct_texture_component.html#a130152edf8eb87d06f4673b129d0cdd7">TextureComponent</a>, and <a class="el" href="struct_transform_component.html#a4d30c255d54af02fc53774412b488014">TransformComponent</a>.</p>
</div>
</div>
<a id="a85d6bd954d08b01cfad8e8357f98d011" name="a85d6bd954d08b01cfad8e8357f98d011"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a85d6bd954d08b01cfad8e8357f98d011">◆ </a></span>Input()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void Component::Input </td>
<td>(</td>
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>deltaTime</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Handle input. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">deltaTime</td><td>Time since last frame </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented in <a class="el" href="struct_collision2_d_component.html#ad4ac4768513c4d128a1bfcf8141fcd9e">Collision2DComponent</a>, <a class="el" href="struct_texture_component.html#a7c479b3de64f4cb205a02b8e4edd44b2">TextureComponent</a>, and <a class="el" href="struct_transform_component.html#a031ba1c6f597c25d677fb33793479d53">TransformComponent</a>.</p>
</div>
</div>
<a id="a223de42285cca9e02809120c1a44c4ac" name="a223de42285cca9e02809120c1a44c4ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a223de42285cca9e02809120c1a44c4ac">◆ </a></span>Render()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void Component::Render </td>
<td>(</td>
<td class="paramtype">SDL_Renderer *</td> <td class="paramname"><span class="paramname"><em>renderer</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Render the game. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">renderer</td><td>SDL renderer </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented in <a class="el" href="struct_collision2_d_component.html#aa7ca53aecce2a0b9204a67262d0df450">Collision2DComponent</a>, <a class="el" href="struct_texture_component.html#a9d1fe2ae0010e4cb50c4f7b9a984149b">TextureComponent</a>, and <a class="el" href="struct_transform_component.html#a78eedf13d70917145f2cb613509c14c1">TransformComponent</a>.</p>
</div>
</div>
<a id="abd8232c424fe5808f4f3d1cc020a960f" name="abd8232c424fe5808f4f3d1cc020a960f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd8232c424fe5808f4f3d1cc020a960f">◆ </a></span>SetGameEntity()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void Component::SetGameEntity </td>
<td>(</td>
<td class="paramtype">std::shared_ptr< <a class="el" href="struct_game_entity.html">GameEntity</a> ></td> <td class="paramname"><span class="paramname"><em>gameEntity</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the game entity that the component is attached to. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">gameEntity</td><td>Game entity </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a3c50208a8c7ea021b0ae2b9dfbaec65a" name="a3c50208a8c7ea021b0ae2b9dfbaec65a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c50208a8c7ea021b0ae2b9dfbaec65a">◆ </a></span>Update()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void Component::Update </td>
<td>(</td>
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>deltaTime</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Update the game state. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">deltaTime</td><td>Time since last frame </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented in <a class="el" href="struct_collision2_d_component.html#a4c2e6e053b5b88f42001b68e29d6da1b">Collision2DComponent</a>, <a class="el" href="struct_texture_component.html#ac97e2ad41734e84e90daaccce835c3af">TextureComponent</a>, and <a class="el" href="struct_transform_component.html#a7f61e8eea1e3d05a32653fa45bd10fe1">TransformComponent</a>.</p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="_component_8hpp_source.html">Component.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0
</small></address>
</body>
</html>