#include <area.h>
Public Member Functions | |
void | addGoal (int r1, double x2, double y2, int color, int arrow) |
void | addGridPoint (double x, double y, double cell_size, int color, int with_respect_to_robot=-1) |
int | addImage (std::string s, double x, double y, double scale=1.0) |
int | addImage (std::string s, double x, double y, double scale, std::string s1) |
int | addImage (std::string s, double x, double y, double sizex, double sizey, std::string s1) |
void | addLine (double x1, double y1, double x2, double y2, int color, bool permanent=false) |
void | addLink (int r1, int r2, int arrow, int color, float value, int set=0) |
void | addLink (int r1, int r2, int arrow, int color, int set=0) |
void | addPoint (double x, double y, int color, int with_respect_to_robot=-1) |
void | addPoint (double y, int color) |
int | addRobot () |
int | addRobot (std::string name) |
area () | |
void | clearGoals () |
void | clearLinks (int set=0) |
void | clearPoints () |
void | clearRobots () |
int | get_selected () |
int | getNumOfRobots () |
int | getRobotId (std::string name) |
int | getRobotPose (int id, double *x0, double *y0, double *ang) |
void | grabSnapshot () |
void | setBackGroundImage (std::string s) |
void | setJoinPoints (bool n) |
void | setMaintainAspectRatio (bool val) |
void | setMargins (double maxx, double maxy, double minx, double miny) |
void | setMaximumNumOfPoints (int n) |
void | setRobotColor (int idx, int c) |
void | setRobotPose (int id, double x0, double y0, double ang, int col) |
void | waitClick (double &x, double &y) |
void | waitClickInterrupt () |
Protected Member Functions | |
void | compute_environment () |
void | draw_robot (double x, double y, double a, int col, int mouse_over, double scale) |
void | draw_triangle (double x, double y, double a, int col, double scale) |
bool | on_area_button_press_event (GdkEventButton *ev) |
bool | on_area_button_release_event (GdkEventButton *ev) |
bool | on_area_expose_event (GdkEventExpose *ev) |
virtual bool | on_area_motion_notify_event (GdkEventMotion *ev) |
virtual bool | on_expose_event (GdkEventExpose *e) |
virtual void | on_realize () |
void | on_size_alloc (Gtk::Allocation &al) |
void | paint () |
bool | timer_callback () |
Protected Attributes | |
Glib::RefPtr< Gdk::Pixbuf > | bg_image |
double | canvas_maxx |
double | canvas_maxy |
double | canvas_minx |
double | canvas_miny |
sem_t | clickSem |
Gdk::Color | cols [10] |
float | fixed_scale |
Glib::RefPtr< Gdk::GC > | gc |
std::vector< Goal > | goalVec |
bool | has_bg_image |
std::vector< Img > | imgVec |
int | initialized |
bool | interrupted |
bool | join_points |
std::vector< Link > | linkVec [LINK_SETS] |
bool | maintain_aspect_ratio |
bool | marginSetted |
double | max_x |
double | max_y |
unsigned | maximumNumOfPoints |
double | min_x |
double | min_y |
int | mouseover |
int | painted |
std::vector< Point > | pointVec |
std::map< std::string, int > | roboMap |
std::vector< Robot > | roboVec |
double | scalex |
double | scaley |
int | selected |
pthread_mutex_t | sem |
unsigned int | snap_id |
Pango::FontDescription * | timesnr_12 |
Pango::FontDescription * | timesnr_8 |
Glib::RefPtr< Gdk::Window > | window |
double | xClick |
double | yClick |
double | zoom |
area::area | ( | ) |
void area::addGoal | ( | int | r1, |
double | x2, | ||
double | y2, | ||
int | color, | ||
int | arrow | ||
) |
void area::addGridPoint | ( | double | x, |
double | y, | ||
double | cell_size, | ||
int | color, | ||
int | with_respect_to_robot = -1 |
||
) |
int area::addImage | ( | std::string | s, |
double | x, | ||
double | y, | ||
double | scale = 1.0 |
||
) |
int area::addImage | ( | std::string | s, |
double | x, | ||
double | y, | ||
double | scale, | ||
std::string | s1 | ||
) |
int area::addImage | ( | std::string | s, |
double | x, | ||
double | y, | ||
double | sizex, | ||
double | sizey, | ||
std::string | s1 | ||
) |
void area::addLine | ( | double | x1, |
double | y1, | ||
double | x2, | ||
double | y2, | ||
int | color, | ||
bool | permanent = false |
||
) |
void area::addLink | ( | int | r1, |
int | r2, | ||
int | arrow, | ||
int | color, | ||
float | value, | ||
int | set = 0 |
||
) |
void area::addLink | ( | int | r1, |
int | r2, | ||
int | arrow, | ||
int | color, | ||
int | set = 0 |
||
) |
void area::addPoint | ( | double | x, |
double | y, | ||
int | color, | ||
int | with_respect_to_robot = -1 |
||
) |
void area::addPoint | ( | double | y, |
int | color | ||
) |
int area::addRobot | ( | ) |
int area::addRobot | ( | std::string | name | ) |
void area::clearGoals | ( | ) |
void area::clearLinks | ( | int | set = 0 | ) |
void area::clearPoints | ( | ) |
void area::clearRobots | ( | ) |
void area::compute_environment | ( | ) | [protected] |
void area::draw_robot | ( | double | x, |
double | y, | ||
double | a, | ||
int | col, | ||
int | mouse_over, | ||
double | scale = 0.1 |
||
) | [protected] |
void area::draw_triangle | ( | double | x, |
double | y, | ||
double | a, | ||
int | col, | ||
double | scale | ||
) | [protected] |
int area::get_selected | ( | ) |
int area::getNumOfRobots | ( | ) |
int area::getRobotId | ( | std::string | name | ) |
int area::getRobotPose | ( | int | id, |
double * | x0, | ||
double * | y0, | ||
double * | ang | ||
) |
void area::grabSnapshot | ( | ) |
bool area::on_area_button_press_event | ( | GdkEventButton * | ev | ) | [protected] |
bool area::on_area_button_release_event | ( | GdkEventButton * | ev | ) | [protected] |
bool area::on_area_expose_event | ( | GdkEventExpose * | ev | ) | [protected] |
bool area::on_area_motion_notify_event | ( | GdkEventMotion * | ev | ) | [protected, virtual] |
bool area::on_expose_event | ( | GdkEventExpose * | e | ) | [protected, virtual] |
void area::on_realize | ( | ) | [protected, virtual] |
void area::on_size_alloc | ( | Gtk::Allocation & | al | ) | [protected] |
void area::paint | ( | ) | [protected] |
void area::setBackGroundImage | ( | std::string | s | ) |
void area::setJoinPoints | ( | bool | n | ) |
void area::setMaintainAspectRatio | ( | bool | val | ) |
void area::setMargins | ( | double | maxx, |
double | maxy, | ||
double | minx, | ||
double | miny | ||
) |
void area::setMaximumNumOfPoints | ( | int | n | ) |
void area::setRobotColor | ( | int | idx, |
int | c | ||
) |
void area::setRobotPose | ( | int | id, |
double | x0, | ||
double | y0, | ||
double | ang, | ||
int | col = 0 |
||
) |
bool area::timer_callback | ( | ) | [protected] |
void area::waitClick | ( | double & | x, |
double & | y | ||
) |
void area::waitClickInterrupt | ( | ) |
Glib::RefPtr<Gdk::Pixbuf> area::bg_image [protected] |
double area::canvas_maxx [protected] |
double area::canvas_maxy [protected] |
double area::canvas_minx [protected] |
double area::canvas_miny [protected] |
sem_t area::clickSem [protected] |
Gdk::Color area::cols[10] [protected] |
float area::fixed_scale [protected] |
std::vector<Goal> area::goalVec [protected] |
bool area::has_bg_image [protected] |
std::vector<Img> area::imgVec [protected] |
int area::initialized [protected] |
bool area::interrupted [protected] |
bool area::join_points [protected] |
std::vector<Link> area::linkVec[LINK_SETS] [protected] |
bool area::maintain_aspect_ratio [protected] |
bool area::marginSetted [protected] |
double area::max_x [protected] |
double area::max_y [protected] |
unsigned area::maximumNumOfPoints [protected] |
double area::min_x [protected] |
double area::min_y [protected] |
int area::mouseover [protected] |
int area::painted [protected] |
std::vector<Point> area::pointVec [protected] |
std::map<std::string,int> area::roboMap [protected] |
std::vector<Robot> area::roboVec [protected] |
double area::scalex [protected] |
double area::scaley [protected] |
int area::selected [protected] |
unsigned int area::snap_id [protected] |
Pango::FontDescription* area::timesnr_12 [protected] |
Pango::FontDescription* area::timesnr_8 [protected] |
Glib::RefPtr<Gdk::Window> area::window [protected] |
double area::xClick [protected] |
double area::yClick [protected] |
double area::zoom [protected] |