summaryrefslogtreecommitdiff
path: root/legacy/ephysics/doc
diff options
context:
space:
mode:
authorRicardo de Almeida Gonzaga <ricardo@profusion.mobi>2012-09-14 22:04:44 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-09-14 22:04:44 +0000
commite302c3d27e15faf881a613d89836e0cbad917596 (patch)
treec1fd9f7b34a121d40f3228135af36a283c5710ba /legacy/ephysics/doc
parent7ae00ec501272d4638e4eae33b69c7b2ec905ad4 (diff)
ephysics: add a new example doc: Collision Filter -
test_collision_filter.c Patch by: Ricardo de Almeida Gonzaga <ricardo@profusion.mobi> SVN revision: 76694
Diffstat (limited to 'legacy/ephysics/doc')
-rw-r--r--legacy/ephysics/doc/examples.dox80
1 files changed, 80 insertions, 0 deletions
diff --git a/legacy/ephysics/doc/examples.dox b/legacy/ephysics/doc/examples.dox
index be6df3647b..169a069e24 100644
--- a/legacy/ephysics/doc/examples.dox
+++ b/legacy/ephysics/doc/examples.dox
@@ -6,6 +6,7 @@
6 * @li @ref tutorial_ephysics_bouncing_ball 6 * @li @ref tutorial_ephysics_bouncing_ball
7 * @li @ref tutorial_ephysics_bouncing_text 7 * @li @ref tutorial_ephysics_bouncing_text
8 * @li @ref tutorial_ephysics_collision_detection 8 * @li @ref tutorial_ephysics_collision_detection
9 * @li @ref tutorial_ephysics_collision_filter
9 * @li @ref tutorial_ephysics_delete_body 10 * @li @ref tutorial_ephysics_delete_body
10 * @li @ref tutorial_ephysics_constraint 11 * @li @ref tutorial_ephysics_constraint
11 */ 12 */
@@ -375,6 +376,85 @@
375 */ 376 */
376 377
377/** 378/**
379 * @page tutorial_ephysics_collision_filter EPhysics - Collision Filter
380 *
381 * The purpose of this example is to demonstrate the EPhysics Collision Filter
382 * usage - The code adds four balls in 2 rows and 2 columns, two on each
383 * collision group, the collision only happens when the balls are in the
384 * same group (row),to make it easier, balls in the same group has the same
385 * color and size.
386 *
387 * For this example we'll have an EPhysics_World and four basic EPhysics_Bodys,
388 * we'll apply an impulse on then and see what happens when they're in other
389 * collision group.
390 *
391 * The basic concepts like - initializing an EPhysics_World, render geometry,
392 * physics limiting boundaries, add an Ephysics_Body, associate it to evas
393 * objects, change restitution, friction and impulse properties, were
394 * already covered in
395 * @ref tutorial_ephysics_bouncing_ball
396 *
397 * @section add-callbacks Adding the balls
398 * @dontinclude test_collision_filter.c
399 *
400 * We'll use two arrays (color and size) to distinguish the groups.
401 *
402 * @skip _world_populate
403 * @until row;
404 *
405 * The balls declaration was placed into a For loop, just to simplify the
406 * coding and divide them in two groups.
407 *
408 * @skip for (i = 0; i < 4
409 * @until 0.1);
410 *
411 * Note in this part we divide the balls in two groups by color (row).
412 *
413 * @skipline ephysics_body_collision_group_add(fall_body
414 *
415 * The impulse will be applied in only 1 ball per group, in this case:
416 *
417 * The 1st row 2nd column ball will be applied an impulse to the
418 * left (-300kg * p/s).
419 *
420 * The 2nd row 1st column ball will be applied an impulse to the
421 * right (300kg * p/s).
422 *
423 * And then saving the body into a list.
424 *
425 * @skip if (column + row == 1
426 * @until }
427 * @skipline }
428 *
429 * Here we finish the example. The full source code can be found at
430 * @ref test_collision_filter_c.
431 *
432 */
433
434 /**
435 * @page test_collision_filter_c test_collision_filter.c
436 *
437 * @section ephysics-test-h ephysics_test.h
438 * @include ephysics_test.h
439 *
440 * @section test-collision_filter-c test_collision_filter.c
441 * @dontinclude test.c
442 *
443 * @skip test_clean
444 * @until }
445 *
446 * @skip test_data_new
447 * @until }
448 *
449 * @skip test_win_add
450 * @until }
451 *
452 * @include test_collision_filter.c
453 *
454 * @example test_collision_filter.c
455 */
456
457/**
378 * @page tutorial_ephysics_delete_body EPhysics - Delete Body 458 * @page tutorial_ephysics_delete_body EPhysics - Delete Body
379 * 459 *
380 * The purpose of this example is to demonstrate the EPhysics Callbacks usage - 460 * The purpose of this example is to demonstrate the EPhysics Callbacks usage -