1 // This is brl/bseg/segv/segv_vtol_soview2D.h
2 #ifndef segv_vtol_soview2D_h_
3 #define segv_vtol_soview2D_h_
4 //--------------------------------------------------------------------------------
5 //:
6 // \file
7 // \brief A collection of vgui_soview2D objects that form views of vtol topology objects
8 // \author
9 //   J.L. Mundy
10 //
11 // \verbatim
12 //  Modifications:
13 //   J.L. Mundy November 28, 2002    Initial version.
14 // \endverbatim
15 //--------------------------------------------------------------------------------
16 #include <vector>
17 #include <iostream>
18 #include <iosfwd>
19 #ifdef _MSC_VER
20 #  include <vcl_msvc_warnings.h>
21 #endif
22 #include <vtol/vtol_edge_2d.h>
23 #include <vtol/vtol_edge_2d_sptr.h>
24 #include <vtol/vtol_face_2d_sptr.h>
25 #include <vgui/vgui_soview2D.h>
26 
27 //: vtol_vertex_2d
28 // This view is essentially the same as a point the only difference
29 // would be style, which we will tackle later
30 class segv_vtol_soview2D_vertex : public vgui_soview2D_point
31 {
32  public:
33   //: Constructor - creates a default vertex_2d view
segv_vtol_soview2D_vertex()34   segv_vtol_soview2D_vertex() {}
35 
36   //: Print details about this vtol_vertex_2d to the given stream.
37   virtual std::ostream& print(std::ostream&) const;
38 
39   //: Returns the type of this class ('segv_vtol_soview2D_vertex').
type_name()40   std::string type_name() const { return "segv_vtol_soview2D_vertex"; }
41 };
42 
43 class segv_vtol_soview2D_edge : public vgui_soview2D_linestrip
44 {
45  public:
46   //: Constructor - creates a default edge_2d view
segv_vtol_soview2D_edge()47   segv_vtol_soview2D_edge() {}
48 
49   //: Constructor - creates a view of a vtol_vertex_2d
50   segv_vtol_soview2D_edge(vtol_edge_2d_sptr const& e);
51 
52   //: Print details about this vtol_vertex_2d to the given stream.
53   virtual std::ostream& print(std::ostream&) const;
54 
55   //: Returns the type of this class ('segv_vtol_soview2D_edge').
type_name()56   std::string type_name() const { return "segv_vtol_soview2D_edge"; }
57 };
58 
59 class segv_vtol_soview2D_edge_group : public vgui_soview2D_group
60 {
61  public:
62   //: Constructor - creates a default edge_2d view
segv_vtol_soview2D_edge_group()63   segv_vtol_soview2D_edge_group() {}
64 
65   //: Constructor - creates a view of a vtol_vertex_2d
66   segv_vtol_soview2D_edge_group(std::vector<vtol_edge_2d_sptr>& edges);
67 
68   //: Print details about this vtol_vertex_2d to the given stream.
69   virtual std::ostream& print(std::ostream&) const;
70 
71   //: Returns the type of this class ('segv_vtol_soview2D_edge_group').
type_name()72   std::string type_name() const { return "segv_vtol_soview2D_edge_group"; }
73 };
74 
75 class segv_vtol_soview2D_face : public vgui_soview2D_group
76 {
77  public:
78   //: Constructor - creates a default edge_2d view
segv_vtol_soview2D_face()79   segv_vtol_soview2D_face() {}
80 
81   //: Constructor - creates a view of a vtol_vertex_2d
82   segv_vtol_soview2D_face(vtol_face_2d_sptr& f);
83 
84   //: Print details about this vtol_vertex_2d to the given stream.
85   virtual std::ostream& print(std::ostream&) const;
86 
87   //: Returns the type of this class ('segv_vtol_soview2D_face').
type_name()88   std::string type_name() const { return "segv_vtol_soview2D_face"; }
89 };
90 
91 #endif // segv_vtol_soview2D_h_
92