Polygon.h 743 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*!
  2. * \file Polygon.h
  3. * \brief
  4. * \author Gapchich Vladislav
  5. * \date 23/10/11
  6. */
  7. #ifndef __POLYGON_H__
  8. #define __POLYGON_H__
  9. #include "core/image/CoordT.h"
  10. #include <list>
  11. typedef std::list< NICE::CoordT< int > > PointsList;
  12. namespace OBJREC
  13. {
  14. //! \brief Contains category ID and point list of the polygon
  15. class Polygon
  16. {
  17. public:
  18. Polygon();
  19. Polygon ( const Polygon &copy );
  20. ~Polygon();
  21. void push ( const NICE::CoordT< int > &aPoint );
  22. void push ( const int &x, const int &y );
  23. void setID ( const int &anID );
  24. const PointsList * points() const;
  25. NICE::CoordT< int > pop();
  26. int id() const;
  27. private:
  28. PointsList points_;
  29. int id_;
  30. };
  31. } //namespace
  32. #endif /* __POLYGON_H__ */
  33. /*
  34. *
  35. */