23 #ifndef __TOOL_WORLDINFO_VIEWER_FIELD_VIEW_H_
24 #define __TOOL_WORLDINFO_VIEWER_FIELD_VIEW_H_
26 #include <gtkmm/drawingarea.h>
30 class WorldInfoDataContainer;
37 bool show_pose =
true,
38 bool show_ball =
true,
39 bool show_opponents =
false );
49 virtual bool on_draw(
const Cairo::RefPtr<Cairo::Context> &context);
52 void draw_field_msl( Cairo::RefPtr<Cairo::Context> context );
53 void draw_robot( Cairo::RefPtr<Cairo::Context> context,
54 float x,
float y,
float ori,
56 void draw_obstacle( Cairo::RefPtr<Cairo::Context> context,
57 float x,
float y,
float extend );
58 void draw_ball( Cairo::RefPtr<Cairo::Context> context,
59 float ball_x,
float ball_y,
float bot_x,
float bot_y );
63 std::map< Glib::ustring, bool > m_show_pose;
64 std::map< Glib::ustring, bool > m_show_ball;
65 std::map< Glib::ustring, bool > m_show_opponents;
66 bool m_show_pose_default;
67 bool m_show_ball_default;
68 bool m_show_opponents_default;
Data container to store and exchange worldinfo data.
virtual ~FieldView()
Destructor.
virtual bool on_draw(const Cairo::RefPtr< Cairo::Context > &context)
Overloaded signal handler.
bool toggle_show_pose(Glib::ustring name)
Toggle whether to show the pose of the specified robot.
Drawing widget that draws an (MSL-) soccer field with robots, opponents, and balls.
void remove_host(Glib::ustring name)
Remove a host.
bool toggle_show_opponents(Glib::ustring name)
Toggle whether to show the opponents seen by the specified robot.
bool toggle_show_ball(Glib::ustring name)
Toggle whether to show the ball detected by the specified robot.
FieldView(fawkes::WorldInfoDataContainer *data, bool show_pose=true, bool show_ball=true, bool show_opponents=false)
Constructor.