Functions | Variables

mcl_gtk.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include <robomath.h>
#include <mcl.h>
#include "mcl_gtk.h"
Include dependency graph for mcl_gtk.c:

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 )()

Function Documentation

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.

Here is the caller graph for this function:

void init_animation ( int  argc,
char *  argv[],
void(*)()  repaint_func 
)

Initialization of the animation.

Parameters:
argc program`s arguments count
argv program`s arguments
repaint_func repaint function

Here is the call graph for this function:

void init_mcl ( struct mcl_model mcl  ) 

Initialization of the MCL model for our robot.

Parameters:
mcl the MCL model

Here is the caller graph for this function:

void init_robot ( struct mcl_model mcl  ) 

Init the robot`s position.

Here is the caller graph for this function:

void initdata (  ) 

Init data structures.

Here is the call graph for this function:

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.

Here is the call graph for this function:

int main ( int  _argc,
char **  _argv 
)

Main function.

Parameters:
argc Arguments counter
argv Arguments array

Here is the call graph for this function:

void move ( struct mcl_model mcl,
double  dx,
double  dy,
double  dangle 
)

Move the particles and the robot by a specified distance.

Parameters:
mcl the MCL model
dx movement in axis X
dy movement in axis Y
dangle turning

Here is the call graph for this function:

int parseopt ( int  argc,
char **  argv 
)

Parse program arguments.

Store flags to a global variable.

Parameters:
argc Arguments counter (given from main())
argv Arguments array (given from main())

Here is the call graph for this function:

void print_usage (  ) 

Print usage.

Here is the call graph for this function:

void quit (  ) 

FUNCTION PROTOTYPES.

gint repaint ( gpointer  data  ) 
void scene_repaint (  ) 

Repaint the scene (background, particles, robot, ...).

Repaint the scene (background, points, ...).

Here is the call graph for this function:

void test_animation ( int  argc,
char *  argv[] 
)

Test GTK animation.

Here is the call graph for this function:

void test_repaint (  ) 

GKT test function.


Variable Documentation

struct mcl_model mcl
void(* repaint_objects)()