/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. // Copyright (c) 2011 Barend Gehrels, Amsterdam, the Netherlands.
  4. // Use, modification and distribution is subject to the Boost Software License,
  5. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. //[coordinate_system
  8. //` Examine the coordinate system of a point
  9. #include <iostream>
  10. #include <typeinfo>
  11. #include <boost/geometry.hpp>
  12. #include <boost/geometry/geometries/polygon.hpp>
  13. #include <boost/geometry/geometries/point_xy.hpp>
  14. int main()
  15. {
  16. typedef boost::geometry::model::d2::point_xy<double> point_type;
  17. typedef boost::geometry::model::polygon<point_type> polygon_type;
  18. typedef boost::geometry::coordinate_system<polygon_type>::type system;
  19. std::cout << "system: " << typeid(system).name() << std::endl;
  20. return 0;
  21. }
  22. //]
  23. //[coordinate_system_output
  24. /*`
  25. Output (using MSVC):
  26. [pre
  27. system: struct boost::geometry::cs::cartesian
  28. ]
  29. */
  30. //]