Fawkes API
Fawkes Development Version
|
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_draw (const Cairo::RefPtr< Cairo::Context > &context) |
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.
|
virtual |
Destructor.
Definition at line 60 of file field_view.cpp.
|
protectedvirtual |
Overloaded signal handler.
This is were the drawing action happens.
context | cairo context for drawing |
Definition at line 141 of file field_view.cpp.
References 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.
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.
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.
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.