forked from enlightenment/efl
ephysics: add a new example doc: Gravity -
test_no_gravity.c Patch by: Ricardo de Almeida Gonzaga <ricardo@profusion.mobi> SVN revision: 76696
This commit is contained in:
parent
134d52aa9d
commit
4be55425e7
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue