blob: f6f4c9bc17725b364225e0ba8a3c5d2cb34c26a0 (
plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#pragma once
#include "geometry/point2d.hpp"
#include "std/vector.hpp"
#include "std/algorithm.hpp"
namespace di
{
class AreaInfo
{
m2::PointD m_center;
public:
vector<m2::PointD> m_path;
void reserve(size_t ptsCount)
{
m_path.reserve(ptsCount);
}
void swap(AreaInfo & r)
{
m_path.swap(r.m_path);
std::swap(m_center, r.m_center);
}
void push_back(m2::PointD const & pt)
{
m_path.push_back(pt);
}
size_t size() const { return m_path.size(); }
void SetCenter(m2::PointD const & p) { m_center = p; }
m2::PointD GetCenter() const { return m_center; }
};
}
inline void swap(di::AreaInfo & p1, di::AreaInfo & p2)
{
p1.swap(p2);
}
|