Enlightenment CVS committal
Author : pfritz
Project : e17
Module : proto/e_phys
Dir : e17/proto/e_phys/src/lib
Modified Files:
e_phys_force.c e_phys_particle.c e_phys_world.c
Log Message:
add some doxy. (I hope they are correct)
===================================================================
RCS file: /cvs/e/e17/proto/e_phys/src/lib/e_phys_force.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_phys_force.c 27 Nov 2006 21:02:42 -0000 1.3
+++ e_phys_force.c 7 Oct 2007 01:04:45 -0000 1.4
@@ -25,7 +25,6 @@
e_phys_force_init(E_Phys_Force *force, E_Phys_World *world, void (*apply_func)
(E_Phys_Force *force), void (*free_func) (E_Phys_Force *force))
{
force->world = world;
- force->world = world;
if (world) world->forces = evas_list_append(world->forces, force);
force->apply = apply_func;
===================================================================
RCS file: /cvs/e/e17/proto/e_phys/src/lib/e_phys_particle.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_phys_particle.c 13 Sep 2006 04:42:02 -0000 1.1
+++ e_phys_particle.c 7 Oct 2007 01:04:45 -0000 1.2
@@ -1,5 +1,15 @@
#include "E_Phys.h"
+/**
+ * @param world - the world to work with
+ * @param mass - The mass of the new particle
+ * @param x - The x coordinate of the location
+ * @param y - The y coordinate of the location
+ * @param v_x - The x component of the velocity (FIXME: what is the unit?)
+ * @param v_y - The y component of the velocity
+ * @return Returns the new created particle
+ * @brief Creates a new particle.
+ */
E_Phys_Particle *
e_phys_particle_add(E_Phys_World *world, float mass, float x, float y, float
v_x, float v_y)
{
@@ -17,6 +27,13 @@
return p;
}
+/**
+ * @param p - the particle to work with
+ * @param w - The new width of the particle
+ * @param h - The new height of the particle
+ * @return Returns no value.
+ * @brief Set the new size of the particle
+ */
void
e_phys_particle_size_set(E_Phys_Particle *p, float w, float h)
{
@@ -24,6 +41,11 @@
p->h = h;
}
+/**
+ * @param p - the particle to delete
+ * @return Returns no value.
+ * @brief Remove the given particle from its world and free it
+ */
void
e_phys_particle_del(E_Phys_Particle *p)
{
@@ -35,6 +57,14 @@
}
}
+/**
+ * Do not use this function, as long you really know what you are doning.
+ * Use e_phys_particle_del() instead.
+ *
+ * @param p - the particle to free
+ * @return Returns no value.
+ * @brief Free the given particle.
+ */
void
e_phys_particle_free(E_Phys_Particle *p)
{
===================================================================
RCS file: /cvs/e/e17/proto/e_phys/src/lib/e_phys_world.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- e_phys_world.c 22 Mar 2007 17:04:32 -0000 1.5
+++ e_phys_world.c 7 Oct 2007 01:04:45 -0000 1.6
@@ -5,6 +5,12 @@
static void e_phys_world_satisfy_constraints(E_Phys_World *world);
static int e_phys_world_timer(void *data);
+/**
+ * @param w - The width of the new created world
+ * @param h - The height of the new created world
+ * @return Returns a newly allocated world on success, NULL on failure.
+ * @brief Create a new world
+ */
E_Phys_World *
e_phys_world_add(int w, int h)
{
@@ -17,6 +23,12 @@
return world;
}
+/**
+ * @param world - the world to free
+ * @return Returns no value.
+ * @brief Free all particles, forces and constraints in this world and the
world
+ * itselft.
+ */
void
e_phys_world_free(E_Phys_World *world)
{
@@ -58,6 +70,11 @@
return 1;
}
+/**
+ * @param world - the world to work with
+ * @return Returns no value.
+ * @brief Start the interactions to appear
+ */
void
e_phys_world_go(E_Phys_World *world)
{
@@ -65,6 +82,11 @@
world->timer = ecore_timer_add(world->dt, e_phys_world_timer, world);
}
+/**
+ * @param world - the world to work with
+ * @return Returns no value.
+ * @brief Stop the interactions to appear
+ */
void
e_phys_world_stop(E_Phys_World *world)
{
@@ -72,6 +94,13 @@
world->timer = NULL;
}
+/**
+ * @param world - the world to work with
+ * @param func - The callback that will be called ...
+ * @param data - The data that will be passed to the callback.
+ * @return Returns no value.
+ * @brief Set the update callback
+ */
void
e_phys_world_update_func_set(E_Phys_World *world, void (*func) (void *data,
E_Phys_World *world), void *data)
{
@@ -79,6 +108,17 @@
world->update_data = data;
}
+/**
+ * This function searches the nearest particle. If there are particles with
+ * the same distance, the first found will be return. If there is not any
+ * particle, NULL will be returned.
+ *
+ * @param world - the world to work with
+ * @param x - The x coordinate
+ * @param y - The y coordinate
+ * @return Returns the nearest particale to the given point
+ * @brief search the nearest particle.
+ */
E_Phys_Particle *
e_phys_world_nearest_particle(E_Phys_World *world, int x, int y)
{
@@ -108,6 +148,13 @@
return nearest;
}
+/**
+ * @param world - the world to work with
+ * @param w - The new width
+ * @param h - The new height
+ * @return Returns no value.
+ * @brief set the new size of the given world.
+ */
void
e_phys_world_size_set(E_Phys_World *world, int w, int h)
{
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs