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