contrib/brl/bseg/segv/segv_vtol_soview2D.h
Go to the documentation of this file.
00001 // This is brl/bseg/segv/segv_vtol_soview2D.h
00002 #ifndef segv_vtol_soview2D_h_
00003 #define segv_vtol_soview2D_h_
00004 //--------------------------------------------------------------------------------
00005 //:
00006 // \file
00007 // \brief A collection of vgui_soview2D objects that form views of vtol topology objects
00008 // \author
00009 //   J.L. Mundy
00010 //
00011 // \verbatim
00012 //  Modifications:
00013 //   J.L. Mundy November 28, 2002    Initial version.
00014 // \endverbatim
00015 //--------------------------------------------------------------------------------
00016 #include <vcl_vector.h>
00017 #include <vcl_iosfwd.h>
00018 #include <vtol/vtol_edge_2d.h>
00019 #include <vtol/vtol_edge_2d_sptr.h>
00020 #include <vtol/vtol_face_2d_sptr.h>
00021 #include <vgui/vgui_soview2D.h>
00022 
00023 //: vtol_vertex_2d
00024 // This view is essentially the same as a point the only difference
00025 // would be style, which we will tackle later
00026 class segv_vtol_soview2D_vertex : public vgui_soview2D_point
00027 {
00028  public:
00029   //: Constructor - creates a default vertex_2d view
00030   segv_vtol_soview2D_vertex() {}
00031 
00032   //: Print details about this vtol_vertex_2d to the given stream.
00033   virtual vcl_ostream& print(vcl_ostream&) const;
00034 
00035   //: Returns the type of this class ('segv_vtol_soview2D_vertex').
00036   vcl_string type_name() const { return "segv_vtol_soview2D_vertex"; }
00037 };
00038 
00039 class segv_vtol_soview2D_edge : public vgui_soview2D_linestrip
00040 {
00041  public:
00042   //: Constructor - creates a default edge_2d view
00043   segv_vtol_soview2D_edge() {}
00044 
00045   //: Constructor - creates a view of a vtol_vertex_2d
00046   segv_vtol_soview2D_edge(vtol_edge_2d_sptr const& e);
00047 
00048   //: Print details about this vtol_vertex_2d to the given stream.
00049   virtual vcl_ostream& print(vcl_ostream&) const;
00050 
00051   //: Returns the type of this class ('segv_vtol_soview2D_edge').
00052   vcl_string type_name() const { return "segv_vtol_soview2D_edge"; }
00053 };
00054 
00055 class segv_vtol_soview2D_edge_group : public vgui_soview2D_group
00056 {
00057  public:
00058   //: Constructor - creates a default edge_2d view
00059   segv_vtol_soview2D_edge_group() {}
00060 
00061   //: Constructor - creates a view of a vtol_vertex_2d
00062   segv_vtol_soview2D_edge_group(vcl_vector<vtol_edge_2d_sptr>& edges);
00063 
00064   //: Print details about this vtol_vertex_2d to the given stream.
00065   virtual vcl_ostream& print(vcl_ostream&) const;
00066 
00067   //: Returns the type of this class ('segv_vtol_soview2D_edge_group').
00068   vcl_string type_name() const { return "segv_vtol_soview2D_edge_group"; }
00069 };
00070 
00071 class segv_vtol_soview2D_face : public vgui_soview2D_group
00072 {
00073  public:
00074   //: Constructor - creates a default edge_2d view
00075   segv_vtol_soview2D_face() {}
00076 
00077   //: Constructor - creates a view of a vtol_vertex_2d
00078   segv_vtol_soview2D_face(vtol_face_2d_sptr& f);
00079 
00080   //: Print details about this vtol_vertex_2d to the given stream.
00081   virtual vcl_ostream& print(vcl_ostream&) const;
00082 
00083   //: Returns the type of this class ('segv_vtol_soview2D_face').
00084   vcl_string type_name() const { return "segv_vtol_soview2D_face"; }
00085 };
00086 
00087 #endif // segv_vtol_soview2D_h_