\doxysection{test\+\_\+rotating\+\_\+forever.\+c}
\hypertarget{test_rotating_forever_8c-example}{}\label{test_rotating_forever_8c-example}
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{preprocessor}{\#ifdef\ HAVE\_CONFIG\_H}}
\DoxyCodeLine{\textcolor{preprocessor}{\#\ include\ <config.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ "{}ephysics\_test.h"{}}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{\_rotate\_cb(\textcolor{keywordtype}{void}\ *data)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{struct__EPhysics__Quaternion}{EPhysics\_Quaternion}}\ *quat\_prev,\ quat\_delta,\ quat;}
\DoxyCodeLine{\ \ \ EPhysics\_Body\ *body\ =\ data;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ quat\_prev\ =\ \mbox{\hyperlink{group__EPhysics__Body_ga39ae7b220642d8c30cab9c8b313cdde3}{ephysics\_body\_rotation\_get}}(body,\ NULL);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Quaternion_gae05800bc35b8f0d161673f167e632524}{ephysics\_quaternion\_set}}(\&quat\_delta,\ 0,\ 0,\ -\/0.15,\ 0.98);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Quaternion_gae72bd8e462318feae3636dd5f405065f}{ephysics\_quaternion\_normalize}}(\&quat\_delta);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga11a611cba12f9066a272e5cb6d1b371e}{ephysics\_body\_rotation\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ body,\ \mbox{\hyperlink{group__EPhysics__Quaternion_ga959d29aa69ad3e9d99fd49784d88e887}{ephysics\_quaternion\_multiply}}(\&quat\_delta,\ quat\_prev,\ \&quat));}
\DoxyCodeLine{\ \ \ free(quat\_prev);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{\_increase\_torque\_cb(\textcolor{keywordtype}{void}\ *data)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ EPhysics\_Body\ *body\ =\ data;}
\DoxyCodeLine{\ \ \ Evas\_Object\ *obj;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga336a585598ed882a9575ed72a9f748e2}{ephysics\_body\_torque\_apply}}(body,\ 0,\ 0,\ 2);}
\DoxyCodeLine{\ \ \ obj\ =\ \mbox{\hyperlink{group__EPhysics__Body_gade11f9cb1bdd26f393adbbe0b4a594be}{ephysics\_body\_evas\_object\_get}}(body);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Extras_ga3061f8abe8f1a1f657d622ae0409d8e3}{evas\_object\_data\_set}}(obj,\ \textcolor{stringliteral}{"{}increase\_timer"{}},\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{\_stop\_torque\_cb(\textcolor{keywordtype}{void}\ *data)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ EPhysics\_Body\ *body\ =\ data;}
\DoxyCodeLine{\ \ \ Evas\_Object\ *obj;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga8a84144392d9f3c7dbecdec6a1199a49}{ephysics\_body\_forces\_clear}}(body);}
\DoxyCodeLine{\ \ \ obj\ =\ \mbox{\hyperlink{group__EPhysics__Body_gade11f9cb1bdd26f393adbbe0b4a594be}{ephysics\_body\_evas\_object\_get}}(body);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Extras_ga3061f8abe8f1a1f657d622ae0409d8e3}{evas\_object\_data\_set}}(obj,\ \textcolor{stringliteral}{"{}stop\_timer"{}},\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_del\_cb(\textcolor{keywordtype}{void}\ *data,\ EPhysics\_Body\ *body\ \_\_UNUSED\_\_,\ \textcolor{keywordtype}{void}\ *event\_info\ \_\_UNUSED\_\_)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Timer__Group_ga7c118b6a6d232b63a6500e599d2a1b47}{ecore\_timer\_del}}(data);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_del\_torque\_cb(\textcolor{keywordtype}{void}\ *data\ \_\_UNUSED\_\_,\ Evas\ *e\ \_\_UNUSED\_\_,\ Evas\_Object\ *obj,\ \textcolor{keywordtype}{void}\ *event\_info\ \_\_UNUSED\_\_)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Timer__Group_gaf96ffb609956658ec038e54bd39f46f0}{Ecore\_Timer}}\ *timer;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ timer\ =\ evas\_object\_data\_get(obj,\ \textcolor{stringliteral}{"{}increase\_timer"{}});}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (timer)}
\DoxyCodeLine{\ \ \ \ \ \mbox{\hyperlink{group__Ecore__Timer__Group_ga7c118b6a6d232b63a6500e599d2a1b47}{ecore\_timer\_del}}(timer);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ timer\ =\ evas\_object\_data\_get(obj,\ \textcolor{stringliteral}{"{}stop\_timer"{}});}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (timer)}
\DoxyCodeLine{\ \ \ \ \ \mbox{\hyperlink{group__Ecore__Timer__Group_ga7c118b6a6d232b63a6500e599d2a1b47}{ecore\_timer\_del}}(timer);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_update\_object\_cb(\textcolor{keywordtype}{void}\ *data\ \_\_UNUSED\_\_,\ EPhysics\_Body\ *body,\ \textcolor{keywordtype}{void}\ *event\_info\ \_\_UNUSED\_\_)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{double}\ rx,\ ry,\ rz,\ rw,\ vrot,\ torque;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{struct__EPhysics__Quaternion}{EPhysics\_Quaternion}}\ quat;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga4aa2211390aefa191a13639a672f21e8}{ephysics\_body\_angular\_velocity\_get}}(body,\ NULL,\ NULL,\ \&vrot);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga7d494e105a7f3a16e658b36ff00e8f17}{ephysics\_body\_torques\_get}}(body,\ NULL,\ NULL,\ \&torque);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga39ae7b220642d8c30cab9c8b313cdde3}{ephysics\_body\_rotation\_get}}(body,\ \&quat);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Quaternion_gaab4373700e3bdad8e761e63c398ebda6}{ephysics\_quaternion\_get}}(\&quat,\ \&rx,\ \&ry,\ \&rz,\ \&rw);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga7209e650176e0612efb2a2cc2af0ec27}{ephysics\_body\_evas\_object\_update}}(body);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ DBG(\textcolor{stringliteral}{"{}body:\ \%p,\ rot:\ (\%lf,\ \%lf,\ \%lf,\ \%lf),\ vrot:\ \%lf,\ torque:\ \%lf"{}},\ body,}
\DoxyCodeLine{\ \ \ \ \ \ \ rx,\ ry,\ rz,\ rw,\ vrot,\ torque);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_world\_populate(Test\_Data\ *test\_data)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ EPhysics\_Body\ *body;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Timer__Group_gaf96ffb609956658ec038e54bd39f46f0}{Ecore\_Timer}}\ *timer;}
\DoxyCodeLine{\ \ \ Evas\_Object\ *cube;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ cube\ =\ \mbox{\hyperlink{group__Elm__Image_ga1e320bab8a343c91522d0f09b938ab4f}{elm\_image\_add}}(test\_data-\/>win);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Image_gad1a96ede5f513042cef3c1dac4572f73}{elm\_image\_file\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ cube,\ PACKAGE\_DATA\_DIR\ \textcolor{stringliteral}{"{}/"{}}\ EPHYSICS\_TEST\_THEME\ \textcolor{stringliteral}{"{}.edj"{}},\ \textcolor{stringliteral}{"{}blue-\/cube"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(cube,\ WIDTH\ /\ 3,\ HEIGHT\ /\ 2\ -\/\ 30);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(cube,\ 70,\ 70);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(cube);}
\DoxyCodeLine{\ \ \ test\_data-\/>evas\_objs\ =\ \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(test\_data-\/>evas\_objs,\ cube);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ body\ =\ \mbox{\hyperlink{group__EPhysics__Body_ga6381538c9002ea30171c0a64100350f5}{ephysics\_body\_box\_add}}(test\_data-\/>world);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga39cb9e95bbe1d097926a09365c501db3}{ephysics\_body\_evas\_object\_set}}(body,\ cube,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\ \ \ test\_data-\/>bodies\ =\ \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(test\_data-\/>bodies,\ body);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_gada176f4748a4c2fc4ba2042021ea7067}{ephysics\_body\_event\_callback\_add}}(body,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__EPhysics__Body_gga904d0d1462e71c1f32cb27f540b5277cacb2363cd59bc8642e74ad916c6658e0a}{EPHYSICS\_CALLBACK\_BODY\_UPDATE}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \_update\_object\_cb,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga6c6d3c8bfc6bb5600947b66b519d2d98}{ephysics\_body\_torque\_impulse\_apply}}(body,\ 0,\ 0,\ 1);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ cube\ =\ \mbox{\hyperlink{group__Elm__Image_ga1e320bab8a343c91522d0f09b938ab4f}{elm\_image\_add}}(test\_data-\/>win);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Image_gad1a96ede5f513042cef3c1dac4572f73}{elm\_image\_file\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ cube,\ PACKAGE\_DATA\_DIR\ \textcolor{stringliteral}{"{}/"{}}\ EPHYSICS\_TEST\_THEME\ \textcolor{stringliteral}{"{}.edj"{}},\ \textcolor{stringliteral}{"{}purple-\/cube"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(cube,\ WIDTH\ /\ 3,\ FLOOR\_Y\ -\/\ 70);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(cube,\ 70,\ 70);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(cube);}
\DoxyCodeLine{\ \ \ test\_data-\/>evas\_objs\ =\ \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(test\_data-\/>evas\_objs,\ cube);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ body\ =\ \mbox{\hyperlink{group__EPhysics__Body_ga6381538c9002ea30171c0a64100350f5}{ephysics\_body\_box\_add}}(test\_data-\/>world);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga39cb9e95bbe1d097926a09365c501db3}{ephysics\_body\_evas\_object\_set}}(body,\ cube,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\ \ \ test\_data-\/>bodies\ =\ \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(test\_data-\/>bodies,\ body);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_gada176f4748a4c2fc4ba2042021ea7067}{ephysics\_body\_event\_callback\_add}}(body,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__EPhysics__Body_gga904d0d1462e71c1f32cb27f540b5277cacb2363cd59bc8642e74ad916c6658e0a}{EPHYSICS\_CALLBACK\_BODY\_UPDATE}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \_update\_object\_cb,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_gadc5405c4d07742e9aff7a0a564aa63e2}{ephysics\_body\_impulse\_apply}}(body,\ 30,\ 0,\ 0,\ 0,\ -\/10,\ 0);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ cube\ =\ \mbox{\hyperlink{group__Elm__Image_ga1e320bab8a343c91522d0f09b938ab4f}{elm\_image\_add}}(test\_data-\/>win);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Image_gad1a96ede5f513042cef3c1dac4572f73}{elm\_image\_file\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ cube,\ PACKAGE\_DATA\_DIR\ \textcolor{stringliteral}{"{}/"{}}\ EPHYSICS\_TEST\_THEME\ \textcolor{stringliteral}{"{}.edj"{}},\ \textcolor{stringliteral}{"{}purple-\/cube"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(cube,\ WIDTH\ /\ 3,\ 60);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(cube,\ 70,\ 70);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(cube);}
\DoxyCodeLine{\ \ \ test\_data-\/>evas\_objs\ =\ \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(test\_data-\/>evas\_objs,\ cube);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ body\ =\ \mbox{\hyperlink{group__EPhysics__Body_ga6381538c9002ea30171c0a64100350f5}{ephysics\_body\_box\_add}}(test\_data-\/>world);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga39cb9e95bbe1d097926a09365c501db3}{ephysics\_body\_evas\_object\_set}}(body,\ cube,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\ \ \ test\_data-\/>bodies\ =\ \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(test\_data-\/>bodies,\ body);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_gada176f4748a4c2fc4ba2042021ea7067}{ephysics\_body\_event\_callback\_add}}(body,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__EPhysics__Body_gga904d0d1462e71c1f32cb27f540b5277cacb2363cd59bc8642e74ad916c6658e0a}{EPHYSICS\_CALLBACK\_BODY\_UPDATE}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \_update\_object\_cb,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ timer\ =\ \mbox{\hyperlink{group__Ecore__Timer__Group_ga926423e464d7ef71105dd822d90e1187}{ecore\_timer\_add}}(1,\ \_rotate\_cb,\ body);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_gada176f4748a4c2fc4ba2042021ea7067}{ephysics\_body\_event\_callback\_add}}(body,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__EPhysics__Body_gga904d0d1462e71c1f32cb27f540b5277cab8f46f167ee3872ea35fe645bf14a5d2}{EPHYSICS\_CALLBACK\_BODY\_DEL}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \_del\_cb,\ timer);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ cube\ =\ \mbox{\hyperlink{group__Elm__Image_ga1e320bab8a343c91522d0f09b938ab4f}{elm\_image\_add}}(test\_data-\/>win);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Image_gad1a96ede5f513042cef3c1dac4572f73}{elm\_image\_file\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ cube,\ PACKAGE\_DATA\_DIR\ \textcolor{stringliteral}{"{}/"{}}\ EPHYSICS\_TEST\_THEME\ \textcolor{stringliteral}{"{}.edj"{}},\ \textcolor{stringliteral}{"{}blue-\/cube"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(cube,\ WIDTH\ *\ 2\ /\ 3,\ 60);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(cube,\ 70,\ 70);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(cube);}
\DoxyCodeLine{\ \ \ test\_data-\/>evas\_objs\ =\ \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(test\_data-\/>evas\_objs,\ cube);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ body\ =\ \mbox{\hyperlink{group__EPhysics__Body_ga6381538c9002ea30171c0a64100350f5}{ephysics\_body\_box\_add}}(test\_data-\/>world);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga39cb9e95bbe1d097926a09365c501db3}{ephysics\_body\_evas\_object\_set}}(body,\ cube,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\ \ \ test\_data-\/>bodies\ =\ \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(test\_data-\/>bodies,\ body);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_gada176f4748a4c2fc4ba2042021ea7067}{ephysics\_body\_event\_callback\_add}}(body,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__EPhysics__Body_gga904d0d1462e71c1f32cb27f540b5277cacb2363cd59bc8642e74ad916c6658e0a}{EPHYSICS\_CALLBACK\_BODY\_UPDATE}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \_update\_object\_cb,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga336a585598ed882a9575ed72a9f748e2}{ephysics\_body\_torque\_apply}}(body,\ 0,\ 0,\ 2);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Events_gac71a1038dad71da36f57b70c8ad10252}{evas\_object\_event\_callback\_add}}(cube,\ \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a4471afbcbb4a754b7b0bbde00fb9a277}{EVAS\_CALLBACK\_DEL}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \_del\_torque\_cb,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ timer\ =\ \mbox{\hyperlink{group__Ecore__Timer__Group_ga926423e464d7ef71105dd822d90e1187}{ecore\_timer\_add}}(3,\ \_increase\_torque\_cb,\ body);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Extras_ga3061f8abe8f1a1f657d622ae0409d8e3}{evas\_object\_data\_set}}(cube,\ \textcolor{stringliteral}{"{}increase\_timer"{}},\ timer);}
\DoxyCodeLine{\ \ \ timer\ =\ \mbox{\hyperlink{group__Ecore__Timer__Group_ga926423e464d7ef71105dd822d90e1187}{ecore\_timer\_add}}(5,\ \_stop\_torque\_cb,\ body);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Extras_ga3061f8abe8f1a1f657d622ae0409d8e3}{evas\_object\_data\_set}}(cube,\ \textcolor{stringliteral}{"{}stop\_timer"{}},\ timer);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_restart(\textcolor{keywordtype}{void}\ *data,\ Evas\_Object\ *obj\ \_\_UNUSED\_\_,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *emission\ \_\_UNUSED\_\_,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *source\ \_\_UNUSED\_\_)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ Test\_Data\ *test\_data\ =\ data;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ DBG(\textcolor{stringliteral}{"{}Restart\ pressed"{}});}
\DoxyCodeLine{\ \ \ test\_clean(test\_data);}
\DoxyCodeLine{\ \ \ \_world\_populate(test\_data);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void}}
\DoxyCodeLine{test\_rotating\_forever(\textcolor{keywordtype}{void}\ *data\ \_\_UNUSED\_\_,\ Evas\_Object\ *obj\ \_\_UNUSED\_\_,\ \textcolor{keywordtype}{void}\ *event\_info\ \_\_UNUSED\_\_)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__World_ga83c0d22744748525aa2dac11726c58e6}{EPhysics\_World}}\ *world;}
\DoxyCodeLine{\ \ \ Test\_Data\ *test\_data;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__EPhysics_gaca8fc170d73b3f688349cc4dbaf219fd}{ephysics\_init}}())}
\DoxyCodeLine{\ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ test\_data\ =\ test\_data\_new();}
\DoxyCodeLine{\ \ \ test\_win\_add(test\_data,\ \textcolor{stringliteral}{"{}Rotating\ Forever"{}},\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__General_ga1beada7edf5d714c0dba5459bcc993fc}{elm\_object\_signal\_emit}}(test\_data-\/>layout,\ \textcolor{stringliteral}{"{}borders,show"{}},\ \textcolor{stringliteral}{"{}ephysics\_test"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Layout_gadab42e647f164fc8ab585c0e1bd34cc0}{elm\_layout\_signal\_callback\_add}}(test\_data-\/>layout,\ \textcolor{stringliteral}{"{}restart"{}},\ \textcolor{stringliteral}{"{}test-\/theme"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \_restart,\ test\_data);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ world\ =\ \mbox{\hyperlink{group__EPhysics__World_ga7b24e5bada9bcd105bc7d1e68cf2e44e}{ephysics\_world\_new}}();}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__World_gaabf8abaf9c41b0c1e5daa4acf3df0356}{ephysics\_world\_render\_geometry\_set}}(world,\ 50,\ 40,\ -\/50,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ WIDTH\ -\/\ 100,\ FLOOR\_Y\ -\/\ 40,\ DEPTH);}
\DoxyCodeLine{\ \ \ test\_data-\/>world\ =\ world;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__World_ga849f9d794ce5da7bf07f0bfc71aa5b6c}{ephysics\_world\_gravity\_set}}(world,\ 0,\ 0,\ 0);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \_world\_populate(test\_data);}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 