diff options
author | Bruno Dilly <bdilly@profusion.mobi> | 2012-10-19 18:50:46 +0000 |
---|---|---|
committer | Bruno Dilly <bdilly@profusion.mobi> | 2012-10-19 18:50:46 +0000 |
commit | 22cc05a9fe0df94a83f6cee175617e93632347e4 (patch) | |
tree | c6cb06dfa5069420a9e360980d64044849a7c7b0 /legacy/ephysics/src/lib/EPhysics.h | |
parent | e46c4e83d5d9bf121400b0e64877173371a9d26d (diff) |
ephysics: support back-face culling
SVN revision: 78265
Diffstat (limited to '')
-rw-r--r-- | legacy/ephysics/src/lib/EPhysics.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/legacy/ephysics/src/lib/EPhysics.h b/legacy/ephysics/src/lib/EPhysics.h index 072c1be325..2c40b7707b 100644 --- a/legacy/ephysics/src/lib/EPhysics.h +++ b/legacy/ephysics/src/lib/EPhysics.h | |||
@@ -3642,6 +3642,68 @@ EAPI void ephysics_body_light_set(EPhysics_Body *body, Eina_Bool enable); | |||
3642 | EAPI Eina_Bool ephysics_body_light_get(const EPhysics_Body *body); | 3642 | EAPI Eina_Bool ephysics_body_light_get(const EPhysics_Body *body); |
3643 | 3643 | ||
3644 | /** | 3644 | /** |
3645 | * @brief | ||
3646 | * Set body's evas object to be hidden when it is counter-clockwise. | ||
3647 | * | ||
3648 | * @param body The physics body. | ||
3649 | * @param enable If @c EINA_TRUE, evas object will be hidden, | ||
3650 | * otherwise it will be visible, rotated. | ||
3651 | * | ||
3652 | * An object is said to be facing the user when all its points are placed in | ||
3653 | * a clockwise fashion. | ||
3654 | * | ||
3655 | * @note When back-face culling is enabled, evas object visibility | ||
3656 | * will be handled by @ref ephysics_body_evas_object_update(). | ||
3657 | * | ||
3658 | * @see ephysics_body_back_face_culling_get(). | ||
3659 | * @see ephysics_body_clockwise_get(). | ||
3660 | * @see ephysics_body_evas_object_set(). | ||
3661 | * | ||
3662 | * @ingroup EPhysics_Body | ||
3663 | */ | ||
3664 | EAPI void ephysics_body_back_face_culling_set(EPhysics_Body *body, Eina_Bool enable); | ||
3665 | |||
3666 | /** | ||
3667 | * @brief | ||
3668 | * Return if body's evas object will be hidden when it is counter-clockwise or | ||
3669 | * not. | ||
3670 | * | ||
3671 | * @param body The physics body. | ||
3672 | * @return @c EINA_TRUE if evas object will be hidden, or @c EINA_FALSE | ||
3673 | * in the other case, or on error. | ||
3674 | * | ||
3675 | * @see ephysics_body_back_face_culling_set() for more details. | ||
3676 | * @see ephysics_body_clockwise_get(). | ||
3677 | * | ||
3678 | * @ingroup EPhysics_Body | ||
3679 | */ | ||
3680 | EAPI Eina_Bool ephysics_body_back_face_culling_get(const EPhysics_Body *body); | ||
3681 | |||
3682 | /** | ||
3683 | * @brief | ||
3684 | * Get the clockwise state of a body. | ||
3685 | * | ||
3686 | * This determines if the points of the evas object associated to the @p body | ||
3687 | * are clockwise or counter-clockwise. This can be used for "back-face culling". * This is where you hide objects that "face away" from you. | ||
3688 | * In this case objects that are not clockwise. | ||
3689 | * | ||
3690 | * It can be set with @ref ephysics_body_back_face_culling_set(), so EPhysics | ||
3691 | * will handle visibility automatically on evas object update. | ||
3692 | * | ||
3693 | * @note This information only will be updated on | ||
3694 | * ephysics_body_evas_object_update(). So if a custom rendering is being done, | ||
3695 | * this function won't return the current value of the evas object. | ||
3696 | * | ||
3697 | * @param body The physics body. | ||
3698 | * @return @c EINA_TRUE if clockwise, @c EINA_FALSE otherwise or on error. | ||
3699 | * | ||
3700 | * @see ephysics_body_back_face_culling_set() for more details. | ||
3701 | * | ||
3702 | * @ingroup EPhysics_Body | ||
3703 | */ | ||
3704 | EAPI Eina_Bool ephysics_body_clockwise_get(const EPhysics_Body *body); | ||
3705 | |||
3706 | /** | ||
3645 | * @} | 3707 | * @} |
3646 | */ | 3708 | */ |
3647 | 3709 | ||