<?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="d5/d9a/PhysicsTests_8cpp" kind="file" language="C++">
    <compoundname>PhysicsTests.cpp</compoundname>
    <includes local="no">vector</includes>
    <includes local="no">iostream</includes>
    <includes refid="d1/d20/PhysicsEngine_8hpp" local="yes">PhysicsEngine.hpp</includes>
    <includes refid="d5/d69/IPhysicsComponent_8hpp" local="yes">IPhysicsComponent.hpp</includes>
    <includes refid="d8/d16/RigidbodyComponent_8hpp" local="yes">RigidbodyComponent.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="2" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="5">
        <label>IPhysicsComponent.hpp</label>
        <link refid="d5/d69/IPhysicsComponent_8hpp_source"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
      </node>
      <node id="4">
        <label>PhysicsEngine.hpp</label>
        <link refid="d1/d20/PhysicsEngine_8hpp_source"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="17">
        <label>RigidbodyComponent.hpp</label>
        <link refid="d8/d16/RigidbodyComponent_8hpp_source"/>
        <childnode refid="5" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
      </node>
      <node id="14">
        <label>TinyMath.hpp</label>
        <link refid="d9/dec/TinyMath_8hpp_source"/>
        <childnode refid="15" relation="include">
        </childnode>
        <childnode refid="16" relation="include">
        </childnode>
      </node>
      <node id="13">
        <label>TransformComponent.hpp</label>
        <link refid="d9/da8/TransformComponent_8hpp_source"/>
        <childnode refid="14" relation="include">
        </childnode>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
      </node>
      <node id="1">
        <label>src/PhysicsTests.cpp</label>
        <link refid="d5/d9a/PhysicsTests_8cpp"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
        <childnode refid="17" relation="include">
        </childnode>
      </node>
      <node id="7">
        <label>SDL.h</label>
      </node>
      <node id="12">
        <label>algorithm</label>
      </node>
      <node id="15">
        <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="3">
        <label>iostream</label>
      </node>
      <node id="16">
        <label>ostream</label>
      </node>
      <node id="11">
        <label>string</label>
      </node>
      <node id="2">
        <label>vector</label>
      </node>
    </incdepgraph>
      <sectiondef kind="define">
      <memberdef kind="define" id="d5/d9a/PhysicsTests_8cpp_1a636c65933a9dc4c052f2ab0e61b5779b" prot="public" static="no">
        <name>TESTNUM</name>
        <initializer>8</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Note: To run tests, uncomment main function at the bottom of this file and comment out the lab main function </para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="src/PhysicsTests.cpp" line="12" column="9" bodyfile="src/PhysicsTests.cpp" bodystart="12" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="d5/d9a/PhysicsTests_8cpp_1aced509290c3eccd404f40a1953175427" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool</type>
        <definition>bool TestOne</definition>
        <argsstring>()</argsstring>
        <name>TestOne</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="src/PhysicsTests.cpp" line="15" column="6" bodyfile="src/PhysicsTests.cpp" bodystart="15" bodyend="22"/>
      </memberdef>
      <memberdef kind="function" id="d5/d9a/PhysicsTests_8cpp_1a1e9db4c27a227247e5e83e4c1b94b05e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool</type>
        <definition>bool TestTwo</definition>
        <argsstring>()</argsstring>
        <name>TestTwo</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="src/PhysicsTests.cpp" line="24" column="6" bodyfile="src/PhysicsTests.cpp" bodystart="24" bodyend="31"/>
      </memberdef>
      <memberdef kind="function" id="d5/d9a/PhysicsTests_8cpp_1a0c8fc3598de5715a7810afaf9f40b8ee" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool</type>
        <definition>bool TestThree</definition>
        <argsstring>()</argsstring>
        <name>TestThree</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="src/PhysicsTests.cpp" line="33" column="6" bodyfile="src/PhysicsTests.cpp" bodystart="33" bodyend="40"/>
      </memberdef>
      <memberdef kind="function" id="d5/d9a/PhysicsTests_8cpp_1af8241aa6a7ba158387bc85ba63d73077" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool</type>
        <definition>bool TestFour</definition>
        <argsstring>()</argsstring>
        <name>TestFour</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="src/PhysicsTests.cpp" line="42" column="6" bodyfile="src/PhysicsTests.cpp" bodystart="42" bodyend="49"/>
      </memberdef>
      <memberdef kind="function" id="d5/d9a/PhysicsTests_8cpp_1a1aed62f60fddb762665b918bf0dff542" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool</type>
        <definition>bool TestFive</definition>
        <argsstring>()</argsstring>
        <name>TestFive</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="src/PhysicsTests.cpp" line="52" column="6" bodyfile="src/PhysicsTests.cpp" bodystart="52" bodyend="58"/>
      </memberdef>
      <memberdef kind="function" id="d5/d9a/PhysicsTests_8cpp_1a0af65e76b4c4f3f9d4560dd6a4fe350f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool</type>
        <definition>bool TestSix</definition>
        <argsstring>()</argsstring>
        <name>TestSix</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="src/PhysicsTests.cpp" line="60" column="6" bodyfile="src/PhysicsTests.cpp" bodystart="60" bodyend="67"/>
      </memberdef>
      <memberdef kind="function" id="d5/d9a/PhysicsTests_8cpp_1a03053d76ae48ee205ed38eff52a6983f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool</type>
        <definition>bool TestSeven</definition>
        <argsstring>()</argsstring>
        <name>TestSeven</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="src/PhysicsTests.cpp" line="69" column="6" bodyfile="src/PhysicsTests.cpp" bodystart="69" bodyend="76"/>
      </memberdef>
      <memberdef kind="function" id="d5/d9a/PhysicsTests_8cpp_1a34ff17f244eb668849939abd5317af0d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool</type>
        <definition>bool TestEight</definition>
        <argsstring>()</argsstring>
        <name>TestEight</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="src/PhysicsTests.cpp" line="81" column="6" bodyfile="src/PhysicsTests.cpp" bodystart="81" bodyend="104"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="preprocessor">#include<sp/>&lt;vector&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;iostream&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;PhysicsEngine.hpp&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;IPhysicsComponent.hpp&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;RigidbodyComponent.hpp&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight></codeline>
<codeline lineno="12"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TESTNUM<sp/>8</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight></codeline>
<codeline lineno="14"><highlight class="normal"></highlight><highlight class="comment">//<sp/>COLLISION<sp/>DETECTION<sp/>TESTS<sp/>:<sp/>IPhysicsComponent</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="15"><highlight class="normal"></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>TestOne(){</highlight></codeline>
<codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>*<sp/>positionA<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>(0,0);</highlight></codeline>
<codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>*<sp/>positionB<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>(1,2);</highlight></codeline>
<codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d9/d15/classIPhysicsComponent" kindref="compound">IPhysicsComponent</ref>*<sp/>componentA<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d9/d15/classIPhysicsComponent" kindref="compound">IPhysicsComponent</ref>(positionA,<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(2,2));</highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d9/d15/classIPhysicsComponent" kindref="compound">IPhysicsComponent</ref>*<sp/>componentB<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d9/d15/classIPhysicsComponent" kindref="compound">IPhysicsComponent</ref>(positionB,<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(2,2));</highlight></codeline>
<codeline lineno="20"><highlight class="normal"></highlight></codeline>
<codeline lineno="21"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>componentA-&gt;<ref refid="d9/d15/classIPhysicsComponent_1aae80e0691898c61495f43a7bc2f0e494" kindref="member">IsColliding</ref>(componentB);</highlight></codeline>
<codeline lineno="22"><highlight class="normal">}</highlight></codeline>
<codeline lineno="23"><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>TestTwo(){</highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>*<sp/>positionA<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>(0,0);</highlight></codeline>
<codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>*<sp/>positionB<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>(2,0);</highlight></codeline>
<codeline lineno="27"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d9/d15/classIPhysicsComponent" kindref="compound">IPhysicsComponent</ref>*<sp/>componentA<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d9/d15/classIPhysicsComponent" kindref="compound">IPhysicsComponent</ref>(positionA,<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(2,2));</highlight></codeline>
<codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d9/d15/classIPhysicsComponent" kindref="compound">IPhysicsComponent</ref>*<sp/>componentB<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d9/d15/classIPhysicsComponent" kindref="compound">IPhysicsComponent</ref>(positionB,<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(2,2));</highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>componentA-&gt;<ref refid="d9/d15/classIPhysicsComponent_1aae80e0691898c61495f43a7bc2f0e494" kindref="member">IsColliding</ref>(componentB);</highlight></codeline>
<codeline lineno="31"><highlight class="normal">}</highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>TestThree(){</highlight></codeline>
<codeline lineno="34"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>*<sp/>positionA<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>(1,2);</highlight></codeline>
<codeline lineno="35"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>*<sp/>positionB<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>(0,0);</highlight></codeline>
<codeline lineno="36"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d9/d15/classIPhysicsComponent" kindref="compound">IPhysicsComponent</ref>*<sp/>componentA<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d9/d15/classIPhysicsComponent" kindref="compound">IPhysicsComponent</ref>(positionA,<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(2,2));</highlight></codeline>
<codeline lineno="37"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d9/d15/classIPhysicsComponent" kindref="compound">IPhysicsComponent</ref>*<sp/>componentB<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d9/d15/classIPhysicsComponent" kindref="compound">IPhysicsComponent</ref>(positionB,<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(2,2));</highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>componentA-&gt;<ref refid="d9/d15/classIPhysicsComponent_1aae80e0691898c61495f43a7bc2f0e494" kindref="member">IsColliding</ref>(componentB);</highlight></codeline>
<codeline lineno="40"><highlight class="normal">}</highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>TestFour(){</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>*<sp/>positionA<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>(0,0);</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>*<sp/>positionB<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>(-2,2);</highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d9/d15/classIPhysicsComponent" kindref="compound">IPhysicsComponent</ref>*<sp/>componentA<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d9/d15/classIPhysicsComponent" kindref="compound">IPhysicsComponent</ref>(positionA,<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(2,2));</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d9/d15/classIPhysicsComponent" kindref="compound">IPhysicsComponent</ref>*<sp/>componentB<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d9/d15/classIPhysicsComponent" kindref="compound">IPhysicsComponent</ref>(positionB,<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(2,2));</highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>componentA-&gt;<ref refid="d9/d15/classIPhysicsComponent_1aae80e0691898c61495f43a7bc2f0e494" kindref="member">IsColliding</ref>(componentB);</highlight></codeline>
<codeline lineno="49"><highlight class="normal">}</highlight></codeline>
<codeline lineno="50"><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight><highlight class="comment">//<sp/>SIMPLE<sp/>MOVEMENT<sp/>TESTS<sp/>:<sp/>RigidbodyComponent</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>TestFive(){</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>*<sp/>position<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>(0,0);</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="de/d87/classRigidbodyComponent" kindref="compound">RigidbodyComponent</ref>*<sp/>body<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="de/d87/classRigidbodyComponent" kindref="compound">RigidbodyComponent</ref>(position,<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(3,3),<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(1,0),<sp/>1);</highlight></codeline>
<codeline lineno="55"><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/>body-&gt;<ref refid="de/d87/classRigidbodyComponent_1a7dafbd3c40121afeb2e30ad99d9be4ca" kindref="member">ApplyVelocity</ref>();</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>position-&gt;<ref refid="d2/d0a/classTransformComponent_1a5452c308a26521441745d3edc1ab5d4d" kindref="member">getPos</ref>().x<sp/>==<sp/>1<sp/>&amp;&amp;<sp/>position-&gt;<ref refid="d2/d0a/classTransformComponent_1a5452c308a26521441745d3edc1ab5d4d" kindref="member">getPos</ref>().y<sp/>==<sp/>0;</highlight></codeline>
<codeline lineno="58"><highlight class="normal">}</highlight></codeline>
<codeline lineno="59"><highlight class="normal"></highlight></codeline>
<codeline lineno="60"><highlight class="normal"></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>TestSix(){</highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>*<sp/>position<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>(2,3);</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="de/d87/classRigidbodyComponent" kindref="compound">RigidbodyComponent</ref>*<sp/>body<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="de/d87/classRigidbodyComponent" kindref="compound">RigidbodyComponent</ref>(position,<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(3,3),<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(1,0),<sp/>1);</highlight></codeline>
<codeline lineno="63"><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/>body-&gt;<ref refid="de/d87/classRigidbodyComponent_1ae30aa822d90c6426fdbb96ec05a37d28" kindref="member">ApplyAcceleration</ref>(<ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(2,1));</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/>body-&gt;<ref refid="de/d87/classRigidbodyComponent_1a7dafbd3c40121afeb2e30ad99d9be4ca" kindref="member">ApplyVelocity</ref>();</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>position-&gt;<ref refid="d2/d0a/classTransformComponent_1a5452c308a26521441745d3edc1ab5d4d" kindref="member">getPos</ref>().x<sp/>==<sp/>5<sp/>&amp;&amp;<sp/>position-&gt;<ref refid="d2/d0a/classTransformComponent_1a5452c308a26521441745d3edc1ab5d4d" kindref="member">getPos</ref>().y<sp/>==<sp/>4;</highlight></codeline>
<codeline lineno="67"><highlight class="normal">}</highlight></codeline>
<codeline lineno="68"><highlight class="normal"></highlight></codeline>
<codeline lineno="69"><highlight class="normal"></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>TestSeven(){</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>*<sp/>position<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>(2,3);</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="de/d87/classRigidbodyComponent" kindref="compound">RigidbodyComponent</ref>*<sp/>body<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="de/d87/classRigidbodyComponent" kindref="compound">RigidbodyComponent</ref>(position,<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(3,3),<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(1,0),<sp/>2);</highlight></codeline>
<codeline lineno="72"><highlight class="normal"></highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/>body-&gt;<ref refid="de/d87/classRigidbodyComponent_1a1883fe26d2113b4aa5e74f21c0b49eab" kindref="member">ApplyForce</ref>(<ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(4,2));</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/>body-&gt;<ref refid="de/d87/classRigidbodyComponent_1a7dafbd3c40121afeb2e30ad99d9be4ca" kindref="member">ApplyVelocity</ref>();</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>position-&gt;<ref refid="d2/d0a/classTransformComponent_1a5452c308a26521441745d3edc1ab5d4d" kindref="member">getPos</ref>().x<sp/>==<sp/>5<sp/>&amp;&amp;<sp/>position-&gt;<ref refid="d2/d0a/classTransformComponent_1a5452c308a26521441745d3edc1ab5d4d" kindref="member">getPos</ref>().y<sp/>==<sp/>4;</highlight></codeline>
<codeline lineno="76"><highlight class="normal">}</highlight></codeline>
<codeline lineno="77"><highlight class="normal"></highlight></codeline>
<codeline lineno="78"><highlight class="normal"></highlight><highlight class="comment">//<sp/>PHYSICS<sp/>ENGINE<sp/>TESTS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="79"><highlight class="normal"></highlight></codeline>
<codeline lineno="80"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Simplest<sp/>collision<sp/>test</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="81"><highlight class="normal"></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>TestEight(){</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="db/df5/classPhysicsEngine" kindref="compound">PhysicsEngine</ref>*<sp/>engine<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="db/df5/classPhysicsEngine" kindref="compound">PhysicsEngine</ref>();</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>*<sp/>posA<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>(0,0);</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="de/d87/classRigidbodyComponent" kindref="compound">RigidbodyComponent</ref>*<sp/>bodyA<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="de/d87/classRigidbodyComponent" kindref="compound">RigidbodyComponent</ref>(posA,<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(1,1),<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(1,0),<sp/>1,<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">,<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>*<sp/>posB<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>(2,0);</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="de/d87/classRigidbodyComponent" kindref="compound">RigidbodyComponent</ref>*<sp/>bodyB<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="de/d87/classRigidbodyComponent" kindref="compound">RigidbodyComponent</ref>(posB,<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(1,1),<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(0,0),<sp/>1,<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">,<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/>engine-&gt;<ref refid="db/df5/classPhysicsEngine_1aaa69a81964d980456a6ac48816d2f756" kindref="member">AddComponent</ref>(bodyA);</highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/>engine-&gt;<ref refid="db/df5/classPhysicsEngine_1aaa69a81964d980456a6ac48816d2f756" kindref="member">AddComponent</ref>(bodyB);</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/>engine-&gt;<ref refid="db/df5/classPhysicsEngine_1a30d283b6067980e42765340dea6eb62a" kindref="member">Update</ref>();</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(bodyA-&gt;<ref refid="d9/d15/classIPhysicsComponent_1abfaa678eb1c7312e9bf098bc1473f794" kindref="member">GetPosition</ref>().x<sp/>!=<sp/>1){</highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;Test<sp/>Eight:<sp/>Engine<sp/>failed<sp/>to<sp/>move<sp/>body<sp/>A.<sp/>Current<sp/>x<sp/>position<sp/>is<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>bodyA-&gt;<ref refid="d9/d15/classIPhysicsComponent_1abfaa678eb1c7312e9bf098bc1473f794" kindref="member">GetPosition</ref>().x<sp/>&lt;&lt;<sp/>std::endl;</highlight></codeline>
<codeline lineno="92"><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">false</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/>engine-&gt;<ref refid="db/df5/classPhysicsEngine_1a30d283b6067980e42765340dea6eb62a" kindref="member">Update</ref>();</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(bodyA-&gt;<ref refid="de/d87/classRigidbodyComponent_1aca2cbab492d09175e0f2aa1e87f62f1f" kindref="member">GetVelocity</ref>().x<sp/>!=<sp/>0){</highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;Test<sp/>Eight:<sp/>Engine<sp/>failed<sp/>to<sp/>bounce<sp/>body<sp/>A.<sp/>Current<sp/>velocity<sp/>is:<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>bodyA-&gt;<ref refid="de/d87/classRigidbodyComponent_1aca2cbab492d09175e0f2aa1e87f62f1f" kindref="member">GetVelocity</ref>().x<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>bodyA-&gt;<ref refid="de/d87/classRigidbodyComponent_1aca2cbab492d09175e0f2aa1e87f62f1f" kindref="member">GetVelocity</ref>().y<sp/>&lt;&lt;<sp/>std::endl;</highlight></codeline>
<codeline lineno="97"><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">false</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(bodyB-&gt;<ref refid="de/d87/classRigidbodyComponent_1aca2cbab492d09175e0f2aa1e87f62f1f" kindref="member">GetVelocity</ref>().x<sp/>!=<sp/>1){</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;Test<sp/>Eight:<sp/>Engine<sp/>failed<sp/>to<sp/>bounce<sp/>body<sp/>B.<sp/>Current<sp/>velocity<sp/>is:<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>bodyB-&gt;<ref refid="de/d87/classRigidbodyComponent_1aca2cbab492d09175e0f2aa1e87f62f1f" kindref="member">GetVelocity</ref>().x<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>bodyB-&gt;<ref refid="de/d87/classRigidbodyComponent_1aca2cbab492d09175e0f2aa1e87f62f1f" kindref="member">GetVelocity</ref>().y<sp/>&lt;&lt;<sp/>std::endl;</highlight></codeline>
<codeline lineno="101"><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">false</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>bodyA-&gt;<ref refid="d9/d15/classIPhysicsComponent_1abfaa678eb1c7312e9bf098bc1473f794" kindref="member">GetPosition</ref>().x<sp/>==<sp/>1<sp/>&amp;&amp;<sp/>bodyB-&gt;<ref refid="d9/d15/classIPhysicsComponent_1abfaa678eb1c7312e9bf098bc1473f794" kindref="member">GetPosition</ref>().x<sp/>==<sp/>3;</highlight></codeline>
<codeline lineno="104"><highlight class="normal">}</highlight></codeline>
<codeline lineno="105"><highlight class="normal"></highlight></codeline>
<codeline lineno="106"><highlight class="normal"></highlight><highlight class="comment">//<sp/>int<sp/>main(){</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="107"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/>int<sp/>correct<sp/>=<sp/>0;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="108"><highlight class="normal"></highlight></codeline>
<codeline lineno="109"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/>bool(*(tests[TESTNUM]))()<sp/>=<sp/>{TestOne,</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="110"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>TestTwo,</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="111"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>TestThree,</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="112"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>TestFour,</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="113"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>TestFive,</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="114"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>TestSix,</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>TestSeven,</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="116"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>TestEight};</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="117"><highlight class="normal"></highlight></codeline>
<codeline lineno="118"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/>for(int<sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>TESTNUM;<sp/>++i){</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="119"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if(tests[i]()){</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="120"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>++correct;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="121"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/>else<sp/>{</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="122"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::cout<sp/>&lt;&lt;<sp/>&quot;Test<sp/>number<sp/>&quot;<sp/>&lt;&lt;<sp/>i+1<sp/>&lt;&lt;<sp/>&quot;<sp/>failed&quot;<sp/>&lt;&lt;<sp/>std::endl;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="123"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="124"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="125"><highlight class="normal"></highlight></codeline>
<codeline lineno="126"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/>std::cout<sp/>&lt;&lt;<sp/>correct<sp/>&lt;&lt;<sp/>&quot;<sp/>tests<sp/>passed<sp/>out<sp/>of<sp/>&quot;<sp/>&lt;&lt;<sp/>TESTNUM<sp/>&lt;&lt;<sp/>std::endl;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="127"><highlight class="normal"></highlight></codeline>
<codeline lineno="128"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/>return<sp/>0;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="129"><highlight class="normal"></highlight><highlight class="comment">//<sp/>}</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="130"><highlight class="normal"></highlight></codeline>
<codeline lineno="131"><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="src/PhysicsTests.cpp"/>
  </compounddef>
</doxygen>
