From 4be55425e736e9d4ab452fa56e100ca0d472145d Mon Sep 17 00:00:00 2001 From: Ricardo de Almeida Gonzaga Date: Fri, 14 Sep 2012 22:05:06 +0000 Subject: [PATCH] ephysics: add a new example doc: Gravity - test_no_gravity.c Patch by: Ricardo de Almeida Gonzaga SVN revision: 76696 --- legacy/ephysics/doc/examples.dox | 69 ++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/legacy/ephysics/doc/examples.dox b/legacy/ephysics/doc/examples.dox index c40fb5c64c..bb0222b74e 100644 --- a/legacy/ephysics/doc/examples.dox +++ b/legacy/ephysics/doc/examples.dox @@ -9,6 +9,7 @@ * @li @ref tutorial_ephysics_collision_filter * @li @ref tutorial_ephysics_delete_body * @li @ref tutorial_ephysics_constraint + * @li @ref tutorial_ephysics_gravity * @li @ref tutorial_ephysics_velocity */ @@ -599,6 +600,74 @@ * @example test_constraint.c */ + /** + * @page tutorial_ephysics_gravity EPhysics - Gravity + * + * The purpose of this example is to demonstrate the EPhysics Gravity usage - + * The code apply gravity in an EPhysics_World with two cubes in movement. + * + * For this example we'll have an EPhysics_World, and two basic EPhysics_Bodys. + * + * 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 + * + * Concepts like velocity and sleeping threshold were already + * covered in + * @ref tutorial_ephysics_velocity and + * @ref tutorial_ephysics_sleeping_threshold + * + * @section add-gravity Setting Gravity + * @dontinclude test_no_gravity.c + * + * Here we set EPhysics_worlds gravity in 2 axises (x, y) to (0, 0). Gravity + * will act over bodies with mass over all the time. + * + * @skipline ephysics_world_gravity_set + * + * @section add-stopbody Stopping a Body + * @dontinclude test_no_gravity.c + * + * We're using a button to call this function that receives test_data to stop + * the chosen body. + * + * Stop angular and linear body movement, its equivalent to set linear velocity + * to 0 on both axis and angular velocity to 0 as well. + * + * @skip _stop(void *data + * @until body); + * @skipline } + * + * Here we finish the example. The full source code can be found at + * @ref test_no_gravity_c. + * + */ + + /** + * @page test_no_gravity_c test_no_gravity.c + * + * @section ephysics-test-h ephysics_test.h + * @include ephysics_test.h + * + * @section test-no-gravity-c test_no_gravity.c + * @dontinclude test.c + * + * @skip test_clean + * @until } + * + * @skip test_data_new + * @until } + * + * @skip test_win_add + * @until } + * + * @include test_no_gravity.c + * + * @example test_no_gravity.c + */ + /** * @page tutorial_ephysics_velocity EPhysics - Velocity *