File indexing completed on 2025-01-18 09:47:58
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef BOOST_POLYGON_INTERVAL_TRAITS_HPP
0013 #define BOOST_POLYGON_INTERVAL_TRAITS_HPP
0014
0015 #include "isotropy.hpp"
0016
0017 namespace boost {
0018 namespace polygon {
0019
0020 template <typename Interval>
0021 struct interval_traits {
0022 typedef Interval interval_type;
0023 typedef typename interval_type::coordinate_type coordinate_type;
0024
0025 static coordinate_type get(const interval_type& interval, direction_1d dir) {
0026 return interval.get(dir);
0027 }
0028 };
0029
0030 template <typename Interval>
0031 struct interval_mutable_traits {
0032 typedef Interval interval_type;
0033 typedef typename interval_type::coordinate_type coordinate_type;
0034
0035 static void set(
0036 interval_type& interval, direction_1d dir, coordinate_type value) {
0037 interval.set(dir, value);
0038 }
0039
0040 static interval_type construct(coordinate_type low, coordinate_type high) {
0041 return interval_type(low, high);
0042 }
0043 };
0044 }
0045 }
0046
0047 #endif