summaryrefslogtreecommitdiff
path: root/legacy/ephysics/doc
diff options
context:
space:
mode:
authorRicardo de Almeida Gonzaga <ricardo@profusion.mobi>2012-09-14 22:01:28 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-09-14 22:01:28 +0000
commit49366a7a843b9c4aa02f2c711eb6429b56817868 (patch)
tree013cd704991a3d871c3b728556692bf44b95328e /legacy/ephysics/doc
parentb3ee2a831399a71c45ab3cfdd377a781f1560187 (diff)
ephysics: add a new example doc: Delete Body -
test_delete.c Patch by: Ricardo de Almeida Gonzaga <ricardo@profusion.mobi> SVN revision: 76690
Diffstat (limited to 'legacy/ephysics/doc')
-rw-r--r--legacy/ephysics/doc/examples.dox86
1 files changed, 85 insertions, 1 deletions
diff --git a/legacy/ephysics/doc/examples.dox b/legacy/ephysics/doc/examples.dox
index 56ceb48221..b182bad3b5 100644
--- a/legacy/ephysics/doc/examples.dox
+++ b/legacy/ephysics/doc/examples.dox
@@ -4,7 +4,7 @@
4 * Here is a page with examples. 4 * Here is a page with examples.
5 * 5 *
6 * @li @ref tutorial_ephysics_bouncing_ball 6 * @li @ref tutorial_ephysics_bouncing_ball
7 * @li @ref ephysics_logo_c 7 * @li @ref tutorial_ephysics_delete_body
8 */ 8 */
9 9
10/** 10/**
@@ -206,3 +206,87 @@
206 * @example ephysics_logo.c 206 * @example ephysics_logo.c
207 */ 207 */
208 208
209/**
210 * @page tutorial_ephysics_delete_body EPhysics - Delete Body
211 *
212 * The purpose of this example is to demonstrate the EPhysics Callbacks usage -
213 * The code adds two balls, one with impulse and the second with a collision
214 * detection callback, to delete the body.
215 *
216 * For this example we'll have an EPhysics_World and two basic EPhysics_Bodys,
217 * we'll apply an impulse in one of then and the other will be stopped
218 * "waiting" for a collision.
219 *
220 * The basic concepts like - initializing an EPhysics_World, render geometry,
221 * physics limiting boundaries, add an EPhysics_Body, associate it to evas
222 * objects, change restitution, friction and impulse properties, were already
223 * covered in
224 * @ref tutorial_ephysics_bouncing_ball
225 *
226 * @section add-callbacks Adding Callbacks
227 * @dontinclude test_delete.c
228 *
229 * Calling ephysics_body_event_callback_add()
230 * registers a callback to a given EPhysics_Body event type.
231 *
232 * We'll use two types:
233 *
234 * @ref EPHYSICS_CALLBACK_BODY_DEL : called when a body deletion has been issued
235 * and just before the deletion actually happens. In other words, to know that
236 * body has been marked for
237 * deletion. Typically to free some data associated with the body.
238 *
239 * @skipline ephysics_body_event_callback_add(sphere_body1,
240 * @skip EPHYSICS_CALLBACK_BODY_DEL
241 * @until );
242 *
243 * The callback function will receive the collision_data and free some data
244 * associated with the body.
245 *
246 * @dontinclude test_delete.c
247 *
248 * @skip _del_cb(void *data,
249 * @until }
250 *
251 * @ref EPHYSICS_CALLBACK_BODY_COLLISION : called just after the collision has
252 * been actually processed by the physics engine. In other words, to be notified
253 * about a collision between two physical bodies.
254 *
255 * @skip ephysics_body_event_callback_add(collision_data->sphere,
256 * @until );
257 *
258 * The callback function will get the collision body and check if its body is
259 * equal to which we want to delete.
260 *
261 * @dontinclude test_delete.c
262 *
263 * @skip _collision_cb(void *data,
264 * @until }
265 *
266 * See
267 * @ref _EPhysics_Callback_Body_Type
268 * for more event types.
269 *
270 * Here we finish the example. The full source code can be found at
271 * @ref test_delete_c.
272 *
273 */
274
275 /**
276 * @page test_delete_c test_delete.c
277 *
278 * @section ephysics-test-h ephysics_test.h
279 * @include ephysics_test.h
280 *
281 * @section test-delete-c test_delete.c
282 * @dontinclude test.c
283 * @skip test_clean
284 * @until }
285 *
286 * @skip test_win_add
287 * @until }
288 *
289 * @include test_delete.c
290 *
291 * @example test_delete.c
292 */