#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <math.h>#include <robomath.h>#include <mcl.h>#include "mcl_gtk.h"
Functions | |
| void | print_usage () |
| Print usage. | |
| int | parseopt (int argc, char **argv) |
| Parse program arguments. | |
| void | init_robot (struct mcl_model *mcl) |
| Init the robot`s position. | |
| void | init_mcl (struct mcl_model *mcl) |
| Initialization of the MCL model for our robot. | |
| void | move (struct mcl_model *mcl, double dx, double dy, double dangle) |
| Move the particles and the robot by a specified distance. | |
| void | quit () |
| FUNCTION PROTOTYPES. | |
| void | load_pixmaps (GtkWidget *widget, struct moveable_obj *moveable, struct pixmap_obj *pixmaps) |
| Get the width and height for the xpm data. | |
| void | load_scene_pixmap (GtkWidget *widget) |
| Load all scene pixmaps. | |
| gint | expose_event (GtkWidget *widget, GdkEventExpose *event) |
| gint | repaint (gpointer data) |
| void | test_repaint () |
| GKT test function. | |
| void | init_animation (int argc, char *argv[], void(*repaint_func)()) |
| Initialization of the animation. | |
| int | get_color (double weight) |
| Get color index depending on the weight of particles. | |
| void | test_animation (int argc, char *argv[]) |
| Test GTK animation. | |
| void | scene_repaint () |
| Repaint the scene (background, particles, robot, ...). | |
| void | initdata () |
| Init data structures. | |
| void | destroydata () |
| Destroy data. | |
| int | main (int _argc, char **_argv) |
| Main function. | |
Variables | |
| struct mcl_model | mcl |
| void(* | repaint_objects )() |
| void destroydata | ( | ) |
Destroy data.
| gint expose_event | ( | GtkWidget * | widget, | |
| GdkEventExpose * | event | |||
| ) |
| int get_color | ( | double | weight | ) |
Get color index depending on the weight of particles.

| void init_animation | ( | int | argc, | |
| char * | argv[], | |||
| void(*)() | repaint_func | |||
| ) |
Initialization of the animation.
| argc | program`s arguments count | |
| argv | program`s arguments | |
| repaint_func | repaint function |

| void init_mcl | ( | struct mcl_model * | mcl | ) |
Initialization of the MCL model for our robot.
| mcl | the MCL model |

| void init_robot | ( | struct mcl_model * | mcl | ) |
Init the robot`s position.

| void initdata | ( | ) |
Init data structures.

| void load_pixmaps | ( | GtkWidget * | widget, | |
| struct moveable_obj * | moveable, | |||
| struct pixmap_obj * | pixmaps | |||
| ) |
Get the width and height for the xpm data.
Load pixmaps according to predefined data struct.
| void load_scene_pixmap | ( | GtkWidget * | widget | ) |
Load all scene pixmaps.

| int main | ( | int | _argc, | |
| char ** | _argv | |||
| ) |
Main function.
| argc | Arguments counter | |
| argv | Arguments array |

| void move | ( | struct mcl_model * | mcl, | |
| double | dx, | |||
| double | dy, | |||
| double | dangle | |||
| ) |
Move the particles and the robot by a specified distance.
| mcl | the MCL model | |
| dx | movement in axis X | |
| dy | movement in axis Y | |
| dangle | turning |

| int parseopt | ( | int | argc, | |
| char ** | argv | |||
| ) |
| void print_usage | ( | ) |
Print usage.

| void quit | ( | ) |
FUNCTION PROTOTYPES.
| gint repaint | ( | gpointer | data | ) |
| void scene_repaint | ( | ) |
Repaint the scene (background, particles, robot, ...).
Repaint the scene (background, points, ...).

| void test_animation | ( | int | argc, | |
| char * | argv[] | |||
| ) |
Test GTK animation.

| void test_repaint | ( | ) |
GKT test function.
| void(* repaint_objects)() |
1.7.1