| 21 | } |
| 22 | |
| 23 | void PolygonPoint::remove() const |
| 24 | { |
| 25 | std::unique_ptr<PolygonPoint> tmpContainer; |
| 26 | for (auto& point : m_parent.m_points) |
| 27 | { |
| 28 | if (point.get() == this) |
| 29 | point.swap(tmpContainer); |
| 30 | } |
| 31 | m_parent.m_points.erase(m_parent.m_points.begin() + index); |
| 32 | for (point_index_t i = index; i < m_parent.m_points.size(); i++) |
| 33 | m_parent.m_points[i]->rw_index = i; |
| 34 | } |
| 35 | |
| 36 | double PolygonPoint::distance(const Transform::UnitVector& position) const |
| 37 | { |