]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/doc/src/examples/algorithms/assign_inverse.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 //` Usage of assign_inverse and expand to conveniently determine bounding 3D box of two points
15 #include <boost/geometry.hpp>
16 #include <boost/geometry/geometries/box.hpp>
17 #include <boost/geometry/geometries/point.hpp>
19 using namespace boost::geometry
;
23 typedef model::point
<float, 3, cs::cartesian
> point
;
24 typedef model::box
<point
> box
;
28 std::cout
<< dsv(all
) << std::endl
;
29 expand(all
, point(0, 0, 0));
30 expand(all
, point(1, 2, 3));
31 std::cout
<< dsv(all
) << std::endl
;
39 //[assign_inverse_output
43 ((3.40282e+038, 3.40282e+038, 3.40282e+038), (-3.40282e+038, -3.40282e+038, -3.40282e+038))
44 ((0, 0, 0), (1, 2, 3))]