]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Boost.Geometry (aka GGL, Generic Geometry Library) |
2 | ||
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. | |
7 | ||
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) | |
11 | ||
12 | #ifndef BOOST_GEOMETRY_POLICIES_ROBUSTNESS_NO_RESCALE_POLICY_HPP | |
13 | #define BOOST_GEOMETRY_POLICIES_ROBUSTNESS_NO_RESCALE_POLICY_HPP | |
14 | ||
15 | #include <stddef.h> | |
16 | ||
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> | |
7c673cae FG |
20 | |
21 | namespace boost { namespace geometry | |
22 | { | |
23 | ||
24 | #ifndef DOXYGEN_NO_DETAIL | |
25 | namespace detail | |
26 | { | |
27 | ||
92f5a8d4 | 28 | // Redudant later. |
7c673cae FG |
29 | struct no_rescale_policy |
30 | { | |
31 | static bool const enabled = false; | |
32 | ||
33 | // We don't rescale but return the reference of the input | |
34 | template <std::size_t Dimension, typename Value> | |
35 | inline Value const& apply(Value const& value) const | |
36 | { | |
37 | return value; | |
38 | } | |
39 | }; | |
40 | ||
41 | } // namespace detail | |
42 | #endif | |
43 | ||
44 | ||
45 | // Implement meta-functions for this policy | |
46 | template <typename Point> | |
47 | struct robust_point_type<Point, detail::no_rescale_policy> | |
48 | { | |
49 | // The point itself | |
50 | typedef Point type; | |
51 | }; | |
52 | ||
7c673cae FG |
53 | }} // namespace boost::geometry |
54 | ||
55 | #endif // BOOST_GEOMETRY_POLICIES_ROBUSTNESS_NO_RESCALE_POLICY_HPP |