Main Page   Hardware Class Hierarchy   Hardware API     Mapping Class Hierarchy  Mapping API 

Drawing_Area Class Reference

A class representing the drawing area of the screen on which the robot's internal map is drawn. More...

#include <drawing_area.h>


Public Member Functions

 Drawing_Area (int x, int y, int w, int h)
OOMRM_STATIC void initialize (void)
 Constructor.

int step_through (int mapx, int mapy, int radius, RADIAN radian)
int real_time (int &, int &, float &, int irec)
OOMRM_STATIC void mapsize (int ms)
 fl_map use.

OOMRM_STATIC bool transformxy (int ix, int iy, float &sx, float &sy, float UNIT)
 Transform coordinate from X to pixels.

void new_display ()
 Internal stuff?

OOMRM_STATIC void circle (int, int, int, CPixel *const, COLOR)
 Draws a circle on the map at center cx,cy with radius R, and Window buffer.

OOMRM_STATIC void line (int cx, int cy, int radius, RADIAN radian, CPixel *const buffer, COLOR color=BLACK)
 Draws a line on the map from cx,cy length radius and orientation radians RADIAN.

OOMRM_STATIC void user_updates (short int, short int, int, int)
 Misnomer: fills in a region at mapx, mapy dimensions totalx, totaly.

OOMRM_STATIC void update3x5 (const pose_chain &cc)
 Loads the 3x5 cards into the simulator to be drawn on the map.

void print_path (CPixel *const buffer, int width, int height)
void resize (int, int, int, int)
 Internal stuff?

int idle (int, int, int, RADIAN)
 redraw function.

OOMRM_STATIC void Refresh (void)
OOMRM_STATIC Fl_Tabs * tabs (void)
 Whether map has been updated since last save.

OOMRM_STATIC void tabs (Fl_Tabs *o)
OOMRM_STATIC void map (Fl_Group *o)
OOMRM_STATIC Fl_Group * MapTab (void)
OOMRM_STATIC void MapTab (Fl_Group *imap)
OOMRM_STATIC Fl_Group * Map_Window (void)
OOMRM_STATIC bool Resize (void)
OOMRM_STATIC void reload_waypoints (void)
 Returns true if window has been resized or moved.

OOMRM_STATIC void playback_fn (const char *const fn)
OOMRM_STATIC const char *const playback_fn (void)

Static Public Member Functions

void map_reset (short iwidth, short iheight)
void destination (int dx, int dy, int length, RADIAN radian)
 Sets destination center orgin of travel and length for drawing path.

float local_unit ()

Data Fields

OOMRM_STATIC OOMRM_POSITION_WIDGETS Position
OOMRM_STATIC OOMRM_CAMERA_WIDGETS Camera_Settings
OOMRM_STATIC label_t mylabel
OOMRM_STATIC Fl_Output * response
 Label to display on Window.


Static Public Attributes

int W
int H
 Width and Height of screen.

short _map_width
short _map_height

Protected Attributes

OOMRM_STATIC float GLOBAL_UNIT
 How many pixels per user unit (millimeter, decimeter).

OOMRM_STATIC float LOCAL_UNIT
 How many pixels per map unit.


Static Protected Attributes

playback_reader _reader
int startx
int starty

Private Member Functions

void OOMRM_STATIC fill_cell (int ix, int iy, CPixel *const buffer, COLOR terrain, LINETYPE line, float UNIT)
void world_walls (CPixel *const buffer, int width, int height)
void robot_walls (CPixel *const buffer, int width, int height)
void gridlines (CPixel *const buffer)
void draw ()
int handle (int)

Private Attributes

OOMRM_STATIC point cards []
OOMRM_STATIC int cardtop
OOMRM_STATIC OGrid_rgrid
OOMRM_STATIC bool _dirty
float map_scale_factor
CPixelPbuffer
float t2
float t1
OOMRM_STATIC Fl_Tabs * WINDOW_TAB
OOMRM_STATIC Fl_Group * MAP_GROUP
OOMRM_STATIC Fl_Group * MAP_WINDOW

Static Private Attributes

pose _orgin
int _travel_distance

Friends

void vs_cb (Fl_Scrollbar *vs, void *)
void hs_cb (Fl_Scrollbar *vs, void *)
void mapsize_cb (Fl_Counter *, void *)


Detailed Description

A class representing the drawing area of the screen on which the robot's internal map is drawn.

Used by fl_map FLTK class and used by the simulator (mrsim). Provides a few methods for external use:


Constructor & Destructor Documentation

Drawing_Area int  x,
int  y,
int  w,
int  h
 


Member Function Documentation

OOMRM_STATIC void circle int  ,
int  ,
int  ,
CPixel const,
COLOR 
 

Draws a circle on the map at center cx,cy with radius R, and Window buffer.

void destination int  dx,
int  dy,
int  length,
RADIAN  radian
[static]
 

Sets destination center orgin of travel and length for drawing path.

void draw  )  [private]
 

void OOMRM_STATIC fill_cell int  ix,
int  iy,
CPixel *const  buffer,
COLOR  terrain,
LINETYPE  line,
float  UNIT
[private]
 

void gridlines CPixel *const  buffer  )  [private]
 

int handle int   )  [private]
 

int idle int  ,
int  ,
int  ,
RADIAN 
 

redraw function.

OOMRM_STATIC void initialize void   ) 
 

Constructor.

OOMRM_STATIC void line int  cx,
int  cy,
int  radius,
RADIAN  radian,
CPixel *const  buffer,
COLOR  color = BLACK
 

Draws a line on the map from cx,cy length radius and orientation radians RADIAN.

float local_unit  )  [static]
 

OOMRM_STATIC void map Fl_Group *  o  ) 
 

void map_reset short  iwidth,
short  iheight
[static]
 

OOMRM_STATIC Fl_Group* Map_Window void   ) 
 

OOMRM_STATIC void mapsize int  ms  ) 
 

fl_map use.

OOMRM_STATIC void MapTab Fl_Group *  imap  ) 
 

OOMRM_STATIC Fl_Group* MapTab void   ) 
 

void new_display  ) 
 

Internal stuff?

OOMRM_STATIC const char* const playback_fn void   ) 
 

OOMRM_STATIC void playback_fn const char *const  fn  ) 
 

void print_path CPixel *const  buffer,
int  width,
int  height
 

int real_time int &  ,
int &  ,
float &  ,
int  irec
 

OOMRM_STATIC void Refresh void   ) 
 

OOMRM_STATIC void reload_waypoints void   ) 
 

Returns true if window has been resized or moved.

OOMRM_STATIC bool Resize void   ) 
 

void resize int  ,
int  ,
int  ,
int 
 

Internal stuff?

void robot_walls CPixel *const  buffer,
int  width,
int  height
[private]
 

int step_through int  mapx,
int  mapy,
int  radius,
RADIAN  radian
 

OOMRM_STATIC void tabs Fl_Tabs *  o  ) 
 

OOMRM_STATIC Fl_Tabs* tabs void   ) 
 

Whether map has been updated since last save.

OOMRM_STATIC bool transformxy int  ix,
int  iy,
float &  sx,
float &  sy,
float  UNIT
 

Transform coordinate from X to pixels.

OOMRM_STATIC void update3x5 const pose_chain cc  ) 
 

Loads the 3x5 cards into the simulator to be drawn on the map.

OOMRM_STATIC void user_updates short  int,
short  int,
int  ,
int 
 

Misnomer: fills in a region at mapx, mapy dimensions totalx, totaly.

void world_walls CPixel *const  buffer,
int  width,
int  height
[private]
 


Friends And Related Function Documentation

void hs_cb Fl_Scrollbar *  vs,
void * 
[friend]
 

void mapsize_cb Fl_Counter *  ,
void * 
[friend]
 

void vs_cb Fl_Scrollbar *  vs,
void * 
[friend]
 


Field Documentation

OOMRM_STATIC bool _dirty [private]
 

short _map_height [static]
 

short _map_width [static]
 

pose _orgin [static, private]
 

playback_reader _reader [static, protected]
 

OOMRM_STATIC OGrid* _rgrid [private]
 

int _travel_distance [static, private]
 

OOMRM_STATIC OOMRM_CAMERA_WIDGETS Camera_Settings
 

OOMRM_STATIC point cards[] [private]
 

OOMRM_STATIC int cardtop [private]
 

OOMRM_STATIC float GLOBAL_UNIT [protected]
 

How many pixels per user unit (millimeter, decimeter).

int H [static]
 

Width and Height of screen.

OOMRM_STATIC float LOCAL_UNIT [protected]
 

How many pixels per map unit.

OOMRM_STATIC Fl_Group* MAP_GROUP [private]
 

float map_scale_factor [private]
 

OOMRM_STATIC Fl_Group* MAP_WINDOW [private]
 

OOMRM_STATIC label_t mylabel
 

CPixel* Pbuffer [private]
 

OOMRM_STATIC OOMRM_POSITION_WIDGETS Position
 

OOMRM_STATIC Fl_Output* response
 

Label to display on Window.

int startx [static, protected]
 

int starty [static, protected]
 

float t1 [private]
 

float t2 [private]
 

int W [static]
 

OOMRM_STATIC Fl_Tabs* WINDOW_TAB [private]
 


Generated on Mon Oct 8 19:32:24 2007 for OOMRM Mapping API by doxygen1.3