1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2013 Barend Gehrels, Amsterdam, the Netherlands.
4 // Copyright (c) 2013 Bruno Lalande, Paris, France.
5 // Copyright (c) 2013 Mateusz Loskot, London, UK.
6 // Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
8 // Use, modification and distribution is subject to the Boost Software License,
9 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
10 // http://www.boost.org/LICENSE_1_0.txt)
12 #ifndef BOOST_GEOMETRY_POLICIES_ROBUSTNESS_NO_RESCALE_POLICY_HPP
13 #define BOOST_GEOMETRY_POLICIES_ROBUSTNESS_NO_RESCALE_POLICY_HPP
17 #include <boost/geometry/core/coordinate_type.hpp>
18 #include <boost/geometry/policies/robustness/robust_point_type.hpp>
19 #include <boost/geometry/policies/robustness/segment_ratio.hpp>
20 #include <boost/geometry/policies/robustness/segment_ratio_type.hpp>
22 namespace boost { namespace geometry
25 #ifndef DOXYGEN_NO_DETAIL
29 // Probably this will be moved out of namespace detail
30 struct no_rescale_policy
32 static bool const enabled = false;
34 // We don't rescale but return the reference of the input
35 template <std::size_t Dimension, typename Value>
36 inline Value const& apply(Value const& value) const
46 // Implement meta-functions for this policy
47 template <typename Point>
48 struct robust_point_type<Point, detail::no_rescale_policy>
54 template <typename Point>
55 struct segment_ratio_type<Point, detail::no_rescale_policy>
57 // Define a segment_ratio defined on coordinate type, e.g.
58 // int/int or float/float
59 typedef typename geometry::coordinate_type<Point>::type coordinate_type;
60 typedef segment_ratio<coordinate_type> type;
64 }} // namespace boost::geometry
66 #endif // BOOST_GEOMETRY_POLICIES_ROBUSTNESS_NO_RESCALE_POLICY_HPP