]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/doc/src/examples/algorithms/assign_3d_point.cpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / geometry / doc / src / examples / algorithms / assign_3d_point.cpp
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 //[assign_3d_point
11 //` Use assign to set three coordinates of a 3D point
12
13 #include <iostream>
14 #include <iomanip>
15
16 #include <boost/geometry.hpp>
17 #include <boost/geometry/geometries/point.hpp>
18
19 int main()
20 {
21 boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> p;
22 boost::geometry::assign_values(p, 1.2345, 2.3456, 3.4567);
23
24 std::cout << boost::geometry::dsv(p) << std::endl;
25
26 return 0;
27 }
28
29 //]
30
31
32 //[assign_3d_point_output
33 /*`
34 Output:
35 [pre
36 (1.2345, 2.3456, 3.4567)
37 ]
38 */
39 //]