1 | // Boost.Geometry |
2 | |
3 | // Copyright (c) 2022 Oracle and/or its affiliates. |
4 | |
5 | // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle |
6 | |
7 | // Use, modification and distribution is subject to the Boost Software License, |
8 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at |
9 | // http://www.boost.org/LICENSE_1_0.txt) |
10 | |
11 | #include <boost/geometry/geometries/geometries.hpp> |
12 | |
13 | struct custom_cartesian_point { |
14 | double x, y; |
15 | custom_cartesian_point(double x = 0, double y = 0) : x(x), y(y) {} |
16 | }; |
17 | |
18 | BOOST_GEOMETRY_REGISTER_POINT_2D(custom_cartesian_point, double, |
19 | boost::geometry::cs::cartesian, x, y); |
20 | |
21 | using custom_cartesian_line = boost::geometry::model::linestring<custom_cartesian_point>; |
22 | using custom_cartesian_polygon = boost::geometry::model::polygon<custom_cartesian_point>; |