summaryrefslogtreecommitdiff
path: root/legacy/ephysics/src/lib/EPhysics.h
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2012-10-25 21:55:23 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-10-25 21:55:23 +0000
commit829065f97ad506fc5daf12f301a964a68290f6ac (patch)
treead6ea04fd8bb7d9f8b80540c14a9c5accbd15ca2 /legacy/ephysics/src/lib/EPhysics.h
parent651b562ebd94d1d738dc1aed9534f4f6184cccaa (diff)
ephysics: support disabling stacking based on Z axis
Since now we support movement on Z axis the evas objects associated to bodies need to be re-stacked to be below / above each other. But if Z axis movement is disabled, no cloth is used, ..., it can be safely disabled, since evas objects won't overlap. And it will save performance. SVN revision: 78491
Diffstat (limited to '')
-rw-r--r--legacy/ephysics/src/lib/EPhysics.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/legacy/ephysics/src/lib/EPhysics.h b/legacy/ephysics/src/lib/EPhysics.h
index 4c2f64fe9c..b6d739bdd2 100644
--- a/legacy/ephysics/src/lib/EPhysics.h
+++ b/legacy/ephysics/src/lib/EPhysics.h
@@ -1524,6 +1524,50 @@ EAPI void ephysics_world_light_all_bodies_set(EPhysics_World *world, Eina_Bool e
1524EAPI Eina_Bool ephysics_world_light_all_bodies_get(const EPhysics_World *world); 1524EAPI Eina_Bool ephysics_world_light_all_bodies_get(const EPhysics_World *world);
1525 1525
1526/** 1526/**
1527 * @brief
1528 * Enable / disable stacking based on bodies z coordinates.
1529 *
1530 * Evas objects associated to bodies will be restacked when it's enabled.
1531 * So if a body A has coordinates x = 10, y = 10, z = 8 and a body B
1532 * has coordinates x = 10, y = 10, z = 10, the evas object associated to B
1533 * will be displayed below the evas object associated to A.
1534 *
1535 * Evas objects will be restacked at each simulation tick. It's enabled by
1536 * default, and disabling it can lead to wrong scenarios when movement
1537 * on Z axis is enabled or when cloths are used.
1538 *
1539 * But disabling it can save performance, so if you won't face these
1540 * scenarios, it safe to disable it, since no evas object will be moved to
1541 * be below or above others.
1542 *
1543 * @param world The physics world.
1544 * @param enabled If @c EINA_TRUE, stacking based on Z coordinates will be
1545 * enabled, otherwise it will be disabled.
1546 *
1547 * @see ephysics_world_stack_enable_get()
1548 * @see ephysics_body_evas_object_set()
1549 *
1550 * @ingroup EPhysics_World
1551 */
1552EAPI void ephysics_world_stack_enable_set(EPhysics_World *world, Eina_Bool enabled);
1553
1554/**
1555 * @brief
1556 * Get stacking status of world.
1557 *
1558 * Stacking based on bodies z coordinates can be enabled or disabled.
1559 *
1560 * @param world The physics world.
1561 * @return @c EINA_TRUE if it's running, or @c EINA_FALSE if it's paused or on
1562 * error.
1563 *
1564 * @see ephysics_world_stack_enable_set() for more details.
1565 *
1566 * @ingroup EPhysics_World
1567 */
1568EAPI Eina_Bool ephysics_world_stack_enable_get(const EPhysics_World *world);
1569
1570/**
1527 * @} 1571 * @}
1528 */ 1572 */
1529 1573