ephysics: add a new example doc: Growing Balls -

test_growing_balls.c



Patch by: Ricardo de Almeida Gonzaga <ricardo@profusion.mobi>



SVN revision: 76976
This commit is contained in:
Ricardo de Almeida Gonzaga 2012-09-21 17:01:59 +00:00 committed by Bruno Dilly
parent 85b32d701e
commit 8ac96ab8e7
1 changed files with 64 additions and 0 deletions

View File

@ -11,6 +11,7 @@
* @li @ref tutorial_ephysics_delete_body
* @li @ref tutorial_ephysics_constraint
* @li @ref tutorial_ephysics_forces
* @li @ref tutorial_ephysics_growing_balls
* @li @ref tutorial_ephysics_gravity
* @li @ref tutorial_ephysics_velocity
* @li @ref tutorial_ephysics_shapes
@ -816,6 +817,69 @@
* @example test_forces.c
*/
/**
* @page tutorial_ephysics_growing_balls EPhysics - Growing Balls
*
* The purpose of this example is to demonstrate the dynamically growing
* and shrinking of an EPhysics_Body - The code applies the growth of a ball
* and the shrink of another.
*
* For this example we'll have an EPhysics_World and three EPhysics_Bodys
* with different sizes associated with an evas_object.
*
* The basic concepts like - defining an EPhysics_World, render geometry,
* physics limiting boundaries, add an EPhysics_Body, associate it to evas
* objects, change restitution, friction and impulse properties, were
* already covered in
* @ref tutorial_ephysics_bouncing_ball
*
* @section add-growshrink Adding the growing/shrinking
* @dontinclude test_growing_balls.c
*
* In this example we'll use a timer to handle the callback function.
*
* @skipline test_data->data = ecore_timer_add
*
* In this callback, we'll pass through a list with 3 balls and apply the
* growth and the shrink between the limit we'll set. Note that the variable
* i recieves different values on each iteration (-1, 0, 1). For the first
* iteration it will decrease the size variable, the second will keep the
* same value, and the last one will increase the size variable.
*
* @dontinclude test_growing_balls.c
*
* @skip _grow_cb(void *data
* @until return EINA_TRUE;
* @skipline }
*
* Here we finish the example. The full source code can be found at
* @ref test_growing_balls_c.
*
*/
/**
* @page test_growing_balls_c test_growing_balls.c
*
* @section ephysics-test-h ephysics_test.h
* @include ephysics_test.h
*
* @section test-growing-balls-c test_growing_balls.c
* @dontinclude test.c
*
* @skip test_clean
* @until }
*
* @skip test_data_new
* @until }
*
* @skip test_win_add
* @until }
*
* @include test_growing_balls.c
*
* @example test_growing_balls.c
*/
/**
* @page tutorial_ephysics_gravity EPhysics - Gravity
*