00001 #ifndef VIEW_EASEL_H_IS_INCLUDED 00002 #define VIEW_EASEL_H_IS_INCLUDED 00003 00004 /*! 00005 * \file vieweasel.H 00006 * \brief Contains the definition of the VIEW_EASEL class. 00007 * 00008 * \sa vieweasel.C 00009 * 00010 */ 00011 00012 #include "disp/view.H" 00013 // #include "draw/trace.H" 00014 00015 MAKE_PTR_BASEC(VIEW_EASEL); 00016 typedef const VIEW_EASELptr CVIEW_EASELptr; 00017 00018 /*! 00019 * \brief Container for GELS associated with a given fixed camera. 00020 * 00021 */ 00022 class VIEW_EASEL : public REFcounter { 00023 00024 public: 00025 00026 //******** MANAGERS ******** 00027 VIEW_EASEL(const VIEWptr &v); 00028 virtual ~VIEW_EASEL(); 00029 00030 //******** PUBLIC INTERFACE ******** 00031 CAMptr cam() const { return _camera; } 00032 VIEWptr view() const { return _view; } 00033 00034 void saveCam(const CAMptr& c); // copy and store the given camera parameters 00035 00036 // void bindTrace(TRACEptr t); 00037 00038 void restoreEasel(); 00039 void removeEasel(); 00040 00041 GELlist &lines() { return _lines; } 00042 const GELlist &lines() const { return _lines; } 00043 void add_line(const GELptr &p); 00044 void rem_line(const GELptr &p); 00045 00046 void clear_lines(); 00047 00048 GELptr extract_closest(Cstr_ptr &type, const mlib::XYpt &pt, 00049 double max_dist, const GELptr &except = GELptr()); 00050 00051 GELptr extract_closest_pix(Cstr_ptr &type, const mlib::XYpt &pt, 00052 double max_dist, const GELptr &except = GELptr()); 00053 00054 protected: 00055 00056 //**** MEMBERS **** 00057 GELlist _lines; //!< they used to be lines, now more generally GELS 00058 CAMptr _camera; //!< the fixed camera 00059 VIEWptr _view; //!< the associated view 00060 00061 // TRACEptr _trace; //!< if not null, the trace bound to the easel 00062 00063 }; 00064 00065 00066 #endif // VIEW_EASEL_H_IS_INCLUDED 00067 00068 /* end of file vieweasel.H */