]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/geometry/doc/src/examples/algorithms/make_inverse.cpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / geometry / doc / src / examples / algorithms / make_inverse.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//[make_inverse
11//` Usage of make_inverse and expand to conveniently determine bounding box of several objects
12
13#include <iostream>
14
15#include <boost/geometry.hpp>
16#include <boost/geometry/geometries/box.hpp>
17#include <boost/geometry/geometries/point_xy.hpp>
18
19using namespace boost::geometry;
20
21int main()
22{
23
24 typedef model::d2::point_xy<double> point;
25 typedef model::box<point> box;
26
27 box all = make_inverse<box>();
28 std::cout << dsv(all) << std::endl;
29 expand(all, make<box>(0, 0, 3, 4));
30 expand(all, make<box>(2, 2, 5, 6));
31 std::cout << dsv(all) << std::endl;
32
33 return 0;
34}
35
36//]
37
38
39//[make_inverse_output
40/*`
41Output:
42[pre
43((1.79769e+308, 1.79769e+308), (-1.79769e+308, -1.79769e+308))
44((0, 0), (5, 6))
45]
46*/
47//]