1 #ifndef bwm_soview2D_vertex_h_
2 #define bwm_soview2D_vertex_h_
3 //:
4 // \file
5 
6 #include <bgui/bgui_vsol_soview2D.h>
7 
8 //: 2-dimensional object cross
9 class bwm_soview2D_vertex : public vgui_soview2D_circle
10 {
11  public:
12   //: Constructor - create a default soview2D.
bwm_soview2D_vertex(float x,float y,float r,bgui_vsol_soview2D * obj,unsigned i)13    bwm_soview2D_vertex(float x, float y, float r, bgui_vsol_soview2D* obj, unsigned i)
14      : vgui_soview2D_circle(x, y, r), obj_(obj), v_index_(i) {}
15 
16   //: Destructor - delete this soview2D.
~bwm_soview2D_vertex()17   virtual ~bwm_soview2D_vertex() {}
18 
type_name()19   virtual std::string type_name() const { return "bwm_soview2D_vertex"; }
20 
obj()21   bgui_vsol_soview2D* obj() { return obj_; }
vertex_indx()22   int vertex_indx() const { return v_index_; }
23 
24  private:
25   //: the id of the soview2D object that vertex belongs to
26   bgui_vsol_soview2D* obj_;
27 
28   //: the index of the vertex in the 2d object's vertex list
29   int v_index_;
30 };
31 
32 #endif
33