summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2012-06-28 14:02:02 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-06-28 14:02:02 +0000
commit10a369a95d2b3a790138f1a73e207335c42afd4d (patch)
treeb0fc5d9316999ac6138dabdab5de7ea3bdd189f3 /legacy
parent08e0f293552d9c731cae04f1a356c84cc555fe7b (diff)
EPhysics: fix function references on docs
discomfitor spotted some issues, so now all the functions are marked with @ref, so it will warn if they couldn't be found on project. Except functions on @see section, since we are already warned about them. SVN revision: 73013
Diffstat (limited to 'legacy')
-rw-r--r--legacy/ephysics/src/lib/EPhysics.h116
1 files changed, 61 insertions, 55 deletions
diff --git a/legacy/ephysics/src/lib/EPhysics.h b/legacy/ephysics/src/lib/EPhysics.h
index 62574544c7..be887740f1 100644
--- a/legacy/ephysics/src/lib/EPhysics.h
+++ b/legacy/ephysics/src/lib/EPhysics.h
@@ -103,7 +103,7 @@ typedef enum _EPhysics_Callback_Type
103{ 103{
104 /* 104 /*
105 * The following events are only for use with EPhysics world objects, with 105 * The following events are only for use with EPhysics world objects, with
106 * ephysics_world_event_callback_add(): 106 * @ref ephysics_world_event_callback_add():
107 */ 107 */
108 EPHYSICS_CALLBACK_WORLD_FIRST, /**< kept as sentinel, not really an event */ 108 EPHYSICS_CALLBACK_WORLD_FIRST, /**< kept as sentinel, not really an event */
109 EPHYSICS_CALLBACK_WORLD_DEL, /**< World being deleted (called before free) */ 109 EPHYSICS_CALLBACK_WORLD_DEL, /**< World being deleted (called before free) */
@@ -112,7 +112,7 @@ typedef enum _EPhysics_Callback_Type
112 112
113 /* 113 /*
114 * The following events are only for use with EPhysics body objects, with 114 * The following events are only for use with EPhysics body objects, with
115 * ephysics_body_event_callback_add(): 115 * @ref ephysics_body_event_callback_add():
116 */ 116 */
117 EPHYSICS_CALLBACK_BODY_FIRST, /**< kept as sentinel, not really an event */ 117 EPHYSICS_CALLBACK_BODY_FIRST, /**< kept as sentinel, not really an event */
118 EPHYSICS_CALLBACK_BODY_UPDATE, /**< Body being updated */ 118 EPHYSICS_CALLBACK_BODY_UPDATE, /**< Body being updated */
@@ -164,14 +164,15 @@ EAPI int ephysics_shutdown(void);
164 * A camera defines the region of the physics world that will be rendered 164 * A camera defines the region of the physics world that will be rendered
165 * on the canvas. It sets the point of view. 165 * on the canvas. It sets the point of view.
166 * 166 *
167 * Every world has a camera, that can be get with ephysics_world_camera_get(). 167 * Every world has a camera, that can be get with
168 * Its position can be set with ephysics_camera_position_set() and zoom 168 * @ref ephysics_world_camera_get().
169 * in / zoom out can be done with ephysics_camera_zoom_set(). 169 * Its position can be set with @ref ephysics_camera_position_set() and zoom
170 * in / zoom out can be done with @ref ephysics_camera_zoom_set().
170 * 171 *
171 * @note WIP: IT'S NOT WORKING YET!! 172 * @note WIP: IT'S NOT WORKING YET!!
172 */ 173 */
173 174
174typedef struct _EPhysics_Camera EPhysics_Camera; /**< Camera handle, used to zoom in / out a scene, or change the frame position to be rendered. Every world have a camera that can be get with ephysics_world_camera_get(). */ 175typedef struct _EPhysics_Camera EPhysics_Camera; /**< Camera handle, used to zoom in / out a scene, or change the frame position to be rendered. Every world have a camera that can be get with @ref ephysics_world_camera_get(). */
175 176
176/** 177/**
177 * @brief 178 * @brief
@@ -277,14 +278,14 @@ EAPI double ephysics_camera_zoom_get(const EPhysics_Camera *camera);
277 * broadphase interface and a dispatcher to dispatch calculations 278 * broadphase interface and a dispatcher to dispatch calculations
278 * for overlapping pairs. 279 * for overlapping pairs.
279 * 280 *
280 * A new world can be created with ephysics_world_new() and deleted with 281 * A new world can be created with @ref ephysics_world_new() and deleted with
281 * ephysics_world_del(). It can have its gravity changed with 282 * @ref ephysics_world_del(). It can have its gravity changed with
282 * ephysics_world_gravity_set() and play / paused with 283 * @ref ephysics_world_gravity_set() and play / paused with
283 * ephysics_world_running_set(). When running, the simulation will be gradually 284 * @ref ephysics_world_running_set(). When running, the simulation will be
284 * stepped. 285 * gradually stepped.
285 */ 286 */
286 287
287typedef struct _EPhysics_World EPhysics_World; /**< World handle, most basic type of EPhysics. Created with ephysics_world_new() and deleted with ephysics_world_del(). */ 288typedef struct _EPhysics_World EPhysics_World; /**< World handle, most basic type of EPhysics. Created with @ref ephysics_world_new() and deleted with @ref ephysics_world_del(). */
288 289
289/** 290/**
290 * @typedef EPhysics_World_Event_Cb 291 * @typedef EPhysics_World_Event_Cb
@@ -311,14 +312,14 @@ typedef void (*EPhysics_World_Event_Cb)(void *data, EPhysics_World *world, void
311 * A new world will be created with set collision configuration, 312 * A new world will be created with set collision configuration,
312 * constraint solver, broadphase interface and dispatcher. 313 * constraint solver, broadphase interface and dispatcher.
313 * 314 *
314 * It can be paused / unpaused with ephysics_world_running_set() and its 315 * It can be paused / unpaused with @ref ephysics_world_running_set() and its
315 * gravity can be changed with ephysics_world_gravity_set(). 316 * gravity can be changed with @ref ephysics_world_gravity_set().
316 * 317 *
317 * By default it starts with gravity y = -9.81 and playing. 318 * By default it starts with gravity y = -9.81 and playing.
318 * 319 *
319 * If default updates between physics bodies and evas objects will be used 320 * If default updates between physics bodies and evas objects will be used
320 * it's mandatory to set the size of the area to be rendered with 321 * it's mandatory to set the size of the area to be rendered with
321 * ephysics_world_geometry_size_set(). 322 * @ref ephysics_world_render_geometry_set().
322 * 323 *
323 * @return A new world or @c NULL, on errors. 324 * @return A new world or @c NULL, on errors.
324 * 325 *
@@ -335,10 +336,10 @@ EAPI EPhysics_World *ephysics_world_new(void);
335 * By default it starts with null x, y, width and height. 336 * By default it starts with null x, y, width and height.
336 * 337 *
337 * The physics world won't be limited, but boundaries can be added with: 338 * The physics world won't be limited, but boundaries can be added with:
338 * @li ephysics_world_top_boundary_add(), 339 * @li @ref ephysics_body_top_boundary_add(),
339 * @li ephysics_world_bottom_boundary_add(), 340 * @li @ref ephysics_body_bottom_boundary_add(),
340 * @li ephysics_world_left_boundary_add(), 341 * @li @ref ephysics_body_left_boundary_add(),
341 * @li ephysics_world_right_boundary_add(). 342 * @li @ref ephysics_body_right_boundary_add().
342 * 343 *
343 * @param world the world to be configured. 344 * @param world the world to be configured.
344 * @param x Coordinate x of the top left point of rendered area, in pixels. 345 * @param x Coordinate x of the top left point of rendered area, in pixels.
@@ -577,35 +578,36 @@ EAPI void *ephysics_world_event_callback_del(EPhysics_World *world, EPhysics_Cal
577 * A body is a representation of an object inside a physics world. 578 * A body is a representation of an object inside a physics world.
578 * 579 *
579 * Bodies can have different shapes that can be created with: 580 * Bodies can have different shapes that can be created with:
580 * @li ephysics_body_circle_add(); 581 * @li @ref ephysics_body_circle_add();
581 * @li or ephysics_body_box_add(). 582 * @li or @ref ephysics_body_box_add().
582 * 583 *
583 * They can collide and have customizable properties, like: 584 * They can collide and have customizable properties, like:
584 * @li mass, set with ephysics_body_mass_set(); 585 * @li mass, set with @ref ephysics_body_mass_set();
585 * @li coefficient of restitution, set with ephysics_body_restitution_set(); 586 * @li coefficient of restitution, set with
586 * @li and friction, set with ephysics_body_friction_set(). 587 * @ref ephysics_body_restitution_set();
588 * @li and friction, set with @ref ephysics_body_friction_set().
587 * 589 *
588 * Bodies can have its position and size directly set by 590 * Bodies can have its position and size directly set by
589 * ephysics_body_geometry_set(). 591 * @ref ephysics_body_geometry_set().
590 * 592 *
591 * Also, they can have an associated evas object, done with 593 * Also, they can have an associated evas object, done with
592 * ephysics_body_evas_object_set() function, being responsible for updating 594 * @ref ephysics_body_evas_object_set() function, being responsible for updating
593 * its position and rotation, or letting a user callback be set 595 * its position and rotation, or letting a user callback be set
594 * for this task with ephysics_body_event_callback_add(). 596 * for this task with @ref ephysics_body_event_callback_add().
595 * 597 *
596 * Also, bodies can have impulses applied over them, and will be affected 598 * Also, bodies can have impulses applied over them, and will be affected
597 * by gravity. Impulses can be applied with: 599 * by gravity. Impulses can be applied with:
598 * @li ephysics_body_central_impulse_apply(); 600 * @li @ref ephysics_body_central_impulse_apply();
599 * @li ephysics_body_torque_impulse_apply(). 601 * @li @ref ephysics_body_torque_impulse_apply().
600 * 602 *
601 * Bodies can be removed from the world being directly deleted with 603 * Bodies can be removed from the world being directly deleted with
602 * ephysics_body_del() or when the world is deleted, case when all the 604 * @ref ephysics_body_del() or when the world is deleted, case when all the
603 * bodies belonging to it will be deleted as well. Evas objects associated 605 * bodies belonging to it will be deleted as well. Evas objects associated
604 * to these bodies won't be affected in any way, but they will stop being 606 * to these bodies won't be affected in any way, but they will stop being
605 * moved or rotated. 607 * moved or rotated.
606 */ 608 */
607 609
608typedef struct _EPhysics_Body EPhysics_Body; /**< Body handle, represents an object on EPhysics world. Created with ephysics_body_circle_add() or ephysics_body_box_add() and deleted with ephysics_body_del(). */ 610typedef struct _EPhysics_Body EPhysics_Body; /**< Body handle, represents an object on EPhysics world. Created with @ref ephysics_body_circle_add() or @ref ephysics_body_box_add() and deleted with @ref ephysics_body_del(). */
609 611
610/** 612/**
611 * @typedef EPhysics_Body_Event_Cb 613 * @typedef EPhysics_Body_Event_Cb
@@ -630,9 +632,10 @@ typedef void (*EPhysics_Body_Event_Cb)(void *data, EPhysics_Body *body, void *ev
630 * Create a new circle physics body. 632 * Create a new circle physics body.
631 * 633 *
632 * Its collision shape will be a circle of diameter 1. To change it's size 634 * Its collision shape will be a circle of diameter 1. To change it's size
633 * ephysics_body_geometry_set() should be used, so it can be deformed 635 * @ref ephysics_body_geometry_set() should be used, so it can be deformed
634 * on x and y axises. 636 * on x and y axises.
635 * Any evas object can be associated to it with ephysics_body_evas_object_set(), 637 * Any evas object can be associated to it with
638 * @ref ephysics_body_evas_object_set(),
636 * and it will collide as a circle (even if you have an evas rectangle). 639 * and it will collide as a circle (even if you have an evas rectangle).
637 * 640 *
638 * Actually, since we're using a 3D backend, it will be a cylinder on 641 * Actually, since we're using a 3D backend, it will be a cylinder on
@@ -652,7 +655,7 @@ EAPI EPhysics_Body *ephysics_body_circle_add(EPhysics_World *world);
652 * Create a new box physics body. 655 * Create a new box physics body.
653 * 656 *
654 * Its collision shape will be a box of dimensions 1 on all the axises. 657 * Its collision shape will be a box of dimensions 1 on all the axises.
655 * To change it's size ephysics_body_geometry_set() should be used, 658 * To change it's size @ref ephysics_body_geometry_set() should be used,
656 * so it can be deformed on x and y axises. 659 * so it can be deformed on x and y axises.
657 * 660 *
658 * @param world The world this body will belongs to. 661 * @param world The world this body will belongs to.
@@ -670,7 +673,8 @@ EAPI EPhysics_Body *ephysics_body_box_add(EPhysics_World *world);
670 * Create a physic top boundary. 673 * Create a physic top boundary.
671 * 674 *
672 * A physic top boundary will limit the bodies area and placed on top edge of 675 * A physic top boundary will limit the bodies area and placed on top edge of
673 * worlds render geometry - defined with ephysics_world_render_geometry_set(). 676 * worlds render geometry - defined with
677 * @ref ephysics_world_render_geometry_set().
674 * 678 *
675 * @param world The world this body will belong to. 679 * @param world The world this body will belong to.
676 * @return a new body or @c NULL, on erros. 680 * @return a new body or @c NULL, on erros.
@@ -686,7 +690,7 @@ EAPI EPhysics_Body *ephysics_body_top_boundary_add(EPhysics_World *world);
686 * 690 *
687 * A physic bottom boundary will limit the bodies area and placed on bottom 691 * A physic bottom boundary will limit the bodies area and placed on bottom
688 * edge of worlds render geometry - defined with 692 * edge of worlds render geometry - defined with
689 * ephysics_world_render_geometry_set(). 693 * @ref ephysics_world_render_geometry_set().
690 * 694 *
691 * @param world The world this body will belong to. 695 * @param world The world this body will belong to.
692 * @return a new body or @c NULL, on erros. 696 * @return a new body or @c NULL, on erros.
@@ -702,7 +706,7 @@ EAPI EPhysics_Body *ephysics_body_bottom_boundary_add(EPhysics_World *world);
702 * 706 *
703 * A physic left boundary will limit the bodies area and placed right o the 707 * A physic left boundary will limit the bodies area and placed right o the
704 * left edge of worlds render geometry - defined with 708 * left edge of worlds render geometry - defined with
705 * ephysics_world_render_geometry_set(). 709 * @ref ephysics_world_render_geometry_set().
706 * 710 *
707 * @param world The world this body will belong to. 711 * @param world The world this body will belong to.
708 * @return a new body or @c NULL, on erros. 712 * @return a new body or @c NULL, on erros.
@@ -718,7 +722,7 @@ EAPI EPhysics_Body *ephysics_body_left_boundary_add(EPhysics_World *world);
718 * 722 *
719 * A physic right boundary will limit the bodies area and placed right o the 723 * A physic right boundary will limit the bodies area and placed right o the
720 * right edge of worlds render geometry - defined with 724 * right edge of worlds render geometry - defined with
721 * ephysics_world_render_geometry_set(). 725 * @ref ephysics_world_render_geometry_set().
722 * 726 *
723 * @param world The world this body will belong to. 727 * @param world The world this body will belong to.
724 * @return a new body or @c NULL, on erros. 728 * @return a new body or @c NULL, on erros.
@@ -734,7 +738,7 @@ EAPI EPhysics_Body *ephysics_body_right_boundary_add(EPhysics_World *world);
734 * 738 *
735 * This function will remove this body from its world and will 739 * This function will remove this body from its world and will
736 * free all the memory used. It won't delete or modify an associated evas 740 * free all the memory used. It won't delete or modify an associated evas
737 * object, what can be done with ephysics_body_evas_object_set(). So after 741 * object, what can be done with @ref ephysics_body_evas_object_set(). So after
738 * it is removed the evas object will stop being updated, but will continue 742 * it is removed the evas object will stop being updated, but will continue
739 * to be rendered on canvas. 743 * to be rendered on canvas.
740 * 744 *
@@ -771,7 +775,7 @@ EAPI EPhysics_World *ephysics_body_world_get(const EPhysics_Body *body);
771 * This association should be 1:1. You can have physics bodies without evas 775 * This association should be 1:1. You can have physics bodies without evas
772 * objects, but you can't have more than an evas object directly associated 776 * objects, but you can't have more than an evas object directly associated
773 * to this body. If you want more, you can use 777 * to this body. If you want more, you can use
774 * ephysics_body_event_callback_add() to register a callback that 778 * @ref ephysics_body_event_callback_add() to register a callback that
775 * will update the other evas objects. This function can be used to disable 779 * will update the other evas objects. This function can be used to disable
776 * updates of associated evas objects, or complement updates, like changing 780 * updates of associated evas objects, or complement updates, like changing
777 * evas objects properties under certain conditions of position or rotation. 781 * evas objects properties under certain conditions of position or rotation.
@@ -829,8 +833,9 @@ EAPI Evas_Object *ephysics_body_evas_object_get(const EPhysics_Body *body);
829 * on all the axises. 833 * on all the axises.
830 * 834 *
831 * There are two direct ways of modifying this geometry: 835 * There are two direct ways of modifying this geometry:
832 * @li With ephysics_body_geometry_set(); 836 * @li With @ref ephysics_body_geometry_set();
833 * @li When associating an evas object with ephysics_body_evas_object_set(). 837 * @li When associating an evas object with
838 * @ref ephysics_body_evas_object_set().
834 * 839 *
835 * When the world is simulated forces will be applied on objects 840 * When the world is simulated forces will be applied on objects
836 * with mass and position will be modified too. 841 * with mass and position will be modified too.
@@ -904,12 +909,13 @@ EAPI double ephysics_body_mass_get(const EPhysics_Body *body);
904 * Update the evas object associated to the body. 909 * Update the evas object associated to the body.
905 * 910 *
906 * This function should be called to update position and rotation of 911 * This function should be called to update position and rotation of
907 * the evas object associated to the body with ephysics_body_evas_object_set(). 912 * the evas object associated to the body with
913 * @ref ephysics_body_evas_object_set().
908 * It will take rate between pixels and meters set with 914 * It will take rate between pixels and meters set with
909 * ephysics_world_rate_set() in account. 915 * @ref ephysics_world_rate_set() in account.
910 * 916 *
911 * If an update callback wasn't set with 917 * If an update callback wasn't set with
912 * ephysics_body_event_callback_add(), this function will be executed 918 * @ref ephysics_body_event_callback_add(), this function will be executed
913 * after each physics simulation tick. If a callback was set, it won't be 919 * after each physics simulation tick. If a callback was set, it won't be
914 * called automatically. So inside this callback it could be called, or 920 * called automatically. So inside this callback it could be called, or
915 * a customized update could be implemented. 921 * a customized update could be implemented.
@@ -926,9 +932,9 @@ EAPI void ephysics_body_evas_object_update(EPhysics_Body *body);
926 * 932 *
927 * The registered callback will receives the body and extra user data that 933 * The registered callback will receives the body and extra user data that
928 * can be passed. From body it's possible to get the world it belongs to 934 * can be passed. From body it's possible to get the world it belongs to
929 * with ephysics_body_world_get(), the rate between pixels and meters 935 * with @ref ephysics_body_world_get(), the rate between pixels and meters
930 * with ephysics_world_rate_get() and the associated evas object with 936 * with @ref ephysics_world_rate_get() and the associated evas object with
931 * ephysics_body_evas_object_get(). 937 * @ref ephysics_body_evas_object_get().
932 * 938 *
933 * So it's enough to do customized updates or fix pointers in your program. 939 * So it's enough to do customized updates or fix pointers in your program.
934 * 940 *
@@ -944,11 +950,11 @@ EAPI void ephysics_body_evas_object_update(EPhysics_Body *body);
944 * 950 *
945 * If no callback is registered, the evas object associated to physics body 951 * If no callback is registered, the evas object associated to physics body
946 * will be automatically moved and rotated, taking rate between meters and 952 * will be automatically moved and rotated, taking rate between meters and
947 * pixels on account. This rate is set by ephysics_world_rate_set(). 953 * pixels on account. This rate is set by @ref ephysics_world_rate_set().
948 * 954 *
949 * If callbacks are registered, these function will be called and will 955 * If callbacks are registered, these function will be called and will
950 * be responsible for updating the evas object. If the default update 956 * be responsible for updating the evas object. If the default update
951 * is wanted, function ephysics_body_evas_object_update() can be called 957 * is wanted, function @ref ephysics_body_evas_object_update() can be called
952 * inside the callback. So you could make changes before and after 958 * inside the callback. So you could make changes before and after
953 * the evas object is updated. 959 * the evas object is updated.
954 * 960 *
@@ -1089,7 +1095,7 @@ EAPI double ephysics_body_friction_get(const EPhysics_Body *body);
1089 * When a impulse is applied over a body it will has its velocity changed. 1095 * When a impulse is applied over a body it will has its velocity changed.
1090 * This impulse will be applied on body's center, so it won't implies in 1096 * This impulse will be applied on body's center, so it won't implies in
1091 * rotating the body. For that is possible to apply a torque impulse with 1097 * rotating the body. For that is possible to apply a torque impulse with
1092 * ephysics_body_torque_impulse_apply(). 1098 * @ref ephysics_body_torque_impulse_apply().
1093 * 1099 *
1094 * @note Impulse is measured in Ns (Newton seconds). 1100 * @note Impulse is measured in Ns (Newton seconds).
1095 * 1101 *
@@ -1178,12 +1184,12 @@ EAPI double ephysics_body_rotation_get(EPhysics_Body *body);
1178 * between bodies and the world. Constraints can limit movement angle, 1184 * between bodies and the world. Constraints can limit movement angle,
1179 * translation, or work like a motor. 1185 * translation, or work like a motor.
1180 * 1186 *
1181 * Constraints can be created with ephysics_constraint_add() and removed with 1187 * Constraints can be created with @ref ephysics_constraint_add() and removed
1182 * ephysics_constraint_del(). Can be applied between two bodies or between 1188 * with @ref ephysics_constraint_del().
1183 * a body and the world. 1189 * Can be applied between two bodies or between a body and the world.
1184 */ 1190 */
1185 1191
1186typedef struct _EPhysics_Constraint EPhysics_Constraint; /**< Constraint handle, used to limit bodies movements. Created with ephysics_constraint_add() and deleted with ephysics_constraint_del(). */ 1192typedef struct _EPhysics_Constraint EPhysics_Constraint; /**< Constraint handle, used to limit bodies movements. Created with @ref ephysics_constraint_add() and deleted with @ref ephysics_constraint_del(). */
1187 1193
1188/** 1194/**
1189 * @brief 1195 * @brief