Internals - not intended for the libstage end user
[libstage - Stage library API]


Modules

Rotated Rectangles
Matrix occupancy quadtree
Raytracing in a Matrix
worldfile C wrappers

Data Structures

struct  gui_window_t
struct  _stg_property
struct  stg_property_callback_args_t
struct  stg_property_toggle_args_t
struct  _stg_model
struct  stg_type_record_t
struct  _stg_world

Defines

#define PRINT_ERR(m)   fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", __FILE__, __FUNCTION__)
#define PRINT_ERR1(m, a)   fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, __FILE__, __FUNCTION__)
#define PRINT_ERR2(m, a, b)   fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, __FILE__, __FUNCTION__)
#define PRINT_ERR3(m, a, b, c)   fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, c, __FILE__, __FUNCTION__)
#define PRINT_ERR4(m, a, b, c, d)   fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, c, d, __FILE__, __FUNCTION__)
#define PRINT_ERR5(m, a, b, c, d, e)   fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, c, d, e, __FILE__, __FUNCTION__)
#define PRINT_WARN(m)   printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", __FILE__, __FUNCTION__)
#define PRINT_WARN1(m, a)   printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, __FILE__, __FUNCTION__)
#define PRINT_WARN2(m, a, b)   printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, b, __FILE__, __FUNCTION__)
#define PRINT_WARN3(m, a, b, c)   printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, b, c, __FILE__, __FUNCTION__)
#define PRINT_WARN4(m, a, b, c, d)   printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, b, c, d, __FILE__, __FUNCTION__)
#define PRINT_WARN5(m, a, b, c, d, e)   printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, b, c, d, e, __FILE__, __FUNCTION__)
#define PRINT_MSG(m)   printf( "stage: "m"\n" )
#define PRINT_MSG1(m, a)   printf( "stage: "m"\n", a)
#define PRINT_MSG2(m, a, b)   printf( "stage: "m"\n,", a, b )
#define PRINT_MSG3(m, a, b, c)   printf( "stage: "m"\n", a, b, c )
#define PRINT_MSG4(m, a, b, c, d)   printf( "stage: "m"\n", a, b, c, d )
#define PRINT_MSG5(m, a, b, c, d, e)   printf( "stage: "m"\n", a, b, c, d, e )
#define PRINT_DEBUG(m)
#define PRINT_DEBUG1(m, a)
#define PRINT_DEBUG2(m, a, b)
#define PRINT_DEBUG3(m, a, b, c)
#define PRINT_DEBUG4(m, a, b, c, d)
#define PRINT_DEBUG5(m, a, b, c, d, e)

Typedefs

typedef int(* func_update_t )(struct _stg_model *)
typedef int(* func_startup_t )(struct _stg_model *)
typedef int(* func_shutdown_t )(struct _stg_model *)
typedef void(* func_load_t )(struct _stg_model *)
typedef void(* func_save_t )(struct _stg_model *)
typedef void(* stg_property_storage_func_t )(struct _stg_property *prop, void *data, size_t len)
typedef _stg_property stg_property_t

Functions

void gui_startup (int *argc, char **argv[])
void gui_poll (void)
void gui_shutdown (void)
void gui_load (gui_window_t *win, int section)
void gui_save (gui_window_t *win)
gui_window_tgui_world_create (stg_world_t *world)
void gui_world_destroy (stg_world_t *world)
int gui_world_update (stg_world_t *world)
void stg_world_add_model (stg_world_t *world, stg_model_t *mod)
void gui_world_geom (stg_world_t *world)
void gui_model_create (stg_model_t *mod)
void gui_model_destroy (stg_model_t *mod)
void gui_model_display_pose (stg_model_t *mod, char *verb)
void gui_model_features (stg_model_t *mod)
void gui_model_geom (stg_model_t *model)
void gui_model_mouse (stg_rtk_fig_t *fig, int event, int mode)
void gui_model_move (stg_model_t *mod)
void gui_model_nose (stg_model_t *model)
void gui_model_polygons (stg_model_t *model)
void gui_model_render_command (stg_model_t *mod)
void gui_model_render_config (stg_model_t *mod)
void gui_model_render_data (stg_model_t *mod)
void gui_window_menus_create (gui_window_t *win)
void gui_window_menus_destroy (gui_window_t *win)
void gui_add_view_item (const gchar *name, const gchar *label, const gchar *tooltip, GCallback callback, gboolean is_active, void *userdata)
int _model_update (stg_model_t *mod)
int _model_startup (stg_model_t *mod)
int _model_shutdown (stg_model_t *mod)
void stg_model_update_velocity (stg_model_t *model)
int stg_model_update_pose (stg_model_t *mod)
void stg_model_energy_consume (stg_model_t *mod, stg_watts_t rate)
void stg_model_map (stg_model_t *mod, gboolean render)
void stg_model_map_with_children (stg_model_t *mod, gboolean render)
stg_rtk_fig_tstg_model_prop_fig_create (stg_model_t *mod, stg_rtk_fig_t *array[], stg_id_t propid, stg_rtk_fig_t *parent, int layer)
void stg_model_render_geom (stg_model_t *mod)
void stg_model_render_pose (stg_model_t *mod)
void stg_model_render_polygons (stg_model_t *mod)
int stg_fig_clear_cb (stg_model_t *mod, char *name, void *data, size_t len, void *userp)
stg_rtk_fig_tstg_model_fig_create (stg_model_t *mod, const char *figname, const char *parentname, int layer)
stg_rtk_fig_tstg_model_get_fig (stg_model_t *mod, const char *figname)
void stg_model_fig_clear (stg_model_t *mod, const char *figname)
void stg_property_refresh (stg_property_t *prop)
void stg_property_destroy (stg_property_t *prop)
void stg_model_set_property_ex (stg_model_t *mod, const char *propname, void *data, size_t len, stg_property_storage_func_t func)
void model_update_cb (gpointer key, gpointer value, gpointer user)
void model_print_cb (gpointer key, gpointer value, gpointer user)
void model_destroy_cb (gpointer mod)

Define Documentation

#define PRINT_ERR  )     fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", __FILE__, __FUNCTION__)
 

#define PRINT_ERR1 m,
 )     fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, __FILE__, __FUNCTION__)
 

#define PRINT_ERR2 m,
a,
 )     fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, __FILE__, __FUNCTION__)
 

#define PRINT_ERR3 m,
a,
b,
 )     fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, c, __FILE__, __FUNCTION__)
 

#define PRINT_ERR4 m,
a,
b,
c,
 )     fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, c, d, __FILE__, __FUNCTION__)
 

#define PRINT_ERR5 m,
a,
b,
c,
d,
 )     fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, c, d, e, __FILE__, __FUNCTION__)
 

#define PRINT_WARN  )     printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", __FILE__, __FUNCTION__)
 

#define PRINT_WARN1 m,
 )     printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, __FILE__, __FUNCTION__)
 

#define PRINT_WARN2 m,
a,
 )     printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, b, __FILE__, __FUNCTION__)
 

#define PRINT_WARN3 m,
a,
b,
 )     printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, b, c, __FILE__, __FUNCTION__)
 

#define PRINT_WARN4 m,
a,
b,
c,
 )     printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, b, c, d, __FILE__, __FUNCTION__)
 

#define PRINT_WARN5 m,
a,
b,
c,
d,
 )     printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, b, c, d, e, __FILE__, __FUNCTION__)
 

#define PRINT_MSG  )     printf( "stage: "m"\n" )
 

#define PRINT_MSG1 m,
 )     printf( "stage: "m"\n", a)
 

#define PRINT_MSG2 m,
a,
 )     printf( "stage: "m"\n,", a, b )
 

#define PRINT_MSG3 m,
a,
b,
 )     printf( "stage: "m"\n", a, b, c )
 

#define PRINT_MSG4 m,
a,
b,
c,
 )     printf( "stage: "m"\n", a, b, c, d )
 

#define PRINT_MSG5 m,
a,
b,
c,
d,
 )     printf( "stage: "m"\n", a, b, c, d, e )
 

#define PRINT_DEBUG  ) 
 

#define PRINT_DEBUG1 m,
 ) 
 

#define PRINT_DEBUG2 m,
a,
 ) 
 

#define PRINT_DEBUG3 m,
a,
b,
 ) 
 

#define PRINT_DEBUG4 m,
a,
b,
c,
 ) 
 

#define PRINT_DEBUG5 m,
a,
b,
c,
d,
 ) 
 


Typedef Documentation

typedef int(* func_update_t)(struct _stg_model*)
 

typedef int(* func_startup_t)(struct _stg_model*)
 

typedef int(* func_shutdown_t)(struct _stg_model*)
 

typedef void(* func_load_t)(struct _stg_model*)
 

typedef void(* func_save_t)(struct _stg_model*)
 

typedef void(* stg_property_storage_func_t)( struct _stg_property* prop, void* data, size_t len )
 

define a callback function type that can be used to override the default data storage mechanism for a property. This is useful when you want to process some data before storing it, or if changing the property has side effects. For example, a storage callback is attached to the "geom" property: when the property is set the robot's size may change, so this the storage function makes sure the model's polygons are re-normalized and re-rendered.

typedef struct _stg_property stg_property_t
 

defines a property of a model.The property is uniquely identified by the string [name]. You probably should not access these fields directly - use stg_model_get_property() and stg_model_set_property() instead.


Function Documentation

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

void gui_poll void   ) 
 

void gui_shutdown void   ) 
 

void gui_load gui_window_t win,
int  section
 

void gui_save gui_window_t win  ) 
 

gui_window_t* gui_world_create stg_world_t world  ) 
 

void gui_world_destroy stg_world_t world  ) 
 

int gui_world_update stg_world_t world  ) 
 

void stg_world_add_model stg_world_t world,
stg_model_t mod
 

void gui_world_geom stg_world_t world  ) 
 

render the geometry of all models

void gui_model_create stg_model_t mod  ) 
 

void gui_model_destroy stg_model_t mod  ) 
 

void gui_model_display_pose stg_model_t mod,
char *  verb
 

void gui_model_features stg_model_t mod  ) 
 

void gui_model_geom stg_model_t model  ) 
 

void gui_model_mouse stg_rtk_fig_t fig,
int  event,
int  mode
 

void gui_model_move stg_model_t mod  ) 
 

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

void gui_model_nose stg_model_t model  ) 
 

void gui_model_polygons stg_model_t model  ) 
 

void gui_model_render_command stg_model_t mod  ) 
 

void gui_model_render_config stg_model_t mod  ) 
 

void gui_model_render_data stg_model_t mod  ) 
 

void gui_window_menus_create gui_window_t win  ) 
 

void gui_window_menus_destroy gui_window_t win  ) 
 

void gui_add_view_item const gchar *  name,
const gchar *  label,
const gchar *  tooltip,
GCallback  callback,
gboolean  is_active,
void *  userdata
 

int _model_update stg_model_t mod  ) 
 

int _model_startup stg_model_t mod  ) 
 

int _model_shutdown stg_model_t mod  ) 
 

void stg_model_update_velocity stg_model_t model  ) 
 

int stg_model_update_pose stg_model_t mod  ) 
 

void stg_model_energy_consume stg_model_t mod,
stg_watts_t  rate
 

void stg_model_map stg_model_t mod,
gboolean  render
 

void stg_model_map_with_children stg_model_t mod,
gboolean  render
 

stg_rtk_fig_t* stg_model_prop_fig_create stg_model_t mod,
stg_rtk_fig_t array[],
stg_id_t  propid,
stg_rtk_fig_t parent,
int  layer
 

void stg_model_render_geom stg_model_t mod  ) 
 

void stg_model_render_pose stg_model_t mod  ) 
 

void stg_model_render_polygons stg_model_t mod  ) 
 

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

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

stg_rtk_fig_t* stg_model_get_fig stg_model_t mod,
const char *  figname
 

void stg_model_fig_clear stg_model_t mod,
const char *  figname
 

void stg_property_refresh stg_property_t prop  ) 
 

void stg_property_destroy stg_property_t prop  ) 
 

void stg_model_set_property_ex stg_model_t mod,
const char *  prop,
void *  data,
size_t  len,
stg_property_storage_func_t  func
 

extended version of stg_model_set_property() which allows you to install a storage function for this property

void model_update_cb gpointer  key,
gpointer  value,
gpointer  user
 

void model_print_cb gpointer  key,
gpointer  value,
gpointer  user
 

void model_destroy_cb gpointer  mod  ) 
 


Generated on Thu Aug 11 13:08:10 2005 for Stage by  doxygen 1.4.0