]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/doc/src/examples/core/set_box.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 //` Set the coordinate of a box
15 #include <boost/geometry.hpp>
16 #include <boost/geometry/geometries/point_xy.hpp>
18 namespace bg
= boost::geometry
;
22 bg::model::box
<bg::model::d2::point_xy
<double> > box
;
24 bg::set
<bg::min_corner
, 0>(box
, 0);
25 bg::set
<bg::min_corner
, 1>(box
, 2);
26 bg::set
<bg::max_corner
, 0>(box
, 4);
27 bg::set
<bg::max_corner
, 1>(box
, 5);
29 std::cout
<< "Extent: " << bg::dsv(box
) << std::endl
;
41 Extent: ((0, 2), (4, 5))