Drawing widget that draws an (MSL-) soccer field with robots, opponents, and balls. More...
#include <>>
Public Member Functions | |
| FieldView (fawkes::WorldInfoDataContainer *data, bool show_pose=true, bool show_ball=true, bool show_opponents=false) | |
| Constructor. | |
| virtual | ~FieldView () |
| Destructor. | |
| bool | toggle_show_pose (Glib::ustring name) |
| Toggle whether to show the pose of the specified robot. | |
| bool | toggle_show_ball (Glib::ustring name) |
| Toggle whether to show the ball detected by the specified robot. | |
| bool | toggle_show_opponents (Glib::ustring name) |
| Toggle whether to show the opponents seen by the specified robot. | |
| void | remove_host (Glib::ustring name) |
| Remove a host. | |
Protected Member Functions | |
| virtual bool | on_expose_event (GdkEventExpose *event) |
| Overloaded signal handler. | |
Drawing widget that draws an (MSL-) soccer field with robots, opponents, and balls.
Definition at line 33 of file field_view.h.
| FieldView::FieldView | ( | fawkes::WorldInfoDataContainer * | data, | |
| bool | show_pose = true, |
|||
| bool | show_ball = true, |
|||
| bool | show_opponents = false | |||
| ) |
Constructor.
| show_pose | default value for show pose | |
| show_ball | default value for show ball | |
| show_opponents | default value for show opponents | |
| data | pointer to a WorldInfoDataContainer that is used as the data source |
Definition at line 47 of file field_view.cpp.
| FieldView::~FieldView | ( | ) | [virtual] |
Destructor.
Definition at line 60 of file field_view.cpp.
| bool FieldView::on_expose_event | ( | GdkEventExpose * | event | ) | [protected, virtual] |
Overloaded signal handler.
This is were the drawing action happens.
| event | the event that triggered the signal |
Definition at line 141 of file field_view.cpp.
References fawkes::WorldInfoDataContainer::get_ball_pos_global(), fawkes::WorldInfoDataContainer::get_ball_pos_relative(), fawkes::WorldInfoDataContainer::get_hosts(), fawkes::WorldInfoDataContainer::get_opponent_pos(), fawkes::WorldInfoDataContainer::get_robot_pose(), fawkes::HomCoord::x(), fawkes::HomPose2d::x(), fawkes::HomCoord::y(), fawkes::HomPose2d::y(), and fawkes::HomPose2d::yaw().
| void FieldView::remove_host | ( | Glib::ustring | name | ) |
Remove a host.
| name | the name of the host to be removed. |
Definition at line 128 of file field_view.cpp.
Referenced by WorldInfoViewer::update().
| bool FieldView::toggle_show_ball | ( | Glib::ustring | name | ) |
Toggle whether to show the ball detected by the specified robot.
| name | the hostname of the robot |
Definition at line 89 of file field_view.cpp.
Referenced by WorldInfoViewer::update().
| bool FieldView::toggle_show_opponents | ( | Glib::ustring | name | ) |
Toggle whether to show the opponents seen by the specified robot.
| name | the hostname of the robot |
Definition at line 109 of file field_view.cpp.
Referenced by WorldInfoViewer::update().
| bool FieldView::toggle_show_pose | ( | Glib::ustring | name | ) |
Toggle whether to show the pose of the specified robot.
| name | the hostname of the robot |
Definition at line 69 of file field_view.cpp.
Referenced by WorldInfoViewer::update().
1.7.1