\hypertarget{test_camera_track_8c-example}{}\doxysection{test\+\_\+camera\+\_\+track.\+c}

\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}{typedef}\ \textcolor{keyword}{struct\ }\_Track\_Data\ Track\_Data;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{struct\ }\_Track\_Data\ \{}
\DoxyCodeLine{\ \ \ \ \ Test\_Data\ base;}
\DoxyCodeLine{\ \ \ \ \ \mbox{\hyperlink{group__EPhysics__Body_gaf39ad724f8a2f81f9139c63263900bf1}{EPhysics\_Body}}\ *body;}
\DoxyCodeLine{\ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *sp;}
\DoxyCodeLine{\ \ \ \ \ \textcolor{keywordtype}{int}\ old\_cx;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_update\_floor(\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *layout,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *name,\ \textcolor{keywordtype}{int}\ delta\_x,\ \textcolor{keywordtype}{int}\ cy,\ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ ver)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *floor\_obj;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ x,\ y,\ fx,\ fy;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ floor\_obj\ =\ evas\_object\_data\_get(layout,\ name);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga6e8e78e110392480dd612df86a16b630}{evas\_object\_geometry\_get}}(floor\_obj,\ \&x,\ \&y,\ NULL,\ NULL);}
\DoxyCodeLine{\ \ \ fx\ =\ x\ +\ delta\_x;}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (fx\ <\ -\/FLOOR\_WIDTH)}
\DoxyCodeLine{\ \ \ \ \ fx\ +=\ 2\ *\ FLOOR\_WIDTH;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ fy\ =\ (ver)\ ?\ FLOOR\_Y\ -\/\ 20\ -\/\ cy\ +\ 40\ :\ y;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(floor\_obj,\ fx,\ fy);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_camera\_moved\_cb(\textcolor{keywordtype}{void}\ *data,\ \mbox{\hyperlink{group__EPhysics__World_ga83c0d22744748525aa2dac11726c58e6}{EPhysics\_World}}\ *world\ \_\_UNUSED\_\_,\ \textcolor{keywordtype}{void}\ *event\_info)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Camera_ga945948dcbf4d98beb457c77b6537116f}{EPhysics\_Camera}}\ *camera\ =\ event\_info;}
\DoxyCodeLine{\ \ \ Track\_Data\ *track\_data\ =\ data;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ cx,\ cy,\ delta\_x\ =\ 0;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ hor,\ ver;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ DBG(\textcolor{stringliteral}{"{}Camera\ moved"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Camera_ga3f8d5e51ae54ac3c2a5bdc0a6fb162c6}{ephysics\_camera\_tracked\_body\_get}}(camera,\ NULL,\ \&hor,\ \&ver);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Camera_ga5e549e85d0d98a878dc636b6463645d6}{ephysics\_camera\_position\_get}}(camera,\ \&cx,\ \&cy);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (hor)}
\DoxyCodeLine{\ \ \ \ \ delta\_x\ =\ track\_data-\/>old\_cx\ -\/\ cx;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \_update\_floor(track\_data-\/>base.layout,\ \textcolor{stringliteral}{"{}floor"{}},\ delta\_x,\ cy,\ ver);}
\DoxyCodeLine{\ \ \ \_update\_floor(track\_data-\/>base.layout,\ \textcolor{stringliteral}{"{}floor2"{}},\ delta\_x,\ cy,\ ver);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ track\_data-\/>old\_cx\ =\ cx;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_track\_apply(Track\_Data\ *track\_data)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ hor\ =\ \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ ver\ =\ \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Camera_ga945948dcbf4d98beb457c77b6537116f}{EPhysics\_Camera}}\ *camera;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_gaf39ad724f8a2f81f9139c63263900bf1}{EPhysics\_Body}}\ *body;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ mode;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ body\ =\ track\_data-\/>body;}
\DoxyCodeLine{\ \ \ camera\ =\ \mbox{\hyperlink{group__EPhysics__World_gac676a37c869af5ec41fab3268e53ed21}{ephysics\_world\_camera\_get}}(track\_data-\/>base.world);}
\DoxyCodeLine{\ \ \ mode\ =\ (int)\ \mbox{\hyperlink{group__Elm__Spinner__Group_ga0f93a325d38ad9a249994a7dc4ea4f1b}{elm\_spinner\_value\_get}}(track\_data-\/>sp);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{switch}\ (mode)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{keywordflow}{case}\ 1:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ hor\ =\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{keywordflow}{case}\ 3:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ hor\ =\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{keywordflow}{case}\ 2:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ ver\ =\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ INF(\textcolor{stringliteral}{"{}Tracking\ mode:\ hor\ =\ \%i,\ ver\ =\ \%i"{}},\ hor,\ ver);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Camera_gabb7602830e3a9daa67d7bbe1a71a776e}{ephysics\_camera\_body\_track}}(camera,\ body,\ hor,\ ver);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_tracking\_mode\_cb(\textcolor{keywordtype}{void}\ *data,\ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *obj\ \_\_UNUSED\_\_,\ \textcolor{keywordtype}{void}\ *event\_info\ \_\_UNUSED\_\_)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \_track\_apply(data);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_world\_populate(Track\_Data\ *track\_data)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *colors[]\ =\ \{\textcolor{stringliteral}{"{}blue-\/cube"{}},\ \textcolor{stringliteral}{"{}purple-\/cube"{}}\};}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *cube,\ *sphere;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_gaf39ad724f8a2f81f9139c63263900bf1}{EPhysics\_Body}}\ *body;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ i,\ color,\ row;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{for}\ (i\ =\ 0;\ i\ <\ 9;\ i++)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ color\ =\ i\ \%\ 3\ \%\ 2;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ row\ =\ i\ /\ 3;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ cube\ =\ \mbox{\hyperlink{group__Elm__Image_ga1e320bab8a343c91522d0f09b938ab4f}{elm\_image\_add}}(track\_data-\/>base.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"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ colors[color]);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(cube,\ i\ *\ 70,\ (row\ +\ 2)\ *\ 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{\ \ \ \ \ \ \ \ track\_data-\/>base.evas\_objs\ =\ \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ track\_data-\/>base.evas\_objs,\ cube);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ body\ =\ \mbox{\hyperlink{group__EPhysics__Body_ga6381538c9002ea30171c0a64100350f5}{ephysics\_body\_box\_add}}(track\_data-\/>base.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{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga731c9a6443f7c4294fce23fc1287b778}{ephysics\_body\_restitution\_set}}(body,\ 0.95);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga986d45060bf6ba1689a56889a2bcabce}{ephysics\_body\_friction\_set}}(body,\ 1);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__EPhysics__Body_gaa0915777f634079ca6c088fda5c20e8f}{ephysics\_body\_mass\_set}}(body,\ 0);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ track\_data-\/>base.bodies\ =\ \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ track\_data-\/>base.bodies,\ body);}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ sphere\ =\ \mbox{\hyperlink{group__Elm__Image_ga1e320bab8a343c91522d0f09b938ab4f}{elm\_image\_add}}(track\_data-\/>base.win);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Image_gad1a96ede5f513042cef3c1dac4572f73}{elm\_image\_file\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ sphere,\ PACKAGE\_DATA\_DIR\ \textcolor{stringliteral}{"{}/"{}}\ EPHYSICS\_TEST\_THEME\ \textcolor{stringliteral}{"{}.edj"{}},\ \textcolor{stringliteral}{"{}green-\/ball"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(sphere,\ 0,\ 80);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(sphere,\ 54,\ 54);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(sphere);}
\DoxyCodeLine{\ \ \ track\_data-\/>base.evas\_objs\ =\ \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(track\_data-\/>base.evas\_objs,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ sphere);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ body\ =\ \mbox{\hyperlink{group__EPhysics__Body_ga9fe94b35f5b58527b1199a23468b1f86}{ephysics\_body\_sphere\_add}}(track\_data-\/>base.world);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga39cb9e95bbe1d097926a09365c501db3}{ephysics\_body\_evas\_object\_set}}(body,\ sphere,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga731c9a6443f7c4294fce23fc1287b778}{ephysics\_body\_restitution\_set}}(body,\ 0.95);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga986d45060bf6ba1689a56889a2bcabce}{ephysics\_body\_friction\_set}}(body,\ 1);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga0ecea96f6a5a62f29e2bdeecb86db400}{ephysics\_body\_damping\_set}}(body,\ 0.1,\ 0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga9109b39047a724640f6a18c683c9eb07}{ephysics\_body\_central\_impulse\_apply}}(body,\ 90,\ 0,\ 0);}
\DoxyCodeLine{\ \ \ track\_data-\/>body\ =\ body;}
\DoxyCodeLine{\ \ \ track\_data-\/>base.bodies\ =\ \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(track\_data-\/>base.bodies,\ body);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_restart(\textcolor{keywordtype}{void}\ *data,\ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *obj\ \_\_UNUSED\_\_,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *emission\ \_\_UNUSED\_\_,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *source\ \_\_UNUSED\_\_)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ Track\_Data\ *track\_data\ =\ data;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Camera_ga945948dcbf4d98beb457c77b6537116f}{EPhysics\_Camera}}\ *camera;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *floor\_obj;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ DBG(\textcolor{stringliteral}{"{}Restart\ pressed"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ test\_clean((Test\_Data\ *)track\_data);}
\DoxyCodeLine{\ \ \ \_world\_populate(track\_data);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ floor\_obj\ =\ evas\_object\_data\_get(track\_data-\/>base.layout,\ \textcolor{stringliteral}{"{}floor"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(floor\_obj,\ -\/\ WIDTH\ /\ 2,\ FLOOR\_Y\ -\/\ 20);}
\DoxyCodeLine{\ \ \ floor\_obj\ =\ evas\_object\_data\_get(track\_data-\/>base.layout,\ \textcolor{stringliteral}{"{}floor2"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(floor\_obj,\ FLOOR\_WIDTH\ -\/\ WIDTH\ /\ 2,\ FLOOR\_Y\ -\/\ 20);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ camera\ =\ \mbox{\hyperlink{group__EPhysics__World_gac676a37c869af5ec41fab3268e53ed21}{ephysics\_world\_camera\_get}}(track\_data-\/>base.world);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Camera_gaed0ba3e4daecc66fca5dc399031da530}{ephysics\_camera\_position\_set}}(camera,\ 50,\ 40);}
\DoxyCodeLine{\ \ \ track\_data-\/>old\_cx\ =\ 50;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \_track\_apply(track\_data);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_win\_del(\textcolor{keywordtype}{void}\ *data,\ \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}}\ *e\ \_\_UNUSED\_\_,\ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *obj\ \_\_UNUSED\_\_,\ \textcolor{keywordtype}{void}\ *event\_info\ \_\_UNUSED\_\_)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ Track\_Data\ *track\_data\ =\ data;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ test\_clean((Test\_Data\ *)track\_data);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9217cf1d90690dbd1960db155d1c7476}{evas\_object\_del}}(track\_data-\/>base.layout);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__World_ga99ebd1425f258f895c0089d6eb13def9}{ephysics\_world\_del}}(track\_data-\/>base.world);}
\DoxyCodeLine{\ \ \ free(track\_data);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics_ga07e695074fb4d5d125b36c3a1d963f49}{ephysics\_shutdown}}();}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void}}
\DoxyCodeLine{test\_camera\_track(\textcolor{keywordtype}{void}\ *data\ \_\_UNUSED\_\_,\ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *obj\ \_\_UNUSED\_\_,\ \textcolor{keywordtype}{void}\ *event\_info\ \_\_UNUSED\_\_)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_gaf39ad724f8a2f81f9139c63263900bf1}{EPhysics\_Body}}\ *boundary;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *sp,\ *floor\_obj;}
\DoxyCodeLine{\ \ \ Track\_Data\ *track\_data;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__World_ga83c0d22744748525aa2dac11726c58e6}{EPhysics\_World}}\ *world;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__EPhysics_gaca8fc170d73b3f688349cc4dbaf219fd}{ephysics\_init}}())}
\DoxyCodeLine{\ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ track\_data\ =\ calloc(1,\ \textcolor{keyword}{sizeof}(Track\_Data));}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!track\_data)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}Failed\ to\ create\ test\ data"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__EPhysics_ga07e695074fb4d5d125b36c3a1d963f49}{ephysics\_shutdown}}();}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ test\_win\_add((Test\_Data\ *)\ track\_data,\ \textcolor{stringliteral}{"{}Camera\ Track"{}},\ \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Events_gac71a1038dad71da36f57b70c8ad10252}{evas\_object\_event\_callback\_add}}(track\_data-\/>base.win,\ \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a4471afbcbb4a754b7b0bbde00fb9a277}{EVAS\_CALLBACK\_DEL}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \_win\_del,\ track\_data);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Layout_gadab42e647f164fc8ab585c0e1bd34cc0}{elm\_layout\_signal\_callback\_add}}(track\_data-\/>base.layout,\ \textcolor{stringliteral}{"{}restart"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}test-\/theme"{}},\ \_restart,\ track\_data);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ sp\ =\ \mbox{\hyperlink{group__Elm__Spinner__Group_ga31416c7caa40b21480fd3e3fc7b40dce}{elm\_spinner\_add}}(track\_data-\/>base.win);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Spinner__Group_gac8893709e98b174504bc86e8413d3a91}{elm\_spinner\_min\_max\_set}}(sp,\ 0,\ 3);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Spinner__Group_gad145d4c85ed9bb10512999f5e3acd740}{elm\_spinner\_step\_set}}(sp,\ 1);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Spinner__Group_gac24e7133ec989eb5ba20e087a0921d16}{elm\_spinner\_wrap\_set}}(sp,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Spinner__Group_ga1ff25983507022abbfd089ce3a4ffde1}{elm\_spinner\_special\_value\_add}}(sp,\ 0,\ \textcolor{stringliteral}{"{}No\ tracking"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Spinner__Group_ga1ff25983507022abbfd089ce3a4ffde1}{elm\_spinner\_special\_value\_add}}(sp,\ 1,\ \textcolor{stringliteral}{"{}Horizontal\ tracking"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Spinner__Group_ga1ff25983507022abbfd089ce3a4ffde1}{elm\_spinner\_special\_value\_add}}(sp,\ 2,\ \textcolor{stringliteral}{"{}Vertical\ tracking"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Spinner__Group_ga1ff25983507022abbfd089ce3a4ffde1}{elm\_spinner\_special\_value\_add}}(sp,\ 3,\ \textcolor{stringliteral}{"{}Full\ tracking"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Spinner__Group_ga871836a2a99838adf161ea3397f8de5b}{elm\_spinner\_editable\_set}}(sp,\ \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Styles_ga7fc2d1f9ba723470da7a05799c49f7fe}{elm\_object\_style\_set}}(sp,\ \textcolor{stringliteral}{"{}ephysics-\/test"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Smart__Object__Group_gac12dd6655f488cc47ce6cf00eb7d12b2}{evas\_object\_smart\_callback\_add}}(sp,\ \textcolor{stringliteral}{"{}delay,changed"{}},\ \_tracking\_mode\_cb,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ track\_data);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Layout_gae232373336d38945ddf4f7557f28964a}{elm\_layout\_content\_set}}(track\_data-\/>base.layout,\ \textcolor{stringliteral}{"{}extra\_input"{}},\ sp);}
\DoxyCodeLine{\ \ \ track\_data-\/>sp\ =\ sp;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ floor\_obj\ =\ \mbox{\hyperlink{group__Elm__Image_ga1e320bab8a343c91522d0f09b938ab4f}{elm\_image\_add}}(track\_data-\/>base.win);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Image_gad1a96ede5f513042cef3c1dac4572f73}{elm\_image\_file\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ floor\_obj,\ PACKAGE\_DATA\_DIR\ \textcolor{stringliteral}{"{}/"{}}\ EPHYSICS\_TEST\_THEME\ \textcolor{stringliteral}{"{}.edj"{}},\ \textcolor{stringliteral}{"{}floor"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(floor\_obj,\ -\/\ WIDTH\ /\ 2,\ FLOOR\_Y\ -\/\ 20);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(floor\_obj,\ FLOOR\_WIDTH,\ 224);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(floor\_obj);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Extras_ga3061f8abe8f1a1f657d622ae0409d8e3}{evas\_object\_data\_set}}(track\_data-\/>base.layout,\ \textcolor{stringliteral}{"{}floor"{}},\ floor\_obj);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ floor\_obj\ =\ \mbox{\hyperlink{group__Elm__Image_ga1e320bab8a343c91522d0f09b938ab4f}{elm\_image\_add}}(track\_data-\/>base.win);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Image_gad1a96ede5f513042cef3c1dac4572f73}{elm\_image\_file\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ floor\_obj,\ PACKAGE\_DATA\_DIR\ \textcolor{stringliteral}{"{}/"{}}\ EPHYSICS\_TEST\_THEME\ \textcolor{stringliteral}{"{}.edj"{}},\ \textcolor{stringliteral}{"{}floor"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(floor\_obj,\ FLOOR\_WIDTH\ -\/\ WIDTH\ /\ 2,\ FLOOR\_Y\ -\/\ 20);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(floor\_obj,\ FLOOR\_WIDTH,\ 224);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(floor\_obj);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Extras_ga3061f8abe8f1a1f657d622ae0409d8e3}{evas\_object\_data\_set}}(track\_data-\/>base.layout,\ \textcolor{stringliteral}{"{}floor2"{}},\ floor\_obj);}
\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{\ \ \ track\_data-\/>base.world\ =\ world;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__World_ga2b621ffb39920e4619fe2ec2e5508073}{ephysics\_world\_event\_callback\_add}}(world,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__EPhysics__World_gga0b0aff31f415be24679d4ab703674619aa5f6adbd98bc6599221d12ecfeb1cbc6}{EPHYSICS\_CALLBACK\_WORLD\_CAMERA\_MOVED}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \_camera\_moved\_cb,\ track\_data);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ boundary\ =\ \mbox{\hyperlink{group__EPhysics__Body_ga6381538c9002ea30171c0a64100350f5}{ephysics\_body\_box\_add}}(track\_data-\/>base.world);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_gaa0915777f634079ca6c088fda5c20e8f}{ephysics\_body\_mass\_set}}(boundary,\ 0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga8821fa07fb5be9d956cc090b14223fd2}{ephysics\_body\_geometry\_set}}(boundary,\ 0,\ FLOOR\_Y,\ -\/15,\ WIDTH\ *\ 4,\ 10,\ 30);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga731c9a6443f7c4294fce23fc1287b778}{ephysics\_body\_restitution\_set}}(boundary,\ 0.65);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__EPhysics__Body_ga986d45060bf6ba1689a56889a2bcabce}{ephysics\_body\_friction\_set}}(boundary,\ 4);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ track\_data-\/>old\_cx\ =\ 50;}
\DoxyCodeLine{\ \ \ \_world\_populate(track\_data);}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 