point.hpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
  3. // Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
  4. // Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
  5. // Copyright (c) 2014-2015 Samuel Debionne, Grenoble, France.
  6. // This file was modified by Oracle on 2015-2018.
  7. // Modifications copyright (c) 2015-2018, Oracle and/or its affiliates.
  8. // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
  9. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
  10. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  11. // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
  12. // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
  13. // Distributed under the Boost Software License, Version 1.0.
  14. // (See accompanying file LICENSE_1_0.txt or copy at
  15. // http://www.boost.org/LICENSE_1_0.txt)
  16. #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_EXPAND_POINT_HPP
  17. #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_EXPAND_POINT_HPP
  18. #include <boost/geometry/algorithms/dispatch/expand.hpp>
  19. #include <boost/geometry/core/tags.hpp>
  20. // For backward compatibility
  21. #include <boost/geometry/strategies/cartesian/expand_point.hpp>
  22. #include <boost/geometry/strategies/spherical/expand_point.hpp>
  23. namespace boost { namespace geometry
  24. {
  25. #ifndef DOXYGEN_NO_DISPATCH
  26. namespace dispatch
  27. {
  28. // Box + point -> new box containing also point
  29. template
  30. <
  31. typename BoxOut, typename Point
  32. >
  33. struct expand
  34. <
  35. BoxOut, Point,
  36. box_tag, point_tag
  37. >
  38. {
  39. template <typename Strategy>
  40. static inline void apply(BoxOut& box,
  41. Point const& point,
  42. Strategy const& )
  43. {
  44. Strategy::apply(box, point);
  45. }
  46. };
  47. } // namespace dispatch
  48. #endif // DOXYGEN_NO_DISPATCH
  49. }} // namespace boost::geometry
  50. #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_EXPAND_POINT_HPP