File indexing completed on 2025-01-18 09:36:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_GEOMETRY_STRATEGY_CARTESIAN_AREA_BOX_HPP
0011 #define BOOST_GEOMETRY_STRATEGY_CARTESIAN_AREA_BOX_HPP
0012
0013
0014 #include <boost/geometry/core/access.hpp>
0015 #include <boost/geometry/strategy/area.hpp>
0016
0017
0018 namespace boost { namespace geometry
0019 {
0020
0021 namespace strategy { namespace area
0022 {
0023
0024 template
0025 <
0026 typename CalculationType = void
0027 >
0028 class cartesian_box
0029 {
0030 public:
0031 template <typename Box>
0032 struct result_type
0033 : strategy::area::detail::result_type
0034 <
0035 Box,
0036 CalculationType
0037 >
0038 {};
0039
0040 template <typename Box>
0041 static inline auto apply(Box const& box)
0042 {
0043 typedef typename result_type<Box>::type return_type;
0044
0045 return return_type(get<max_corner, 0>(box) - get<min_corner, 0>(box))
0046 * return_type(get<max_corner, 1>(box) - get<min_corner, 1>(box));
0047 }
0048 };
0049
0050
0051 }}
0052
0053
0054 }}
0055
0056
0057 #endif