add temp convinience methods

This commit is contained in:
artemp 2015-02-19 17:13:00 +01:00
parent 1c3dbdd3ab
commit 6d8ff4a476

View file

@ -108,6 +108,8 @@ struct line_string : vertex_sequence
line_string (line_string const& ) = delete;
line_string& operator=(line_string const&) = delete;
inline std::size_t num_points() const { return data.size(); }
inline std::size_t size() const { return data.size(); } // TODO - remove
inline void clear() { data.clear();}
inline void resize(std::size_t new_size) { data.resize(new_size);}
inline void push_back(value_type const& val) { data.push_back(val);}
@ -115,6 +117,10 @@ struct line_string : vertex_sequence
{
data.emplace_back(x,y);
}
void emplace_back(double x, double y) // TODO - remove
{
data.emplace_back(x,y);
}
};
struct polygon2
@ -133,8 +139,8 @@ struct polygon2
}
};
//struct linear_ring : line_string {};
using linear_ring = std::vector<point>;
struct polygon3
{
linear_ring exterior_ring;