cajun::draw_grid_tile_t Class Reference

Used to draw grid tile data. More...

#include <draw_grid_tile.H>

Inheritance diagram for cajun::draw_grid_tile_t:
cajun::component_interface_t

List of all members.

Public Member Functions

 draw_grid_tile_t (double cbviz_origin[3], conf_t &conf, int id, bool display, world_state_t *ws_)
 Draw class for grid tile data.
virtual ~draw_grid_tile_t ()
 Tear down func.
void update_data (double bot_pos_[3])
 Unused.
void display (double bot_pos[3])
 Display grid tile data.
void init_data ()
 Initialize data.
void toggle_display ()
 Toggle displaying of the data.

Private Member Functions

void draw_by_arrow (grid_tile_data_t const &tile, unsigned x, unsigned y)
 Describe me.
void draw_by_square (grid_tile_data_t const &tile, unsigned x, unsigned y)
 Describe me.
void draw_arrow (double x, double y, int dx, int dy, double square_length)
 Describe me.
void read_grid_path ()
 Read grid path data from world state.
void draw_path (double cell_size_)
 Describe me.
void read_grid_tile ()
 Read grid tile data from queue and transform data accordingly.
void draw_tile (grid_tile_data_t const &tile)
 Draw an individual tile.

Private Attributes

unsigned buffer_size
 Buffer size for grid tiles.
double red
double green
double blue
float tile_value
grid_square_ttiles
std::vector< grid_tile_data_t > * m_grid_to_draw
std::vector< grid_tile_data_t > * m_grid_to_populate
double m_last_tile_tstamp
grid_tile_data_t m_grid_tile
grid_path_data_t m_grid_path
double m_grid_height
double m_cell_max_value
double m_cell_spacing
int m_grid_display_function
int m_color_function
double m_x_dx
double m_x_dy
double m_y_dx
double m_y_dy
struct {
   int   dx
   int   dy
m_neighbor [8]
data_queue_reader_t
< grid_path_data_t > * 
m_grid_path_data_dq
data_queue_reader_t
< grid_tile_data_t > * 
m_grid_tile_data_dq

Detailed Description

Used to draw grid tile data.


Constructor & Destructor Documentation

draw_grid_tile_t::draw_grid_tile_t ( double  cbviz_origin_pos[3],
conf_t &  conf,
int  q_id_,
bool  display,
world_state_t *  ws_ 
)

Draw class for grid tile data.

References the following configuration params:

  • grid_height
  • cell_max_value
  • cell_spacing
  • grid_display_function
  • grid_display_color_gradient_function
Parameters:
cbviz_origin_pos Cbviz start location.
conf Configuration file to take data from.
q_id_ Queue ID to display data from.
display Initially enable display or not.
ws_ World state to take data from.

References buffer_size, cajun::component_interface_t::m_cbviz_origin, m_cell_max_value, m_cell_spacing, m_color_function, cajun::component_interface_t::m_display, m_grid_display_function, m_grid_height, m_grid_path_data_dq, m_grid_tile_data_dq, m_grid_to_draw, m_grid_to_populate, m_last_tile_tstamp, m_neighbor, cajun::component_interface_t::m_world_state, POSX, POSY, POSZ, and tiles.

draw_grid_tile_t::~draw_grid_tile_t (  )  [virtual]

Tear down func.

References m_grid_to_draw, m_grid_to_populate, and tiles.


Member Function Documentation

void draw_grid_tile_t::display ( double  bot_pos[3]  )  [virtual]
void draw_grid_tile_t::draw_arrow ( double  x,
double  y,
int  dx,
int  dy,
double  square_length 
) [private]

Describe me.

Parameters:
x Describe me.
y Describe me.
dx Describe me.
dy Describe me.
square_length Describe me.

References m_grid_height.

Referenced by draw_by_arrow().

void draw_grid_tile_t::draw_by_arrow ( grid_tile_data_t const &  tile,
unsigned  x,
unsigned  y 
) [private]

Describe me.

Parameters:
tile Tile to operate on.
x Describe me.
y Describe me.

References draw_arrow(), dx, dy, and m_cell_spacing.

Referenced by draw_tile().

void draw_grid_tile_t::draw_by_square ( grid_tile_data_t const &  tile,
unsigned  x,
unsigned  y 
) [private]

Describe me.

Parameters:
tile Describe me.
x Describe me.
y Describe me.

References cajun::draw_square(), and m_cell_spacing.

Referenced by draw_tile().

void draw_grid_tile_t::draw_path ( double  cell_size_  )  [private]

Describe me.

Parameters:
cell_size_ Describe me.

References cajun::draw_square(), m_cell_spacing, m_grid_height, and m_grid_path.

Referenced by display().

void draw_grid_tile_t::draw_tile ( grid_tile_data_t const &  tile  )  [private]
void draw_grid_tile_t::init_data (  )  [virtual]

Initialize data.

Reimplemented from cajun::component_interface_t.

void draw_grid_tile_t::read_grid_path (  )  [private]

Read grid path data from world state.

References cajun::component_interface_t::m_cbviz_origin, m_grid_path, m_grid_path_data_dq, POSX, and POSY.

Referenced by display().

void draw_grid_tile_t::read_grid_tile (  )  [private]

Read grid tile data from queue and transform data accordingly.

References cajun::component_interface_t::m_cbviz_origin, m_grid_tile_data_dq, m_grid_to_draw, m_grid_to_populate, m_last_tile_tstamp, m_x_dx, m_x_dy, m_y_dx, m_y_dy, POSX, and POSY.

Referenced by display().

void cajun::draw_grid_tile_t::toggle_display (  )  [inline, virtual]
void draw_grid_tile_t::update_data ( double  bot_pos_[3]  )  [virtual]

Unused.

Parameters:
bot_pos_ Current bot position.

Implements cajun::component_interface_t.


Member Data Documentation

Referenced by draw_tile().

Buffer size for grid tiles.

Referenced by draw_grid_tile_t().

Referenced by draw_by_arrow().

Referenced by draw_by_arrow().

Referenced by draw_tile().

Referenced by draw_grid_tile_t().

Referenced by draw_grid_tile_t(), and draw_tile().

Referenced by draw_grid_tile_t(), and draw_tile().

grid_path_data_t cajun::draw_grid_tile_t::m_grid_path [private]

Referenced by draw_path(), and read_grid_path().

data_queue_reader_t<grid_path_data_t>* cajun::draw_grid_tile_t::m_grid_path_data_dq [private]
grid_tile_data_t cajun::draw_grid_tile_t::m_grid_tile [private]
data_queue_reader_t<grid_tile_data_t>* cajun::draw_grid_tile_t::m_grid_tile_data_dq [private]
std::vector<grid_tile_data_t>* cajun::draw_grid_tile_t::m_grid_to_draw [private]
std::vector<grid_tile_data_t>* cajun::draw_grid_tile_t::m_grid_to_populate [private]

Referenced by draw_grid_tile_t(), and read_grid_tile().

struct { ... } cajun::draw_grid_tile_t::m_neighbor[8] [private]

Referenced by draw_grid_tile_t().

Referenced by read_grid_tile().

Referenced by read_grid_tile().

Referenced by read_grid_tile().

Referenced by read_grid_tile().

double cajun::draw_grid_tile_t::red [private]

Referenced by draw_tile().

Referenced by draw_tile().


The documentation for this class was generated from the following files:

Generated on Fri Apr 9 10:45:18 2010 for Visualizer by  doxygen 1.6.1