Copy of geometry.hpp-0.9.0 (e3acceb)

This commit is contained in:
Eric Fischer
2016-12-07 14:11:53 -08:00
parent 89bfd27a8b
commit c0d5171f1d
13 changed files with 528 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
#pragma once
// mapbox
#include <mapbox/geometry/point.hpp>
// stl
#include <vector>
namespace mapbox {
namespace geometry {
template <typename T, template <typename...> class Cont = std::vector>
struct linear_ring : Cont<point<T>>
{
using coordinate_type = T;
using point_type = point<T>;
using container_type = Cont<point_type>;
using container_type::container_type;
};
template <typename T, template <typename...> class Cont = std::vector>
struct polygon : Cont<linear_ring<T>>
{
using coordinate_type = T;
using linear_ring_type = linear_ring<T>;
using container_type = Cont<linear_ring_type>;
using container_type::container_type;
};
} // namespace geometry
} // namespace mapbox