00001 00002 // * ===================================================================================== 00003 // * 00004 // * Filename: efficient.h 00005 // * 00006 // * Description: 00007 // * 00008 // * Version: 1.0 00009 // * Created: 11.08.2008 09:58:55 CEST 00010 // * Revision: none 00011 // * Compiler: gcc 00012 // * 00013 // * Author: ARCILA Romain (fl), arcila.romain@free.fr 00014 // * Company: none 00015 // * 00016 // * ===================================================================================== 00017 // */ 00018 // 00019 //#ifndef __EFFICIENT_H__ 00020 //#define __EFFICIENT_H__ 00021 // 00022 //#include "../stablesegmentation.h" 00023 // 00026 // 00028 // * \todo QT support optionnal in lib file (QOBJECT and such) 00029 // */ 00030 //namespace SegmentationNS { 00031 // 00032 // class LocalFrameCoordinate { 00033 // public: 00034 // LocalFrameCoordinate() { 00035 // } 00036 // LocalFrameCoordinate(const MeshNS::Polyhedron& p, 00037 // const MeshNS::Polyhedron::HalfedgeHandle& handle); 00038 // MathNS::Point transform(const MathNS::Point& vertex); 00039 // MathNS::Point _center; 00040 // MathNS::EVector _x, _y, _z; 00041 // }; 00042 // 00043 // class Efficient: public StableSegmentation { 00044 // public: 00045 // Efficient(MeshNS::MeshSequencePtr mesh, unsigned int nbClusters = 1) : 00046 // StableSegmentation("Efficient", mesh, nbClusters) { 00047 // } 00048 // 00049 // virtual void segment(); 00050 // 00051 // const MathNS::Point& center() { 00052 // return _center; 00053 // } 00054 // const std::vector<LocalFrameCoordinate>& getLocalFrame(int frame) { 00055 // return _lcf[frame]; 00056 // } 00057 // 00058 // private: 00059 // void clear(); 00060 // void initialization(); 00061 // void doSegment(); 00062 // 00063 // bool unvisitedVertex(unsigned *vert) { 00064 // for (unsigned int i = 0; i < _vertexVisited.size(); ++i) { 00065 // if (!_vertexVisited[i]) { 00066 // *vert = i; 00067 // return true; 00068 // } 00069 // } 00070 // return false; 00071 // } 00072 // void setVisited(unsigned int i) { 00073 // _vertexVisited[i] = true; 00074 // } 00075 // std::vector<bool> _vertexVisited; 00076 // MathNS::Point _center; 00077 // std::vector<MeshNS::Halfedge> _triangleSeeds; 00078 // std::vector<std::vector<LocalFrameCoordinate> > _lcf; 00079 // }; 00080 //} 00081 //#endif