-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIModel.h
29 lines (21 loc) · 852 Bytes
/
IModel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef IModelH
#define IModelH
#include <System.hpp>
#include <boost/geometry.hpp>
namespace AreaPrj {
class IModel {
public:
using CoordType = double;
using PointType = boost::geometry::model::d2::point_xy<CoordType>;
using PolygonType = boost::geometry::model::polygon<PointType>;
using PolygonCont = boost::geometry::model::multi_polygon<PolygonType>;
PolygonCont const & GetPolygons() const { return DoGetPolygons(); }
void SetPolygons( PolygonCont const & Items ) { DoSetPolygons( Items ); }
bool HitTest( CoordType X, CoordType Y ) const { return DoHitTest( X, Y ); }
protected:
virtual PolygonCont const & DoGetPolygons() const = 0;
virtual void DoSetPolygons( PolygonCont const & Items ) = 0;
virtual bool DoHitTest( CoordType X, CoordType Y ) const = 0;
};
} // End of namespace AreaPrj
#endif