contrib/brl/bbas/bgui/bgui_vtol2D_rubberband_client.h
Go to the documentation of this file.
00001 // This is brl/bbas/bgui/bgui_vtol2D_rubberband_client.h
00002 #ifndef bgui_vtol2D_rubberband_client_h_
00003 #define bgui_vtol2D_rubberband_client_h_
00004 //-----------------------------------------------------------------------------
00005 //:
00006 // \file
00007 // \brief A client for rubberbanding stuff
00008 // \author  J.L. Mundy
00009 //
00010 // \verbatim
00011 //  Modifications
00012 //   J.L. Mundy November 28, 2002    Initial version.
00013 //   Peter Vanroose August 2004      Moved into separate file
00014 // \endverbatim
00015 //-----------------------------------------------------------------------------
00016 #include <vgui/vgui_rubberband_tableau.h>
00017 #include <bgui/bgui_vtol2D_tableau_sptr.h>
00018 
00019 
00020 class bgui_vtol2D_rubberband_client : public vgui_rubberband_client
00021 {
00022  public:
00023   bgui_vtol2D_tableau_sptr vtol2D_;
00024 
00025   //:constructor - takes a pointer to a vtol2D tableau
00026   bgui_vtol2D_rubberband_client(bgui_vtol2D_tableau_sptr const& vtol2D)
00027   : vtol2D_(vtol2D) {}
00028 
00029   //: Called by vgui_rubberband_tableau when the user has selected a point.
00030   virtual void add_point(float, float);
00031 
00032   //: Called by vgui_rubberband_tableau when the user has selected a finite line.
00033   virtual void add_line(float,float,float,float);
00034 
00035   //: Called by vgui_rubberband_tableau when user has selected an infinite line.
00036   virtual void add_infinite_line(float,float,float);
00037 
00038   //: Called by vgui_rubberband_tableau when the user has selected a circle.
00039   virtual void add_circle(float,float,float);
00040 
00041   //: Called by vgui_rubberband_tableau when the user has selected a linestrip.
00042   virtual void add_linestrip(int n,float const *,float const *);
00043 
00044   //: Called by vgui_rubberband_tableau when the user has selected a polygon.
00045   virtual void add_polygon(int n,float const*,float const*);
00046 
00047   //: Called by vgui_rubberband_tableau when user has selected a rectangular box
00048   virtual void add_box(float,float,float,float);
00049 
00050   //: Called by vgui_rubberband_tableau whenever mouse motion is captured.
00051   //  This turns off the highlighting of geometry objects to eliminate
00052   //  flickering highlights while drawing temporary objects.
00053   void clear_highlight();
00054 };
00055 
00056 #endif // bgui_vtol2D_rubberband_client_h_