<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.9.7" xml:lang="en-US">
  <compounddef id="da/d4e/TransformComponent_8cpp" kind="file" language="C++">
    <compoundname>TransformComponent.cpp</compoundname>
    <includes refid="d9/da8/TransformComponent_8hpp" local="yes">TransformComponent.hpp</includes>
    <incdepgraph>
      <node id="6">
        <label>Component.hpp</label>
        <link refid="df/d1f/Component_8hpp_source"/>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
      </node>
      <node id="3">
        <label>TinyMath.hpp</label>
        <link refid="d9/dec/TinyMath_8hpp_source"/>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>TransformComponent.hpp</label>
        <link refid="d9/da8/TransformComponent_8hpp_source"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="1">
        <label>src/TransformComponent.cpp</label>
        <link refid="da/d4e/TransformComponent_8cpp"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="7">
        <label>SDL.h</label>
      </node>
      <node id="13">
        <label>algorithm</label>
      </node>
      <node id="4">
        <label>cmath</label>
      </node>
      <node id="8">
        <label>imgui.h</label>
      </node>
      <node id="9">
        <label>imgui_impl_sdl2.h</label>
      </node>
      <node id="10">
        <label>imgui_impl_sdlrenderer.h</label>
      </node>
      <node id="5">
        <label>ostream</label>
      </node>
      <node id="12">
        <label>string</label>
      </node>
      <node id="11">
        <label>vector</label>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="da/d4e/TransformComponent_8cpp_1a51060bc96899e290fc67c62cd10a0f7c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool</type>
        <definition>bool operator==</definition>
        <argsstring>(const TransformComponent &amp;c1, const TransformComponent &amp;c2)</argsstring>
        <name>operator==</name>
        <param>
          <type>const <ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref> &amp;</type>
          <declname>c1</declname>
        </param>
        <param>
          <type>const <ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref> &amp;</type>
          <declname>c2</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="src/TransformComponent.cpp" line="26" column="6" bodyfile="src/TransformComponent.cpp" bodystart="26" bodyend="35"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="preprocessor">#include<sp/>&quot;TransformComponent.hpp&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight></codeline>
<codeline lineno="3" refid="d2/d0a/classTransformComponent_1a461808701b999d0e0e14c856f7ab41c1" refkind="member"><highlight class="normal"><ref refid="d2/d0a/classTransformComponent_1a461808701b999d0e0e14c856f7ab41c1" kindref="member">TransformComponent::TransformComponent</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>_x,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>_y)<sp/>{</highlight></codeline>
<codeline lineno="4"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>v<sp/>=<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(_x,<sp/>_y);</highlight></codeline>
<codeline lineno="5"><highlight class="normal"><sp/><sp/><sp/><sp/>position<sp/>=<sp/>v;</highlight></codeline>
<codeline lineno="6"><highlight class="normal">}</highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight></codeline>
<codeline lineno="8" refid="d2/d0a/classTransformComponent_1aa3cd2785878a82d02103778d04761a32" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent_1aa3cd2785878a82d02103778d04761a32" kindref="member">TransformComponent::SetTransform</ref>(<ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>_pos)<sp/>{</highlight></codeline>
<codeline lineno="9"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>printf(&quot;Position:<sp/>X:<sp/>%f,<sp/>Y:<sp/>%f&quot;,<sp/>position.x,<sp/>position.y);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="10"><highlight class="normal"><sp/><sp/><sp/><sp/>position<sp/>=<sp/>_pos;</highlight></codeline>
<codeline lineno="11"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>printf(&quot;After<sp/>Position:<sp/>X:<sp/>%f,<sp/>Y:<sp/>%f<sp/>\n&quot;,<sp/>position.x,<sp/>position.y);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="12"><highlight class="normal">}</highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight></codeline>
<codeline lineno="14" refid="d2/d0a/classTransformComponent_1a9cfb03b06888fc489be5d2751a6d4543" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent_1aa3cd2785878a82d02103778d04761a32" kindref="member">TransformComponent::SetTransform</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>_x,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>_y)<sp/>{</highlight></codeline>
<codeline lineno="15"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>v<sp/>=<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(_x,<sp/>_y);</highlight></codeline>
<codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/>position<sp/>=<sp/>v;</highlight></codeline>
<codeline lineno="17"><highlight class="normal">}</highlight></codeline>
<codeline lineno="18"><highlight class="normal"></highlight></codeline>
<codeline lineno="19" refid="d2/d0a/classTransformComponent_1a5452c308a26521441745d3edc1ab5d4d" refkind="member"><highlight class="normal"><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/><ref refid="d2/d0a/classTransformComponent_1a5452c308a26521441745d3edc1ab5d4d" kindref="member">TransformComponent::getPos</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>position;</highlight></codeline>
<codeline lineno="21"><highlight class="normal">}</highlight></codeline>
<codeline lineno="22"><highlight class="normal"></highlight></codeline>
<codeline lineno="23" refid="d2/d0a/classTransformComponent_1a37d5d34a3695eafc8b8cbf37905e756f" refkind="member"><highlight class="normal"><ref refid="d2/d0a/classTransformComponent_1a37d5d34a3695eafc8b8cbf37905e756f" kindref="member">TransformComponent::~TransformComponent</ref>()<sp/>{</highlight></codeline>
<codeline lineno="24"><highlight class="normal">}</highlight></codeline>
<codeline lineno="25"><highlight class="normal"></highlight></codeline>
<codeline lineno="26"><highlight class="normal"></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>operator==(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref><sp/>&amp;c1,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref><sp/>&amp;c2)<sp/>{</highlight></codeline>
<codeline lineno="27"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>cV1<sp/>=<sp/>c1.<ref refid="d2/d0a/classTransformComponent_1a5452c308a26521441745d3edc1ab5d4d" kindref="member">getPos</ref>();</highlight></codeline>
<codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>cV2<sp/>=<sp/>c2.<ref refid="d2/d0a/classTransformComponent_1a5452c308a26521441745d3edc1ab5d4d" kindref="member">getPos</ref>();</highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fabs(cV1.x<sp/>-<sp/>cV2.x)<sp/>&gt;<sp/>0.00001<sp/>||<sp/>fabs(cV1.y<sp/>-<sp/>cV2.y)<sp/>&gt;<sp/>0.00001<sp/>||<sp/>fabs(cV1.w<sp/>-<sp/>cV2.w)<sp/>&gt;<sp/>0.00001)<sp/>{</highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="35"><highlight class="normal">}</highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight></codeline>
<codeline lineno="37" refid="d2/d0a/classTransformComponent_1ae808ac3be0106babc97e92afb8f93a96" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent_1ae808ac3be0106babc97e92afb8f93a96" kindref="member">TransformComponent::Update</ref>(SDL_Event<sp/>e,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>frame,<sp/>std::vector&lt;std::string&gt;<sp/>broadcastList)<sp/>{</highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d8/d6b/classComponent_1aea8f0f460a62d86183020bd667b6cbf0" kindref="member">ParseAndUpdateBroadcast</ref>(broadcastList);</highlight></codeline>
<codeline lineno="39"><highlight class="normal">}</highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight></codeline>
<codeline lineno="41" refid="d2/d0a/classTransformComponent_1aedc094eb1922c3cfe116e6d67191400e" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent_1aedc094eb1922c3cfe116e6d67191400e" kindref="member">TransformComponent::Render</ref>(SDL_Renderer<sp/>*ren)<sp/>{</highlight></codeline>
<codeline lineno="42"><highlight class="normal">}</highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight></codeline>
<codeline lineno="44" refid="d2/d0a/classTransformComponent_1a2db75c6b70fcf13c086f02ac41953057" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent_1a2db75c6b70fcf13c086f02ac41953057" kindref="member">TransformComponent::ShowComponentEditor</ref>(</highlight><highlight class="keywordtype">bool</highlight><highlight class="normal">*<sp/>showEditor){</highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/>ImGuiWindowFlags<sp/>window_flags<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/>window_flags<sp/>|=<sp/>ImGuiWindowFlags_MenuBar;</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/>window_flags<sp/>|=<sp/>ImGuiWindowFlags_NoCollapse;</highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(ImGui::Begin(</highlight><highlight class="stringliteral">&quot;Editing<sp/>Transform<sp/>Component&quot;</highlight><highlight class="normal">,<sp/>showEditor,<sp/>window_flags)){</highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ImGui::InputFloat(</highlight><highlight class="stringliteral">&quot;X<sp/>Position&quot;</highlight><highlight class="normal">,<sp/>&amp;position.x);</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ImGui::InputFloat(</highlight><highlight class="stringliteral">&quot;Y<sp/>Position&quot;</highlight><highlight class="normal">,<sp/>&amp;position.y);</highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ImGui::End();</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="54"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="src/TransformComponent.cpp"/>
  </compounddef>
</doxygen>
