Files
Bomberman/PositionComponent_8hpp_source.html
2021-06-26 11:31:13 +00:00

126 lines
14 KiB
HTML

<!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">
<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.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Bomberman: sources/Component/Position/PositionComponent.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>
<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 style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Bomberman
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<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');
/* @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_08d237fc27d4ecd563f71c5d52f2fecc.html">sources</a></li><li class="navelem"><a class="el" href="dir_1625c0207da71ef5bcc742f7d87fc397.html">Component</a></li><li class="navelem"><a class="el" href="dir_9aff723e231f8965f5cf02636725dad0.html">Position</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">PositionComponent.hpp</div> </div>
</div><!--header-->
<div class="contents">
<a href="PositionComponent_8hpp.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">// Created by Zoe Roux on 5/17/21.</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; </div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160; </div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="sources_2Models_2Vector3_8hpp.html">Models/Vector3.hpp</a>&quot;</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="Component_8hpp.html">Component/Component.hpp</a>&quot;</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160; </div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceBBM.html">BBM</a></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;{</div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="classBBM_1_1PositionComponent.html"> 13</a></span>&#160; <span class="keyword">class </span><a class="code" href="classBBM_1_1PositionComponent.html">PositionComponent</a> : <span class="keyword">public</span> <a class="code" href="classWAL_1_1Component.html">WAL::Component</a></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160; {</div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160; <span class="keyword">public</span>:</div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="classBBM_1_1PositionComponent.html#ad7d96ea0d42c2c7b2a640ca60dedc151"> 17</a></span>&#160; <a class="code" href="classBBM_1_1Vector3.html">Vector3f</a> <a class="code" href="classBBM_1_1PositionComponent.html#ad7d96ea0d42c2c7b2a640ca60dedc151">position</a>;</div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; <span class="keywordtype">float</span> <a class="code" href="classBBM_1_1PositionComponent.html#a19b915f21d5f0e1da40153b4c4161075">getX</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160; <span class="keywordtype">float</span> <a class="code" href="classBBM_1_1PositionComponent.html#aaa287e95c9378c119530be12ed40c27f">getY</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; <span class="keywordtype">float</span> <a class="code" href="classBBM_1_1PositionComponent.html#a2a8da5f34a8a48b850426587c9bdcd0e">getZ</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; </div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; <a class="code" href="classWAL_1_1Component.html">WAL::Component</a> *<a class="code" href="classBBM_1_1PositionComponent.html#ad2cd452275fa92914a38e36f597b50d9">clone</a>(<a class="code" href="classWAL_1_1Entity.html">WAL::Entity</a> &amp;entity) <span class="keyword">const override</span>;</div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; <span class="keyword">explicit</span> <a class="code" href="classBBM_1_1PositionComponent.html#ab3491bda5cc5fcf816bc754ee3abd8d9">PositionComponent</a>(<a class="code" href="classWAL_1_1Entity.html">WAL::Entity</a> &amp;entity);</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; <a class="code" href="classBBM_1_1PositionComponent.html#ab3491bda5cc5fcf816bc754ee3abd8d9">PositionComponent</a>(<a class="code" href="classWAL_1_1Entity.html">WAL::Entity</a> &amp;entity, <a class="code" href="classBBM_1_1Vector3.html">Vector3f</a> pos);</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <a class="code" href="classBBM_1_1PositionComponent.html#ab3491bda5cc5fcf816bc754ee3abd8d9">PositionComponent</a>(<a class="code" href="classWAL_1_1Entity.html">WAL::Entity</a> &amp;entity, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <a class="code" href="classBBM_1_1PositionComponent.html#ab3491bda5cc5fcf816bc754ee3abd8d9">PositionComponent</a>(<span class="keyword">const</span> <a class="code" href="classBBM_1_1PositionComponent.html">PositionComponent</a> &amp;) = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <a class="code" href="classBBM_1_1PositionComponent.html#aecb861e4c1e93affef6bd9eaff086fb7">~PositionComponent</a>() <span class="keyword">override</span> = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; <a class="code" href="classBBM_1_1PositionComponent.html">PositionComponent</a> &amp;<a class="code" href="classBBM_1_1PositionComponent.html#a3ebf0cdf0f6cabc5c1fb65123a11fe85">operator=</a>(<span class="keyword">const</span> <a class="code" href="classBBM_1_1PositionComponent.html">PositionComponent</a> &amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; };</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;} <span class="comment">// namespace WAL</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclassBBM_1_1PositionComponent_html_aaa287e95c9378c119530be12ed40c27f"><div class="ttname"><a href="classBBM_1_1PositionComponent.html#aaa287e95c9378c119530be12ed40c27f">BBM::PositionComponent::getY</a></div><div class="ttdeci">float getY() const</div><div class="ttdoc">Get the Y position of this entity.</div><div class="ttdef"><b>Definition:</b> PositionComponent.cpp:34</div></div>
<div class="ttc" id="aclassWAL_1_1Component_html"><div class="ttname"><a href="classWAL_1_1Component.html">WAL::Component</a></div><div class="ttdoc">Represent a single component of WAL.</div><div class="ttdef"><b>Definition:</b> Component.hpp:17</div></div>
<div class="ttc" id="asources_2Models_2Vector3_8hpp_html"><div class="ttname"><a href="sources_2Models_2Vector3_8hpp.html">Vector3.hpp</a></div></div>
<div class="ttc" id="anamespaceBBM_html"><div class="ttname"><a href="namespaceBBM.html">BBM</a></div><div class="ttdef"><b>Definition:</b> AnimationsComponent.cpp:9</div></div>
<div class="ttc" id="aclassBBM_1_1PositionComponent_html_a19b915f21d5f0e1da40153b4c4161075"><div class="ttname"><a href="classBBM_1_1PositionComponent.html#a19b915f21d5f0e1da40153b4c4161075">BBM::PositionComponent::getX</a></div><div class="ttdeci">float getX() const</div><div class="ttdoc">Get the X position of this entity.</div><div class="ttdef"><b>Definition:</b> PositionComponent.cpp:29</div></div>
<div class="ttc" id="aclassWAL_1_1Entity_html"><div class="ttname"><a href="classWAL_1_1Entity.html">WAL::Entity</a></div><div class="ttdoc">An entity of the WAL's ECS.</div><div class="ttdef"><b>Definition:</b> Entity.hpp:20</div></div>
<div class="ttc" id="aclassBBM_1_1PositionComponent_html_ad7d96ea0d42c2c7b2a640ca60dedc151"><div class="ttname"><a href="classBBM_1_1PositionComponent.html#ad7d96ea0d42c2c7b2a640ca60dedc151">BBM::PositionComponent::position</a></div><div class="ttdeci">Vector3f position</div><div class="ttdoc">Get the editable position of this entity.</div><div class="ttdef"><b>Definition:</b> PositionComponent.hpp:17</div></div>
<div class="ttc" id="aclassBBM_1_1Vector3_html"><div class="ttname"><a href="classBBM_1_1Vector3.html">BBM::Vector3&lt; float &gt;</a></div></div>
<div class="ttc" id="aComponent_8hpp_html"><div class="ttname"><a href="Component_8hpp.html">Component.hpp</a></div></div>
<div class="ttc" id="aclassBBM_1_1PositionComponent_html"><div class="ttname"><a href="classBBM_1_1PositionComponent.html">BBM::PositionComponent</a></div><div class="ttdoc">A basic position component.</div><div class="ttdef"><b>Definition:</b> PositionComponent.hpp:13</div></div>
<div class="ttc" id="aclassBBM_1_1PositionComponent_html_a2a8da5f34a8a48b850426587c9bdcd0e"><div class="ttname"><a href="classBBM_1_1PositionComponent.html#a2a8da5f34a8a48b850426587c9bdcd0e">BBM::PositionComponent::getZ</a></div><div class="ttdeci">float getZ() const</div><div class="ttdoc">Get the Z position of this entity.</div><div class="ttdef"><b>Definition:</b> PositionComponent.cpp:39</div></div>
<div class="ttc" id="aclassBBM_1_1PositionComponent_html_a3ebf0cdf0f6cabc5c1fb65123a11fe85"><div class="ttname"><a href="classBBM_1_1PositionComponent.html#a3ebf0cdf0f6cabc5c1fb65123a11fe85">BBM::PositionComponent::operator=</a></div><div class="ttdeci">PositionComponent &amp; operator=(const PositionComponent &amp;)=delete</div><div class="ttdoc">A position component is not assignable.</div></div>
<div class="ttc" id="aclassBBM_1_1PositionComponent_html_ab3491bda5cc5fcf816bc754ee3abd8d9"><div class="ttname"><a href="classBBM_1_1PositionComponent.html#ab3491bda5cc5fcf816bc754ee3abd8d9">BBM::PositionComponent::PositionComponent</a></div><div class="ttdeci">PositionComponent(WAL::Entity &amp;entity)</div><div class="ttdoc">Create a new PositionComponent linked to a specific entity.</div><div class="ttdef"><b>Definition:</b> PositionComponent.cpp:9</div></div>
<div class="ttc" id="aclassBBM_1_1PositionComponent_html_ad2cd452275fa92914a38e36f597b50d9"><div class="ttname"><a href="classBBM_1_1PositionComponent.html#ad2cd452275fa92914a38e36f597b50d9">BBM::PositionComponent::clone</a></div><div class="ttdeci">WAL::Component * clone(WAL::Entity &amp;entity) const override</div><div class="ttdoc">Clone a component for another or the same entity.</div><div class="ttdef"><b>Definition:</b> PositionComponent.cpp:24</div></div>
<div class="ttc" id="aclassBBM_1_1PositionComponent_html_aecb861e4c1e93affef6bd9eaff086fb7"><div class="ttname"><a href="classBBM_1_1PositionComponent.html#aecb861e4c1e93affef6bd9eaff086fb7">BBM::PositionComponent::~PositionComponent</a></div><div class="ttdeci">~PositionComponent() override=default</div><div class="ttdoc">A default destructor.</div></div>
<!-- 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.8.17
</small></address>
</body>
</html>