]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/doc/src/examples/core/closure.cpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
4 // Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
6 // Use, modification and distribution is subject to the Boost Software License,
7 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
11 //` Examine if a polygon is defined as "should be closed"
15 #include <boost/geometry.hpp>
16 #include <boost/geometry/geometries/polygon.hpp>
17 #include <boost/geometry/geometries/point_xy.hpp>
21 typedef boost::geometry::model::d2::point_xy
<double> point_type
;
22 typedef boost::geometry::model::polygon
<point_type
> polygon_type
;
24 boost::geometry::closure_selector clos
= boost::geometry::closure
<polygon_type
>::value
;
26 std::cout
<< "closure: " << clos
<< std::endl
27 << "(open = " << boost::geometry::open
28 << ", closed = " << boost::geometry::closed
42 (open = 0, closed = 1)