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_3d_point
11 //` Using make to construct a three dimensional point
12
13 #include <iostream>
14
15 #include <boost/geometry.hpp>
16 #include <boost/geometry/geometries/point.hpp>
17
main()18 int main()
19 {
20 typedef boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> point_type;
21 point_type p = boost::geometry::make<point_type>(1, 2, 3);
22 std::cout << boost::geometry::dsv(p) << std::endl;
23 return 0;
24 }
25
26 //]
27
28
29 //[make_3d_point_output
30 /*`
31 Output:
32 [pre
33 (1, 2, 3)
34 ]
35 */
36 //]
37