00001 // This is gel/gtrl/gtrl_vertex.h 00002 #ifndef gtrl_vertex_h_ 00003 #define gtrl_vertex_h_ 00004 //: 00005 // \file 00006 // \author crossge@crd.ge.com 00007 // 00008 // \verbatim 00009 // Modifications 00010 // 10 Sep. 2004 Peter Vanroose Inlined all 1-line methods in class decl 00011 // \endverbatim 00012 00013 #include <vbl/vbl_smart_ptr.h> 00014 #include <vbl/vbl_ref_count.h> 00015 00016 class gtrl_vertex : public vbl_ref_count 00017 { 00018 public: 00019 gtrl_vertex(double x, double y) : vbl_ref_count(), x_(x), y_(y) {} 00020 // copy constructor - compiler-provided one sets ref_count to nonzero which is wrong -PVr 00021 gtrl_vertex(gtrl_vertex const& v) : vbl_ref_count(), x_(v.x_), y_(v.y_) {} 00022 00023 double x() const { return x_; } 00024 double y() const { return y_; } 00025 00026 void set_x(double x) { x_= x; } 00027 void set_y(double y) { y_= y; } 00028 00029 protected: 00030 double x_; 00031 double y_; 00032 }; 00033 00034 typedef vbl_smart_ptr<gtrl_vertex> gtrl_vertex_sptr; 00035 00036 #endif // gtrl_vertex_h_