\hypertarget{RigidbodyComponent_8hpp_source}{}\doxysection{Rigidbody\+Component.\+hpp}
\label{RigidbodyComponent_8hpp_source}\index{include/RigidbodyComponent.hpp@{include/RigidbodyComponent.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ RIGIDBODYCOMPONENT\_HPP}}
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ RIGIDBODYCOMPONENT\_HPP}}
\DoxyCodeLine{00003\ }
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ "{}IPhysicsComponent.hpp"{}}}
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ "{}TransformComponent.hpp"{}}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ "{}TinyMath.hpp"{}}}
\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ <string>}}
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00013\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classRigidbodyComponent}{RigidbodyComponent}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{classIPhysicsComponent}{IPhysicsComponent}}\ \{}
\DoxyCodeLine{00014\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00025\ \ \ \ \ \mbox{\hyperlink{classRigidbodyComponent}{RigidbodyComponent}}(\mbox{\hyperlink{classTransformComponent}{TransformComponent}}*\ pos,\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ dim,\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ vel,\ \textcolor{keywordtype}{float}\ m,\ }
\DoxyCodeLine{00026\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ elastic\ =\ \textcolor{keyword}{false},\ \textcolor{keywordtype}{bool}\ grav\ =\ \textcolor{keyword}{false});}
\DoxyCodeLine{00030\ \ \ \ \ \mbox{\hyperlink{classRigidbodyComponent_afc85f13b28ca4dd1377fbbd2c9ddfd32}{\string~RigidbodyComponent}}();}
\DoxyCodeLine{00031\ }
\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classRigidbodyComponent_a1883fe26d2113b4aa5e74f21c0b49eab}{ApplyForce}}(\mbox{\hyperlink{structVec2D}{Vec2D}}\ force)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00033\ }
\DoxyCodeLine{00034\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classRigidbodyComponent_ae30aa822d90c6426fdbb96ec05a37d28}{ApplyAcceleration}}(\mbox{\hyperlink{structVec2D}{Vec2D}}\ acceleration)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00035\ }
\DoxyCodeLine{00036\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classRigidbodyComponent_a7dafbd3c40121afeb2e30ad99d9be4ca}{ApplyVelocity}}()\ \textcolor{keyword}{override};}
\DoxyCodeLine{00037\ }
\DoxyCodeLine{00042\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classRigidbodyComponent_afc82759bee18cd1bd0cc90d7482307c1}{Update}}(SDL\_Event\ e,\ \textcolor{keywordtype}{int}\ frame,\ std::vector<std::string>\ broadcastList)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00043\ }
\DoxyCodeLine{00044\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classRigidbodyComponent_a397796f2f8deb197ee0f0d96eb6ba23d}{ShowComponentEditor}}(\textcolor{keywordtype}{bool}*\ showEditor)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00045\ }
\DoxyCodeLine{00046\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}*\ \mbox{\hyperlink{classRigidbodyComponent_a4e89f2337c4ebe6f720bdad08ece917b}{ComponentTypeName}}()\textcolor{keyword}{\ override\ }\{\textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Rigidbody\ Component"{}};\}}
\DoxyCodeLine{00047\ }
\DoxyCodeLine{00048\ \ \ \ \ \textcolor{comment}{//\ SETTERS}}
\DoxyCodeLine{00049\ }
\DoxyCodeLine{00050\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classRigidbodyComponent_a5c6caca7d911fb61f00a2a35de0f62ef}{SetVelocity}}(\mbox{\hyperlink{structVec2D}{Vec2D}}\ vel)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00051\ }
\DoxyCodeLine{00052\ \ \ \ \ \textcolor{comment}{//\ GETTERS}}
\DoxyCodeLine{00053\ }
\DoxyCodeLine{00057\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classRigidbodyComponent_a73b252b29fbb76a6354b0c56aebe36f9}{IsKinematic}}()\ \textcolor{keyword}{override};}
\DoxyCodeLine{00058\ }
\DoxyCodeLine{00059\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classRigidbodyComponent_adc67765c449d8cde1c9dcdd279b97194}{IsElastic}}()\ \textcolor{keyword}{override};}
\DoxyCodeLine{00060\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classRigidbodyComponent_aa4d0c27e47cef8b74058d70a5054eb31}{UsesGravity}}()\ \textcolor{keyword}{override};}
\DoxyCodeLine{00061\ \ \ \ \ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \mbox{\hyperlink{classRigidbodyComponent_aca2cbab492d09175e0f2aa1e87f62f1f}{GetVelocity}}()\ \textcolor{keyword}{override};}
\DoxyCodeLine{00062\ \ \ \ \ \textcolor{keywordtype}{float}\ \mbox{\hyperlink{classRigidbodyComponent_a96b7ca6de81de1347b2daf4f9c32a66b}{GetMass}}()\ \textcolor{keyword}{override};}
\DoxyCodeLine{00063\ }
\DoxyCodeLine{00064\ \textcolor{keyword}{private}:\ \ \ \ }
\DoxyCodeLine{00065\ \ \ \ \ \mbox{\hyperlink{structVec2D}{Vec2D}}\ velocity;}
\DoxyCodeLine{00066\ \ \ \ \ \textcolor{keywordtype}{float}\ mass;}
\DoxyCodeLine{00067\ \ \ \ \ \textcolor{keywordtype}{bool}\ isElastic;}
\DoxyCodeLine{00068\ \ \ \ \ \textcolor{keywordtype}{bool}\ usesGravity;}
\DoxyCodeLine{00069\ \};}
\DoxyCodeLine{00070\ }
\DoxyCodeLine{00071\ \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
