]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/geometry/doc/src/examples/core/get_box.cpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / geometry / doc / src / examples / core / get_box.cpp
CommitLineData
7c673cae
FG
1// Boost.Geometry (aka GGL, Generic Geometry Library)
2// QuickBook Example
3
4// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
5
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)
9
10//[get_box
11//` Get the coordinate of a box
12
13#include <iostream>
14
15#include <boost/geometry.hpp>
16#include <boost/geometry/geometries/point_xy.hpp>
17
18namespace bg = boost::geometry;
19
20int main()
21{
22 bg::model::box<bg::model::d2::point_xy<double> > box;
23
24 bg::assign_values(box, 1, 3, 5, 6);
25
26 std::cout << "Box:"
27 << " " << bg::get<bg::min_corner, 0>(box)
28 << " " << bg::get<bg::min_corner, 1>(box)
29 << " " << bg::get<bg::max_corner, 0>(box)
30 << " " << bg::get<bg::max_corner, 1>(box)
31 << std::endl;
32
33 return 0;
34}
35
36//]
37
38
39//[get_box_output
40/*`
41Output:
42[pre
43Box: 1 3 5 6
44]
45*/
46//]