No Description

city.h 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef CITY_H
  2. #define CITY_H
  3. #include <doublepoint.h>
  4. #include <QVector>
  5. ///
  6. /// \brief The City class
  7. /// This is merely a vector of points, i.e. the points that make up the
  8. /// polygon of the city.
  9. class City {
  10. public:
  11. QVector<DoublePoint> *geometry;
  12. /// \fn City()
  13. /// \~English
  14. /// \brief default constructor
  15. /// \~Spanish
  16. /// \brief default constructor
  17. ///
  18. City() {};
  19. /// \fn pushPoint(double x, double y)
  20. /// \~English
  21. /// \brief push a point to the vector of points
  22. /// \~Spanish
  23. /// \brief añadir un punto al final del vector de puntos
  24. ///
  25. void pushPoint(double x, double y);
  26. /// \fn getSize()
  27. /// \~English
  28. /// \brief get the size of the vector that contains the points
  29. /// \~Spanish
  30. /// \brief devuelve el tamaño del vector de puntos
  31. ///
  32. virtual int getSize() const { return geometry->size(); }
  33. /// \fn QVector<DoublePoint> *getGeometry()
  34. /// \~English
  35. /// \brief get a pointer to the vector of points
  36. /// \~Spanish
  37. /// \brief devuelve un puntero al vector de puntos
  38. ///
  39. QVector<DoublePoint> *getGeometry() const { return geometry; }
  40. /// \fn ~City()
  41. /// \~English
  42. /// \brief destructor
  43. /// \~Spanish
  44. /// \brief destructor
  45. ///
  46. ~City() {delete geometry; }
  47. };
  48. #endif // CITY_H