\hypertarget{classRigidbodyComponent}{}\doxysection{Rigidbody\+Component Class Reference}
\label{classRigidbodyComponent}\index{RigidbodyComponent@{RigidbodyComponent}}


{\ttfamily \#include $<$Rigidbody\+Component.\+hpp$>$}



Inheritance diagram for Rigidbody\+Component\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=202pt]{db/df4/classRigidbodyComponent__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for Rigidbody\+Component\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{d4/d40/classRigidbodyComponent__coll__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classRigidbodyComponent_a870828e81a3946f12bc09d49848072af}{Rigidbody\+Component}} (\mbox{\hyperlink{classTransformComponent}{Transform\+Component}} $\ast$pos, \mbox{\hyperlink{structVec2D}{Vec2D}} dim, \mbox{\hyperlink{structVec2D}{Vec2D}} vel, float m, bool elastic=false, bool grav=false)
\item 
\mbox{\hyperlink{classRigidbodyComponent_afc85f13b28ca4dd1377fbbd2c9ddfd32}{$\sim$\+Rigidbody\+Component}} ()
\item 
void \mbox{\hyperlink{classRigidbodyComponent_a1883fe26d2113b4aa5e74f21c0b49eab}{Apply\+Force}} (\mbox{\hyperlink{structVec2D}{Vec2D}} force) override
\item 
void \mbox{\hyperlink{classRigidbodyComponent_ae30aa822d90c6426fdbb96ec05a37d28}{Apply\+Acceleration}} (\mbox{\hyperlink{structVec2D}{Vec2D}} acceleration) override
\item 
void \mbox{\hyperlink{classRigidbodyComponent_a7dafbd3c40121afeb2e30ad99d9be4ca}{Apply\+Velocity}} () override
\item 
void \mbox{\hyperlink{classRigidbodyComponent_afc82759bee18cd1bd0cc90d7482307c1}{Update}} (SDL\+\_\+\+Event e, int frame, std\+::vector$<$ std\+::string $>$ broadcast\+List) override
\item 
void \mbox{\hyperlink{classRigidbodyComponent_a397796f2f8deb197ee0f0d96eb6ba23d}{Show\+Component\+Editor}} (bool $\ast$show\+Editor) override
\item 
const char $\ast$ \mbox{\hyperlink{classRigidbodyComponent_a4e89f2337c4ebe6f720bdad08ece917b}{Component\+Type\+Name}} () override
\item 
void \mbox{\hyperlink{classRigidbodyComponent_a5c6caca7d911fb61f00a2a35de0f62ef}{Set\+Velocity}} (\mbox{\hyperlink{structVec2D}{Vec2D}} vel) override
\item 
bool \mbox{\hyperlink{classRigidbodyComponent_a73b252b29fbb76a6354b0c56aebe36f9}{Is\+Kinematic}} () override
\item 
bool \mbox{\hyperlink{classRigidbodyComponent_adc67765c449d8cde1c9dcdd279b97194}{Is\+Elastic}} () override
\item 
bool \mbox{\hyperlink{classRigidbodyComponent_aa4d0c27e47cef8b74058d70a5054eb31}{Uses\+Gravity}} () override
\item 
\mbox{\hyperlink{structVec2D}{Vec2D}} \mbox{\hyperlink{classRigidbodyComponent_aca2cbab492d09175e0f2aa1e87f62f1f}{Get\+Velocity}} () override
\item 
float \mbox{\hyperlink{classRigidbodyComponent_a96b7ca6de81de1347b2daf4f9c32a66b}{Get\+Mass}} () override
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions inherited from \mbox{\hyperlink{classIPhysicsComponent}{IPhysics\+Component}}}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classIPhysicsComponent_ab4bee7d6211a8649c7089629eaccbb21}{IPhysics\+Component}} (\mbox{\hyperlink{classTransformComponent}{Transform\+Component}} $\ast$pos, \mbox{\hyperlink{structVec2D}{Vec2D}} dim)
\item 
\mbox{\hyperlink{classIPhysicsComponent_ae02e2c332f14e4206c21fc08902d5161}{$\sim$\+IPhysics\+Component}} ()
\item 
bool \mbox{\hyperlink{classIPhysicsComponent_aae80e0691898c61495f43a7bc2f0e494}{Is\+Colliding}} (\mbox{\hyperlink{classIPhysicsComponent}{IPhysics\+Component}} $\ast$other)
\item 
virtual void \mbox{\hyperlink{classIPhysicsComponent_a12248fc80967b165bc598e6f8bd3a8cd}{Apply\+Force}} (\mbox{\hyperlink{structVec2D}{Vec2D}} force)
\item 
virtual void \mbox{\hyperlink{classIPhysicsComponent_a0e5005877e7fc2b280c418515bb1954a}{Apply\+Acceleration}} (\mbox{\hyperlink{structVec2D}{Vec2D}} acceleration)
\item 
virtual void \mbox{\hyperlink{classIPhysicsComponent_ac1eb84fa1b67c0258a48fb1ac15f497d}{Apply\+Velocity}} ()
\item 
virtual void \mbox{\hyperlink{classIPhysicsComponent_aff905f4a966c951b7f56e716ab9f9347}{Set\+Velocity}} (\mbox{\hyperlink{structVec2D}{Vec2D}} vel)
\item 
virtual bool \mbox{\hyperlink{classIPhysicsComponent_aaf37980fe6dea6de4d49156b3c4ce998}{Is\+Kinematic}} ()
\item 
virtual bool \mbox{\hyperlink{classIPhysicsComponent_a4136b164031d8fa821316e1664264392}{Is\+Elastic}} ()
\item 
virtual bool \mbox{\hyperlink{classIPhysicsComponent_a41f11dca49e23ad9236b2ccbfe81e8f4}{Uses\+Gravity}} ()
\item 
\mbox{\hyperlink{structVec2D}{Vec2D}} \mbox{\hyperlink{classIPhysicsComponent_abfaa678eb1c7312e9bf098bc1473f794}{Get\+Position}} ()
\item 
\mbox{\hyperlink{structVec2D}{Vec2D}} \mbox{\hyperlink{classIPhysicsComponent_abb67c9f5741590c7ebcca1434175386a}{Get\+Dimensions}} ()
\item 
virtual \mbox{\hyperlink{structVec2D}{Vec2D}} \mbox{\hyperlink{classIPhysicsComponent_a476359cb97729525a9e476f6777c1536}{Get\+Velocity}} ()
\item 
virtual float \mbox{\hyperlink{classIPhysicsComponent_a5a88a9979998bcfe46ec45d4a6c4966b}{Get\+Mass}} ()
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions inherited from \mbox{\hyperlink{classComponent}{Component}}}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classComponent_a8775db6d1a2c1afc2e77cd3c8f39da6f}{Component}} ()
\item 
\mbox{\hyperlink{classComponent_ab8378fa275af98e568a7e91d33d867af}{$\sim$\+Component}} ()
\item 
virtual void \mbox{\hyperlink{classComponent_a9c764c2a5607ef52629458d361ebf16e}{Update}} (SDL\+\_\+\+Event e, int frame, std\+::vector$<$ std\+::string $>$ broadcast\+List)
\item 
virtual void \mbox{\hyperlink{classComponent_ab856bdb8c4357a080d7abcf99871a573}{Render}} (SDL\+\_\+\+Renderer $\ast$ren)
\item 
virtual void \mbox{\hyperlink{classComponent_a92af5bb942ea9633515a0c0e16a0bb8c}{Show\+Component\+Editor}} (bool $\ast$show\+Editor)
\item 
virtual bool \mbox{\hyperlink{classComponent_aed93a0ec70ebc71f34f02eb0a3ad4006}{Has\+Tag}} (Component\+Tag t)
\item 
virtual const char $\ast$ \mbox{\hyperlink{classComponent_a6ad359e7f57daa4ba249aaf5c88da052}{Component\+Type\+Name}} ()
\item 
void \mbox{\hyperlink{classComponent_aea8f0f460a62d86183020bd667b6cbf0}{Parse\+And\+Update\+Broadcast}} (std\+::vector$<$ std\+::string $>$ broadcast\+List)
\end{DoxyCompactItemize}
\doxysubsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classRigidbodyComponent_a7e10905cb50d667caf8b00b3b33ed259}\label{classRigidbodyComponent_a7e10905cb50d667caf8b00b3b33ed259} 
\mbox{\hyperlink{structVec2D}{Vec2D}} {\bfseries velocity}
\item 
\Hypertarget{classRigidbodyComponent_a6be86875545d5d98feb13d452e113ef3}\label{classRigidbodyComponent_a6be86875545d5d98feb13d452e113ef3} 
float {\bfseries mass}
\item 
\Hypertarget{classRigidbodyComponent_a375b851cba4e604eceb0c2f9e4928cca}\label{classRigidbodyComponent_a375b851cba4e604eceb0c2f9e4928cca} 
bool {\bfseries is\+Elastic}
\item 
\Hypertarget{classRigidbodyComponent_a8e8f0b5db0c37bbea552a537f3c6e065}\label{classRigidbodyComponent_a8e8f0b5db0c37bbea552a537f3c6e065} 
bool {\bfseries uses\+Gravity}
\end{DoxyCompactItemize}
\doxysubsection*{Additional Inherited Members}
\doxysubsubsection*{Protected Attributes inherited from \mbox{\hyperlink{classIPhysicsComponent}{IPhysics\+Component}}}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classIPhysicsComponent_a793d76606057fb4dcf4ad9550fbbeca2}\label{classIPhysicsComponent_a793d76606057fb4dcf4ad9550fbbeca2} 
\mbox{\hyperlink{classTransformComponent}{Transform\+Component}} $\ast$ {\bfseries m\+\_\+position}
\item 
\mbox{\hyperlink{structVec2D}{Vec2D}} \mbox{\hyperlink{classIPhysicsComponent_ad22593592587dde0b325bd608b559aab}{dimensions}}
\item 
\Hypertarget{classIPhysicsComponent_a527df5bfe70078a0302906962494be1a}\label{classIPhysicsComponent_a527df5bfe70078a0302906962494be1a} 
std\+::vector$<$ Component\+Tag $>$ {\bfseries tags} = \{Component\+Tag\+::\+Physics\}
\end{DoxyCompactItemize}
\doxysubsubsection*{Protected Attributes inherited from \mbox{\hyperlink{classComponent}{Component}}}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classComponent_ab9b45a6a11e943c86770a1b3e085c25c}\label{classComponent_ab9b45a6a11e943c86770a1b3e085c25c} 
std\+::vector$<$ Component\+Tag $>$ {\bfseries tags}
\item 
\Hypertarget{classComponent_a929d29b8cdb9447b70f5e7d990c7d0f0}\label{classComponent_a929d29b8cdb9447b70f5e7d990c7d0f0} 
std\+::vector$<$ std\+::string $>$ {\bfseries previous\+Broadcasts}
\item 
\Hypertarget{classComponent_a7d03b8c23a6fa95fd83f08ad88cd59ee}\label{classComponent_a7d03b8c23a6fa95fd83f08ad88cd59ee} 
std\+::vector$<$ std\+::string $>$ {\bfseries pending\+Broadcasts}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
An implementation of \doxylink{classIPhysicsComponent}{IPhysics\+Component} to allow for physics-\/based collisions. \begin{DoxySeeAlso}{See also}
\doxylink{classPhysicsEngine}{Physics\+Engine} 
\end{DoxySeeAlso}


\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{classRigidbodyComponent_a870828e81a3946f12bc09d49848072af}\label{classRigidbodyComponent_a870828e81a3946f12bc09d49848072af} 
\index{RigidbodyComponent@{RigidbodyComponent}!RigidbodyComponent@{RigidbodyComponent}}
\index{RigidbodyComponent@{RigidbodyComponent}!RigidbodyComponent@{RigidbodyComponent}}
\doxysubsubsection{\texorpdfstring{RigidbodyComponent()}{RigidbodyComponent()}}
{\footnotesize\ttfamily Rigidbody\+Component\+::\+Rigidbody\+Component (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classTransformComponent}{Transform\+Component}} $\ast$}]{pos,  }\item[{\mbox{\hyperlink{structVec2D}{Vec2D}}}]{dim,  }\item[{\mbox{\hyperlink{structVec2D}{Vec2D}}}]{vel,  }\item[{float}]{m,  }\item[{bool}]{elastic = {\ttfamily false},  }\item[{bool}]{grav = {\ttfamily false} }\end{DoxyParamCaption})}

Construct a new Rigidbody \doxylink{classComponent}{Component} object.


\begin{DoxyParams}{Parameters}
{\em pos} & the \doxylink{classTransformComponent}{Transform\+Component} of the parent \doxylink{classGameObject}{Game\+Object} \\
\hline
{\em dim} & the dimensions of the Rigidbody \\
\hline
{\em vel} & the velocity of the Rigidbody \\
\hline
{\em m} & the mass of the Rigidbody \\
\hline
{\em elastic} & whether the Rigidbody uses elastic collisions. Defaults to false. \\
\hline
{\em grav} & whether the Rigidbody is affected by gravity. Defaults to false. \\
\hline
\end{DoxyParams}
\Hypertarget{classRigidbodyComponent_afc85f13b28ca4dd1377fbbd2c9ddfd32}\label{classRigidbodyComponent_afc85f13b28ca4dd1377fbbd2c9ddfd32} 
\index{RigidbodyComponent@{RigidbodyComponent}!````~RigidbodyComponent@{$\sim$RigidbodyComponent}}
\index{````~RigidbodyComponent@{$\sim$RigidbodyComponent}!RigidbodyComponent@{RigidbodyComponent}}
\doxysubsubsection{\texorpdfstring{$\sim$RigidbodyComponent()}{\string~RigidbodyComponent()}}
{\footnotesize\ttfamily Rigidbody\+Component\+::$\sim$\+Rigidbody\+Component (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Destroy the Rigidbody \doxylink{classComponent}{Component} object. 

\doxysubsection{Member Function Documentation}
\Hypertarget{classRigidbodyComponent_ae30aa822d90c6426fdbb96ec05a37d28}\label{classRigidbodyComponent_ae30aa822d90c6426fdbb96ec05a37d28} 
\index{RigidbodyComponent@{RigidbodyComponent}!ApplyAcceleration@{ApplyAcceleration}}
\index{ApplyAcceleration@{ApplyAcceleration}!RigidbodyComponent@{RigidbodyComponent}}
\doxysubsubsection{\texorpdfstring{ApplyAcceleration()}{ApplyAcceleration()}}
{\footnotesize\ttfamily void Rigidbody\+Component\+::\+Apply\+Acceleration (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structVec2D}{Vec2D}}}]{acceleration }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}

Change the velocity of the \doxylink{classComponent}{Component}. Adds the acceleration value to the current velocity. 

Reimplemented from \mbox{\hyperlink{classIPhysicsComponent_a0e5005877e7fc2b280c418515bb1954a}{IPhysics\+Component}}.

Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/d87/classRigidbodyComponent_ae30aa822d90c6426fdbb96ec05a37d28_icgraph}
\end{center}
\end{figure}
\Hypertarget{classRigidbodyComponent_a1883fe26d2113b4aa5e74f21c0b49eab}\label{classRigidbodyComponent_a1883fe26d2113b4aa5e74f21c0b49eab} 
\index{RigidbodyComponent@{RigidbodyComponent}!ApplyForce@{ApplyForce}}
\index{ApplyForce@{ApplyForce}!RigidbodyComponent@{RigidbodyComponent}}
\doxysubsubsection{\texorpdfstring{ApplyForce()}{ApplyForce()}}
{\footnotesize\ttfamily void Rigidbody\+Component\+::\+Apply\+Force (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structVec2D}{Vec2D}}}]{force }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}

Apply a force to the \doxylink{classComponent}{Component}. Handles forces outside of collisions (such as from scripts).


\begin{DoxyParams}{Parameters}
{\em force} & the force to be applied to the \doxylink{classIPhysicsComponent}{IPhysics\+Component} \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxylink{classRigidbodyComponent_a5c6caca7d911fb61f00a2a35de0f62ef}{Set\+Velocity()} to directly change the velocity 

\doxylink{classRigidbodyComponent_ae30aa822d90c6426fdbb96ec05a37d28}{Apply\+Acceleration()} to modify the acceleration 

\doxylink{classRigidbodyComponent_a7dafbd3c40121afeb2e30ad99d9be4ca}{Apply\+Velocity()} to finalize movement 
\end{DoxySeeAlso}


Reimplemented from \mbox{\hyperlink{classIPhysicsComponent_a12248fc80967b165bc598e6f8bd3a8cd}{IPhysics\+Component}}.

Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/d87/classRigidbodyComponent_a1883fe26d2113b4aa5e74f21c0b49eab_cgraph}
\end{center}
\end{figure}
\Hypertarget{classRigidbodyComponent_a7dafbd3c40121afeb2e30ad99d9be4ca}\label{classRigidbodyComponent_a7dafbd3c40121afeb2e30ad99d9be4ca} 
\index{RigidbodyComponent@{RigidbodyComponent}!ApplyVelocity@{ApplyVelocity}}
\index{ApplyVelocity@{ApplyVelocity}!RigidbodyComponent@{RigidbodyComponent}}
\doxysubsubsection{\texorpdfstring{ApplyVelocity()}{ApplyVelocity()}}
{\footnotesize\ttfamily void Rigidbody\+Component\+::\+Apply\+Velocity (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}

Moves the \doxylink{classComponent}{Component}. The \doxylink{classIPhysicsComponent}{IPhysics\+Component} will not move until this is called.

\begin{DoxySeeAlso}{See also}
\doxylink{classRigidbodyComponent_a1883fe26d2113b4aa5e74f21c0b49eab}{Apply\+Force()} to use force to change the velocity 

\doxylink{classRigidbodyComponent_a5c6caca7d911fb61f00a2a35de0f62ef}{Set\+Velocity()} to directly change the velocity 

\doxylink{classRigidbodyComponent_ae30aa822d90c6426fdbb96ec05a37d28}{Apply\+Acceleration()} to modify the acceleration 
\end{DoxySeeAlso}


Reimplemented from \mbox{\hyperlink{classIPhysicsComponent_ac1eb84fa1b67c0258a48fb1ac15f497d}{IPhysics\+Component}}.

Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/d87/classRigidbodyComponent_a7dafbd3c40121afeb2e30ad99d9be4ca_cgraph}
\end{center}
\end{figure}
\Hypertarget{classRigidbodyComponent_a4e89f2337c4ebe6f720bdad08ece917b}\label{classRigidbodyComponent_a4e89f2337c4ebe6f720bdad08ece917b} 
\index{RigidbodyComponent@{RigidbodyComponent}!ComponentTypeName@{ComponentTypeName}}
\index{ComponentTypeName@{ComponentTypeName}!RigidbodyComponent@{RigidbodyComponent}}
\doxysubsubsection{\texorpdfstring{ComponentTypeName()}{ComponentTypeName()}}
{\footnotesize\ttfamily const char $\ast$ Rigidbody\+Component\+::\+Component\+Type\+Name (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [override]}, {\ttfamily [virtual]}}

The name of the component type. Used by the GUI

\begin{DoxySeeAlso}{See also}
\doxylink{classGameMakerGUI_a39546dd352c9c5d198f61e34011131b4}{Game\+Maker\+GUI\+::\+Create\+Component()} 
\end{DoxySeeAlso}
\begin{DoxyReturn}{Returns}
the name of the component 
\end{DoxyReturn}


Reimplemented from \mbox{\hyperlink{classComponent_a6ad359e7f57daa4ba249aaf5c88da052}{Component}}.

\Hypertarget{classRigidbodyComponent_a96b7ca6de81de1347b2daf4f9c32a66b}\label{classRigidbodyComponent_a96b7ca6de81de1347b2daf4f9c32a66b} 
\index{RigidbodyComponent@{RigidbodyComponent}!GetMass@{GetMass}}
\index{GetMass@{GetMass}!RigidbodyComponent@{RigidbodyComponent}}
\doxysubsubsection{\texorpdfstring{GetMass()}{GetMass()}}
{\footnotesize\ttfamily float Rigidbody\+Component\+::\+Get\+Mass (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}

Get the mass of the \doxylink{classIPhysicsComponent}{IPhysics\+Component}.

\begin{DoxyReturn}{Returns}
the mass of the \doxylink{classComponent}{Component} 
\end{DoxyReturn}


Reimplemented from \mbox{\hyperlink{classIPhysicsComponent_a5a88a9979998bcfe46ec45d4a6c4966b}{IPhysics\+Component}}.

Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/d87/classRigidbodyComponent_a96b7ca6de81de1347b2daf4f9c32a66b_icgraph}
\end{center}
\end{figure}
\Hypertarget{classRigidbodyComponent_aca2cbab492d09175e0f2aa1e87f62f1f}\label{classRigidbodyComponent_aca2cbab492d09175e0f2aa1e87f62f1f} 
\index{RigidbodyComponent@{RigidbodyComponent}!GetVelocity@{GetVelocity}}
\index{GetVelocity@{GetVelocity}!RigidbodyComponent@{RigidbodyComponent}}
\doxysubsubsection{\texorpdfstring{GetVelocity()}{GetVelocity()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structVec2D}{Vec2D}} Rigidbody\+Component\+::\+Get\+Velocity (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}

Get the velocity of the \doxylink{classIPhysicsComponent}{IPhysics\+Component}.

\begin{DoxyReturn}{Returns}
the velocity of the \doxylink{classComponent}{Component} 
\end{DoxyReturn}


Reimplemented from \mbox{\hyperlink{classIPhysicsComponent_a476359cb97729525a9e476f6777c1536}{IPhysics\+Component}}.

\Hypertarget{classRigidbodyComponent_adc67765c449d8cde1c9dcdd279b97194}\label{classRigidbodyComponent_adc67765c449d8cde1c9dcdd279b97194} 
\index{RigidbodyComponent@{RigidbodyComponent}!IsElastic@{IsElastic}}
\index{IsElastic@{IsElastic}!RigidbodyComponent@{RigidbodyComponent}}
\doxysubsubsection{\texorpdfstring{IsElastic()}{IsElastic()}}
{\footnotesize\ttfamily bool Rigidbody\+Component\+::\+Is\+Elastic (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}

Get whether the \doxylink{classIPhysicsComponent}{IPhysics\+Component} bounces or just stops on collision.

\begin{DoxyReturn}{Returns}
whether the \doxylink{classIPhysicsComponent}{IPhysics\+Component} uses elastic collisions 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxylink{classPhysicsEngine_a30d283b6067980e42765340dea6eb62a}{Physics\+Engine\+::\+Update()} 
\end{DoxySeeAlso}


Reimplemented from \mbox{\hyperlink{classIPhysicsComponent_a4136b164031d8fa821316e1664264392}{IPhysics\+Component}}.

\Hypertarget{classRigidbodyComponent_a73b252b29fbb76a6354b0c56aebe36f9}\label{classRigidbodyComponent_a73b252b29fbb76a6354b0c56aebe36f9} 
\index{RigidbodyComponent@{RigidbodyComponent}!IsKinematic@{IsKinematic}}
\index{IsKinematic@{IsKinematic}!RigidbodyComponent@{RigidbodyComponent}}
\doxysubsubsection{\texorpdfstring{IsKinematic()}{IsKinematic()}}
{\footnotesize\ttfamily bool Rigidbody\+Component\+::\+Is\+Kinematic (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}

\begin{DoxyReturn}{Returns}
true for all Rigidbody\+Components 
\end{DoxyReturn}


Reimplemented from \mbox{\hyperlink{classIPhysicsComponent_aaf37980fe6dea6de4d49156b3c4ce998}{IPhysics\+Component}}.

\Hypertarget{classRigidbodyComponent_a5c6caca7d911fb61f00a2a35de0f62ef}\label{classRigidbodyComponent_a5c6caca7d911fb61f00a2a35de0f62ef} 
\index{RigidbodyComponent@{RigidbodyComponent}!SetVelocity@{SetVelocity}}
\index{SetVelocity@{SetVelocity}!RigidbodyComponent@{RigidbodyComponent}}
\doxysubsubsection{\texorpdfstring{SetVelocity()}{SetVelocity()}}
{\footnotesize\ttfamily void Rigidbody\+Component\+::\+Set\+Velocity (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structVec2D}{Vec2D}}}]{vel }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}

Set the velocity of the \doxylink{classIPhysicsComponent}{IPhysics\+Component}.


\begin{DoxyParams}{Parameters}
{\em vel} & the new velocity \\
\hline
\end{DoxyParams}


Reimplemented from \mbox{\hyperlink{classIPhysicsComponent_aff905f4a966c951b7f56e716ab9f9347}{IPhysics\+Component}}.

Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/d87/classRigidbodyComponent_a5c6caca7d911fb61f00a2a35de0f62ef_icgraph}
\end{center}
\end{figure}
\Hypertarget{classRigidbodyComponent_a397796f2f8deb197ee0f0d96eb6ba23d}\label{classRigidbodyComponent_a397796f2f8deb197ee0f0d96eb6ba23d} 
\index{RigidbodyComponent@{RigidbodyComponent}!ShowComponentEditor@{ShowComponentEditor}}
\index{ShowComponentEditor@{ShowComponentEditor}!RigidbodyComponent@{RigidbodyComponent}}
\doxysubsubsection{\texorpdfstring{ShowComponentEditor()}{ShowComponentEditor()}}
{\footnotesize\ttfamily void Rigidbody\+Component\+::\+Show\+Component\+Editor (\begin{DoxyParamCaption}\item[{bool $\ast$}]{show\+Editor }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}

Using Imgui, render an editor for this component

\begin{DoxySeeAlso}{See also}
\doxylink{classGameMakerGUI_a2cc6da97c0f4b45175ddc9683308866e}{Game\+Maker\+GUI\+::\+Render\+Editor()} 
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em show\+Editor} & \\
\hline
\end{DoxyParams}


Reimplemented from \mbox{\hyperlink{classComponent_a92af5bb942ea9633515a0c0e16a0bb8c}{Component}}.

\Hypertarget{classRigidbodyComponent_afc82759bee18cd1bd0cc90d7482307c1}\label{classRigidbodyComponent_afc82759bee18cd1bd0cc90d7482307c1} 
\index{RigidbodyComponent@{RigidbodyComponent}!Update@{Update}}
\index{Update@{Update}!RigidbodyComponent@{RigidbodyComponent}}
\doxysubsubsection{\texorpdfstring{Update()}{Update()}}
{\footnotesize\ttfamily void Rigidbody\+Component\+::\+Update (\begin{DoxyParamCaption}\item[{SDL\+\_\+\+Event}]{e,  }\item[{int}]{frame,  }\item[{std\+::vector$<$ std\+::string $>$}]{broadcast\+List }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}

Move the \doxylink{classRigidbodyComponent}{Rigidbody\+Component} every frame. Updates the state of the component object. Called by the \doxylink{classEngine}{Engine} every tick


\begin{DoxyParams}{Parameters}
{\em e} & any inputs given by the user \\
\hline
{\em frame} & what frame is the game currently displaying \\
\hline
{\em broadcast\+List} & a list to be used to send messages between components \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxylink{classComponent_aea8f0f460a62d86183020bd667b6cbf0}{Parse\+And\+Update\+Broadcast()}
\end{DoxySeeAlso}
 

Reimplemented from \mbox{\hyperlink{classComponent_a9c764c2a5607ef52629458d361ebf16e}{Component}}.

Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/d87/classRigidbodyComponent_afc82759bee18cd1bd0cc90d7482307c1_cgraph}
\end{center}
\end{figure}
\Hypertarget{classRigidbodyComponent_aa4d0c27e47cef8b74058d70a5054eb31}\label{classRigidbodyComponent_aa4d0c27e47cef8b74058d70a5054eb31} 
\index{RigidbodyComponent@{RigidbodyComponent}!UsesGravity@{UsesGravity}}
\index{UsesGravity@{UsesGravity}!RigidbodyComponent@{RigidbodyComponent}}
\doxysubsubsection{\texorpdfstring{UsesGravity()}{UsesGravity()}}
{\footnotesize\ttfamily bool Rigidbody\+Component\+::\+Uses\+Gravity (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}

Get whether the \doxylink{classPhysicsEngine}{Physics\+Engine} will apply gravity forces to the \doxylink{classIPhysicsComponent}{IPhysics\+Component}.

\begin{DoxyReturn}{Returns}
whether the \doxylink{classIPhysicsComponent}{IPhysics\+Component} uses gravity 
\end{DoxyReturn}


Reimplemented from \mbox{\hyperlink{classIPhysicsComponent_a41f11dca49e23ad9236b2ccbfe81e8f4}{IPhysics\+Component}}.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
include/Rigidbody\+Component.\+hpp\item 
src/Rigidbody\+Component.\+cpp\end{DoxyCompactItemize}
