00001 //-------------------------------------------------- 00012 //--------------------------------------------------- 00013 00014 #ifndef IMEDGINEPOLYLINE_ROI_H 00015 #define IMEDGINEPOLYLINE_ROI_H 00016 00017 #include "ROI_base.h" 00018 00019 #include <Inventor/nodes/SoLineSet.h> 00020 00021 namespace imedgine 00022 { 00023 //-------------------------------------------------- 00035 //-------------------------------------------------- 00036 00037 class PolylineROI : public ROIBase 00038 { 00039 00040 public: 00041 00042 //-------------------------------------------------- 00046 00047 PolylineROI(SoSeparator* root); 00048 00049 //-------------------------------------------------- 00052 00053 virtual ~PolylineROI(); 00054 00055 void addPoint(SbVec3f point); 00056 00057 void drawROI(); 00058 00059 //-------------------------------------------------- 00063 00064 void autoCloseROI(); 00065 00066 protected: 00067 00068 SoLineSet* polyline_set_; 00069 00070 SbVec3f start_point_; 00071 00072 SoCoordinate3* point_set_; 00073 00074 int total_point_count_; 00075 00076 int point_index_; 00077 }; 00078 } 00079 00080 #endif