diff options
author | Bruno Dilly <bdilly@profusion.mobi> | 2012-10-15 21:54:29 +0000 |
---|---|---|
committer | Bruno Dilly <bdilly@profusion.mobi> | 2012-10-15 21:54:29 +0000 |
commit | c2b0c76b74a05eadc9f0b18db02ec54d822c22e5 (patch) | |
tree | e04e6de3bfdc122b18b34bf7c25f4cc77165e7e2 /legacy/ephysics/src/lib/EPhysics.h | |
parent | 9447db42d889c3bbd59f800093bb23352abc4a5b (diff) |
ephysics: add front and back boundaries
Use it on test "Bouncing 3D"
SVN revision: 78015
Diffstat (limited to '')
-rw-r--r-- | legacy/ephysics/src/lib/EPhysics.h | 46 |
1 files changed, 43 insertions, 3 deletions
diff --git a/legacy/ephysics/src/lib/EPhysics.h b/legacy/ephysics/src/lib/EPhysics.h index efc7fe2925..6884b5fe85 100644 --- a/legacy/ephysics/src/lib/EPhysics.h +++ b/legacy/ephysics/src/lib/EPhysics.h | |||
@@ -559,13 +559,17 @@ EAPI EPhysics_World *ephysics_world_new(void); | |||
559 | * @li @ref ephysics_body_top_boundary_add(), | 559 | * @li @ref ephysics_body_top_boundary_add(), |
560 | * @li @ref ephysics_body_bottom_boundary_add(), | 560 | * @li @ref ephysics_body_bottom_boundary_add(), |
561 | * @li @ref ephysics_body_left_boundary_add(), | 561 | * @li @ref ephysics_body_left_boundary_add(), |
562 | * @li @ref ephysics_body_right_boundary_add(). | 562 | * @li @ref ephysics_body_right_boundary_add(), |
563 | * @li @ref ephysics_body_front_boundary_add(), | ||
564 | * @li @ref ephysics_body_back_boundary_add(). | ||
563 | * | 565 | * |
564 | * @param world the world to be configured. | 566 | * @param world the world to be configured. |
565 | * @param x Coordinate x of the top left point of rendered area, in pixels. | 567 | * @param x Coordinate x of the top left point of rendered area, in pixels. |
566 | * @param y Coordinate y of the top left point of rendered area, in pixels. | 568 | * @param y Coordinate y of the top left point of rendered area, in pixels. |
569 | * @param z Coordinate z of the rendered area, in pixels. | ||
567 | * @param w rendered area width, in pixels. | 570 | * @param w rendered area width, in pixels. |
568 | * @param h rendered area height, in pixels. | 571 | * @param h rendered area height, in pixels. |
572 | * @param d rendered area depth, in pixels. | ||
569 | * | 573 | * |
570 | * @note The unit used for geometry is Evas coordinates. | 574 | * @note The unit used for geometry is Evas coordinates. |
571 | * | 575 | * |
@@ -575,7 +579,7 @@ EAPI EPhysics_World *ephysics_world_new(void); | |||
575 | * | 579 | * |
576 | * @ingroup EPhysics_World | 580 | * @ingroup EPhysics_World |
577 | */ | 581 | */ |
578 | EAPI void ephysics_world_render_geometry_set(EPhysics_World *world, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); | 582 | EAPI void ephysics_world_render_geometry_set(EPhysics_World *world, Evas_Coord x, Evas_Coord y, Evas_Coord z, Evas_Coord w, Evas_Coord h, Evas_Coord d); |
579 | 583 | ||
580 | /** | 584 | /** |
581 | * @brief | 585 | * @brief |
@@ -584,14 +588,16 @@ EAPI void ephysics_world_render_geometry_set(EPhysics_World *world, Evas_Coord x | |||
584 | * @param world the world to be configured. | 588 | * @param world the world to be configured. |
585 | * @param x Coordinate x of the top left point of rendered area, in pixels. | 589 | * @param x Coordinate x of the top left point of rendered area, in pixels. |
586 | * @param y Coordinate y of the top left point of rendered area, in pixels. | 590 | * @param y Coordinate y of the top left point of rendered area, in pixels. |
591 | * @param z Coordinate z of the rendered area, in pixels. | ||
587 | * @param w rendered area width, in pixels. | 592 | * @param w rendered area width, in pixels. |
588 | * @param h rendered area height, in pixels. | 593 | * @param h rendered area height, in pixels. |
594 | * @param d rendered area depth, in pixels. | ||
589 | * | 595 | * |
590 | * @see ephysics_world_render_geometry_set() for more information. | 596 | * @see ephysics_world_render_geometry_set() for more information. |
591 | * | 597 | * |
592 | * @ingroup EPhysics_World | 598 | * @ingroup EPhysics_World |
593 | */ | 599 | */ |
594 | EAPI void ephysics_world_render_geometry_get(const EPhysics_World *world, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); | 600 | EAPI void ephysics_world_render_geometry_get(const EPhysics_World *world, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z, Evas_Coord *w, Evas_Coord *h, Evas_Coord *d); |
595 | 601 | ||
596 | /** | 602 | /** |
597 | * @brief | 603 | * @brief |
@@ -1965,6 +1971,40 @@ EAPI EPhysics_Body *ephysics_body_right_boundary_add(EPhysics_World *world); | |||
1965 | 1971 | ||
1966 | /** | 1972 | /** |
1967 | * @brief | 1973 | * @brief |
1974 | * Create a physic front boundary. | ||
1975 | * | ||
1976 | * A physic front boundary will limit the bodies area and placed on the | ||
1977 | * front of worlds render geometry - defined with | ||
1978 | * @ref ephysics_world_render_geometry_set(). | ||
1979 | * It is placed on x-y plane, from x to x + width, from y to y + height. | ||
1980 | * | ||
1981 | * @param world The world this body will belong to. | ||
1982 | * @return a new body or @c NULL, on erros. | ||
1983 | * @see ephysics_world_render_geometry_set() | ||
1984 | * | ||
1985 | * @ingroup EPhysics_Body | ||
1986 | */ | ||
1987 | EAPI EPhysics_Body *ephysics_body_front_boundary_add(EPhysics_World *world); | ||
1988 | |||
1989 | /** | ||
1990 | * @brief | ||
1991 | * Create a physic back boundary. | ||
1992 | * | ||
1993 | * A physic front boundary will limit the bodies area and placed on the | ||
1994 | * back of worlds render geometry - defined with | ||
1995 | * @ref ephysics_world_render_geometry_set(). | ||
1996 | * It is placed on x-y plane, from x to x + width, from y to y + height. | ||
1997 | * | ||
1998 | * @param world The world this body will belong to. | ||
1999 | * @return a new body or @c NULL, on erros. | ||
2000 | * @see ephysics_world_render_geometry_set() | ||
2001 | * | ||
2002 | * @ingroup EPhysics_Body | ||
2003 | */ | ||
2004 | EAPI EPhysics_Body *ephysics_body_back_boundary_add(EPhysics_World *world); | ||
2005 | |||
2006 | /** | ||
2007 | * @brief | ||
1968 | * Delete a physics body. | 2008 | * Delete a physics body. |
1969 | * | 2009 | * |
1970 | * This function will remove this body from its world and will | 2010 | * This function will remove this body from its world and will |