Used to draw grid tile data. More...
#include <draw_grid_tile.H>
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_t * | tiles |
| 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 |
Used to draw grid tile data.
| 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:
| 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.
| void draw_grid_tile_t::display | ( | double | bot_pos[3] | ) | [virtual] |
Display grid tile data.
| bot_pos | Current bot position. |
Implements cajun::component_interface_t.
References draw_path(), draw_tile(), cajun::component_interface_t::m_display, m_grid_height, m_grid_path_data_dq, m_grid_tile_data_dq, m_grid_to_draw, POSZ, read_grid_path(), and read_grid_tile().
| void draw_grid_tile_t::draw_arrow | ( | double | x, | |
| double | y, | |||
| int | dx, | |||
| int | dy, | |||
| double | square_length | |||
| ) | [private] |
Describe me.
| 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.
| 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.
| 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.
| 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] |
Draw an individual tile.
| tile | The tile to draw. |
References ARROWS, blue, cajun::color_contour(), cajun::color_gradient(), CONTINUOUS, CONTOUR, draw_by_arrow(), draw_by_square(), green, m_color_function, m_grid_display_function, m_grid_height, red, SQUARES, and tile_value.
Referenced by display().
| 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] |
Toggle displaying of the data.
Implements cajun::component_interface_t.
References cajun::component_interface_t::m_display.
Referenced by cajun::simulation_draw_t::normalKey_callback().
| void draw_grid_tile_t::update_data | ( | double | bot_pos_[3] | ) | [virtual] |
double cajun::draw_grid_tile_t::blue [private] |
Referenced by draw_tile().
unsigned cajun::draw_grid_tile_t::buffer_size [private] |
Buffer size for grid tiles.
Referenced by draw_grid_tile_t().
Referenced by draw_by_arrow().
Referenced by draw_by_arrow().
double cajun::draw_grid_tile_t::green [private] |
Referenced by draw_tile().
double cajun::draw_grid_tile_t::m_cell_max_value [private] |
Referenced by draw_grid_tile_t().
double cajun::draw_grid_tile_t::m_cell_spacing [private] |
Referenced by draw_by_arrow(), draw_by_square(), draw_grid_tile_t(), and draw_path().
int cajun::draw_grid_tile_t::m_color_function [private] |
Referenced by draw_grid_tile_t(), and draw_tile().
int cajun::draw_grid_tile_t::m_grid_display_function [private] |
Referenced by draw_grid_tile_t(), and draw_tile().
double cajun::draw_grid_tile_t::m_grid_height [private] |
Referenced by display(), draw_arrow(), draw_grid_tile_t(), draw_path(), 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] |
Referenced by display(), draw_grid_tile_t(), and read_grid_path().
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] |
Referenced by display(), draw_grid_tile_t(), and read_grid_tile().
std::vector<grid_tile_data_t>* cajun::draw_grid_tile_t::m_grid_to_draw [private] |
Referenced by display(), draw_grid_tile_t(), read_grid_tile(), and ~draw_grid_tile_t().
std::vector<grid_tile_data_t>* cajun::draw_grid_tile_t::m_grid_to_populate [private] |
Referenced by draw_grid_tile_t(), read_grid_tile(), and ~draw_grid_tile_t().
double cajun::draw_grid_tile_t::m_last_tile_tstamp [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().
double cajun::draw_grid_tile_t::m_x_dx [private] |
Referenced by read_grid_tile().
double cajun::draw_grid_tile_t::m_x_dy [private] |
Referenced by read_grid_tile().
double cajun::draw_grid_tile_t::m_y_dx [private] |
Referenced by read_grid_tile().
double cajun::draw_grid_tile_t::m_y_dy [private] |
Referenced by read_grid_tile().
double cajun::draw_grid_tile_t::red [private] |
Referenced by draw_tile().
float cajun::draw_grid_tile_t::tile_value [private] |
Referenced by draw_tile().
grid_square_t* cajun::draw_grid_tile_t::tiles [private] |
Referenced by draw_grid_tile_t(), and ~draw_grid_tile_t().
1.6.1