gui.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <math.h>
#include "stage_internal.h"
#include "gui.h"

Defines

#define STG_DEFAULT_WINDOW_WIDTH   700
#define STG_DEFAULT_WINDOW_HEIGHT   740
#define STG_POLY_THRESHOLD   10

Functions

void gui_load (gui_window_t *win, int section)
void gui_save (gui_window_t *win)
void gui_startup (int *argc, char **argv[])
void gui_poll (void)
void gui_shutdown (void)
gui_window_t * gui_window_create (stg_world_t *world, int xdim, int ydim)
void gui_window_destroy (gui_window_t *win)
gui_window_t * gui_world_create (stg_world_t *world)
void gui_world_render_cell (stg_rtk_fig_t *fig, stg_cell_t *cell)
void gui_world_render_cell_occupied (stg_rtk_fig_t *fig, stg_cell_t *cell)
void gui_world_render_cell_cb (gpointer cell, gpointer fig)
void render_matrix_object (gpointer key, gpointer value, gpointer user)
void gui_world_matrix_table (stg_world_t *world, gui_window_t *win)
void gui_pose (stg_rtk_fig_t *fig, stg_model_t *mod)
void gui_pose_cb (gpointer key, gpointer value, gpointer user)
int gui_world_update (stg_world_t *world)
void gui_world_destroy (stg_world_t *world)
void gui_model_trail (stg_model_t *mod)
void gui_model_trail_cb (gpointer key, gpointer value, gpointer user)
void gui_world_trails (stg_world_t *world)
const char * gui_model_describe (stg_model_t *mod)
void gui_model_display_pose (stg_model_t *mod, char *verb)
void gui_model_mouse (stg_rtk_fig_t *fig, int event, int mode)
int stg_fig_clear_cb (stg_model_t *mod, char *name, void *data, size_t len, void *userp)
void gui_model_create (stg_model_t *mod)
void gui_model_destroy (stg_model_t *mod)
void gui_model_render_geom_global (stg_model_t *mod, stg_rtk_fig_t *fig)
void gui_model_move (stg_model_t *mod)
void gui_model_render_geom (stg_model_t *mod)
void gui_model_render_geom_cb (gpointer key, gpointer value, gpointer user)
void gui_world_geom (stg_world_t *world)
void stg_model_fig_clear (stg_model_t *mod, const char *figname)
int stg_model_fig_clear_cb (stg_model_t *mod, void *data, size_t len, void *userp)
stg_rtk_fig_t * stg_model_get_fig (stg_model_t *mod, const char *figname)
stg_rtk_fig_t * stg_model_fig_create (stg_model_t *mod, const char *figname, const char *parentname, int layer)

Variables

stg_rtk_fig_t * fig_debug_rays = NULL
stg_rtk_fig_t * fig_debug_geom = NULL
stg_rtk_fig_t * fig_debug_matrix = NULL
stg_rtk_fig_t * fig_trails = NULL
int _render_matrix_deltas = FALSE

Define Documentation

#define STG_DEFAULT_WINDOW_WIDTH   700
 

#define STG_DEFAULT_WINDOW_HEIGHT   740
 

#define STG_POLY_THRESHOLD   10
 


Function Documentation

void gui_load gui_window_t *  win,
int  section
 

void gui_save gui_window_t *  win  ) 
 

void gui_startup int *  argc,
char **  argv[]
 

void gui_poll void   ) 
 

void gui_shutdown void   ) 
 

gui_window_t* gui_window_create stg_world_t *  world,
int  xdim,
int  ydim
 

void gui_window_destroy gui_window_t *  win  ) 
 

gui_window_t* gui_world_create stg_world_t *  world  ) 
 

void gui_world_render_cell stg_rtk_fig_t *  fig,
stg_cell_t *  cell
 

void gui_world_render_cell_occupied stg_rtk_fig_t *  fig,
stg_cell_t *  cell
 

void gui_world_render_cell_cb gpointer  cell,
gpointer  fig
 

void render_matrix_object gpointer  key,
gpointer  value,
gpointer  user
 

void gui_world_matrix_table stg_world_t *  world,
gui_window_t *  win
 

void gui_pose stg_rtk_fig_t *  fig,
stg_model_t *  mod
 

void gui_pose_cb gpointer  key,
gpointer  value,
gpointer  user
 

int gui_world_update stg_world_t *  world  ) 
 

void gui_world_destroy stg_world_t *  world  ) 
 

void gui_model_trail stg_model_t *  mod  ) 
 

void gui_model_trail_cb gpointer  key,
gpointer  value,
gpointer  user
 

wrapper

void gui_world_trails stg_world_t *  world  ) 
 

render a trail cell for all models

const char* gui_model_describe stg_model_t *  mod  ) 
 

void gui_model_display_pose stg_model_t *  mod,
char *  verb
 

void gui_model_mouse stg_rtk_fig_t *  fig,
int  event,
int  mode
 

int stg_fig_clear_cb stg_model_t *  mod,
char *  name,
void *  data,
size_t  len,
void *  userp
 

void gui_model_create stg_model_t *  mod  ) 
 

void gui_model_destroy stg_model_t *  mod  ) 
 

void gui_model_render_geom_global stg_model_t *  mod,
stg_rtk_fig_t *  fig
 

render a model's global pose vector

void gui_model_move stg_model_t *  mod  ) 
 

move a model's figure to the model's current location

void gui_model_render_geom stg_model_t *  mod  ) 
 

render a model's geometry if geom viewing is enabled

void gui_model_render_geom_cb gpointer  key,
gpointer  value,
gpointer  user
 

wrapper for gui_model_render_geom for use in callbacks

void gui_world_geom stg_world_t *  world  ) 
 

render the geometry of all models

void stg_model_fig_clear stg_model_t *  mod,
const char *  figname
 

int stg_model_fig_clear_cb stg_model_t *  mod,
void *  data,
size_t  len,
void *  userp
 

stg_rtk_fig_t* stg_model_get_fig stg_model_t *  mod,
const char *  figname
 

stg_rtk_fig_t* stg_model_fig_create stg_model_t *  mod,
const char *  figname,
const char *  parentname,
int  layer
 


Variable Documentation

stg_rtk_fig_t* fig_debug_rays = NULL
 

stg_rtk_fig_t* fig_debug_geom = NULL
 

stg_rtk_fig_t * fig_debug_matrix = NULL
 

stg_rtk_fig_t* fig_trails = NULL
 

int _render_matrix_deltas = FALSE