PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/libs/geometry/doc/src/examples/core/coordinate_system.cpp

http://hadesmem.googlecode.com/
C++ | 42 lines | 13 code | 12 blank | 17 comment | 0 complexity | 2f7eb8e480fbff9ed3631310df5a3f8b MD5 | raw file
 1// Boost.Geometry (aka GGL, Generic Geometry Library)
 2// QuickBook Example
 3
 4// Copyright (c) 2011 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//[coordinate_system
11//` Examine the coordinate system of a point
12
13#include <iostream>
14#include <typeinfo>
15
16#include <boost/geometry.hpp>
17#include <boost/geometry/geometries/polygon.hpp>
18#include <boost/geometry/geometries/point_xy.hpp>
19
20int main()
21{
22    typedef boost::geometry::model::d2::point_xy<double> point_type;
23    typedef boost::geometry::model::polygon<point_type> polygon_type;
24
25    typedef boost::geometry::coordinate_system<polygon_type>::type system;
26    
27    std::cout << "system: " << typeid(system).name() << std::endl;
28
29    return 0;
30}
31
32//]
33
34
35//[coordinate_system_output
36/*`
37Output (using MSVC):
38[pre
39system: struct boost::geometry::cs::cartesian
40]
41*/
42//]