summaryrefslogtreecommitdiff
path: root/boost/geometry/index/detail
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/index/detail')
-rw-r--r--boost/geometry/index/detail/algorithms/intersection_content.hpp21
-rw-r--r--boost/geometry/index/detail/algorithms/path_intersection.hpp6
-rw-r--r--boost/geometry/index/detail/rtree/node/variant_dynamic.hpp4
-rw-r--r--boost/geometry/index/detail/rtree/node/weak_dynamic.hpp2
-rw-r--r--boost/geometry/index/detail/rtree/visitors/remove.hpp4
5 files changed, 26 insertions, 11 deletions
diff --git a/boost/geometry/index/detail/algorithms/intersection_content.hpp b/boost/geometry/index/detail/algorithms/intersection_content.hpp
index 04dd4728be..437f90b46c 100644
--- a/boost/geometry/index/detail/algorithms/intersection_content.hpp
+++ b/boost/geometry/index/detail/algorithms/intersection_content.hpp
@@ -2,7 +2,7 @@
//
// boxes union/intersection area/volume
//
-// Copyright (c) 2011-2016 Adam Wulkiewicz, Lodz, Poland.
+// Copyright (c) 2011-2017 Adam Wulkiewicz, Lodz, Poland.
//
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -11,8 +11,9 @@
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_INTERSECTION_CONTENT_HPP
#define BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_INTERSECTION_CONTENT_HPP
-#include <boost/geometry/algorithms/intersection.hpp>
-#include <boost/geometry/strategies/intersection_strategies.hpp>
+#include <boost/geometry/algorithms/detail/disjoint/box_box.hpp>
+#include <boost/geometry/algorithms/detail/overlay/intersection_box_box.hpp>
+
#include <boost/geometry/index/detail/algorithms/content.hpp>
namespace boost { namespace geometry { namespace index { namespace detail {
@@ -23,11 +24,19 @@ namespace boost { namespace geometry { namespace index { namespace detail {
template <typename Box>
inline typename default_content_result<Box>::type intersection_content(Box const& box1, Box const& box2)
{
- if ( geometry::intersects(box1, box2) )
+ bool const intersects = ! geometry::detail::disjoint::box_box<Box, Box>::apply(box1, box2);
+
+ if ( intersects )
{
Box box_intersection;
- if ( geometry::intersection(box1, box2, box_intersection) )
- return detail::content(box_intersection);
+ bool const ok = geometry::detail::intersection::intersection_box_box
+ <
+ 0, geometry::dimension<Box>::value
+ >::apply(box1, box2, 0, box_intersection, 0);
+ if ( ok )
+ {
+ return index::detail::content(box_intersection);
+ }
}
return 0;
}
diff --git a/boost/geometry/index/detail/algorithms/path_intersection.hpp b/boost/geometry/index/detail/algorithms/path_intersection.hpp
index fe92596ba2..3cfb556c30 100644
--- a/boost/geometry/index/detail/algorithms/path_intersection.hpp
+++ b/boost/geometry/index/detail/algorithms/path_intersection.hpp
@@ -2,7 +2,7 @@
//
// n-dimensional box-linestring intersection
//
-// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+// Copyright (c) 2011-2017 Adam Wulkiewicz, Lodz, Poland.
//
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -11,8 +11,12 @@
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_PATH_INTERSECTION_HPP
#define BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_PATH_INTERSECTION_HPP
+
#include <boost/geometry/index/detail/algorithms/segment_intersection.hpp>
+#include <boost/geometry/strategies/default_length_result.hpp>
+
+
namespace boost { namespace geometry { namespace index { namespace detail {
namespace dispatch {
diff --git a/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp b/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp
index 8e052e5216..e63cfd39ac 100644
--- a/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp
+++ b/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp
@@ -11,6 +11,8 @@
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_NODE_VARIANT_DYNAMIC_HPP
#define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_NODE_VARIANT_DYNAMIC_HPP
+#include <boost/core/pointer_traits.hpp>
+
namespace boost { namespace geometry { namespace index {
namespace detail { namespace rtree {
@@ -183,7 +185,7 @@ struct create_variant_node
scoped_deallocator<AllocNode> deallocator(p, alloc_node);
- Al::construct(alloc_node, boost::addressof(*p), Node(alloc_node)); // implicit cast to Variant
+ Al::construct(alloc_node, boost::pointer_traits<P>::to_address(p), Node(alloc_node)); // implicit cast to Variant
deallocator.release();
return p;
diff --git a/boost/geometry/index/detail/rtree/node/weak_dynamic.hpp b/boost/geometry/index/detail/rtree/node/weak_dynamic.hpp
index d49e347826..05fef59e52 100644
--- a/boost/geometry/index/detail/rtree/node/weak_dynamic.hpp
+++ b/boost/geometry/index/detail/rtree/node/weak_dynamic.hpp
@@ -199,7 +199,7 @@ struct create_weak_node
scoped_deallocator<AllocNode> deallocator(p, alloc_node);
- Al::construct(alloc_node, boost::addressof(*p), alloc_node);
+ Al::construct(alloc_node, boost::pointer_traits<P>::to_address(p), alloc_node);
deallocator.release();
return p;
diff --git a/boost/geometry/index/detail/rtree/visitors/remove.hpp b/boost/geometry/index/detail/rtree/visitors/remove.hpp
index 6326f87db6..7e6162a616 100644
--- a/boost/geometry/index/detail/rtree/visitors/remove.hpp
+++ b/boost/geometry/index/detail/rtree/visitors/remove.hpp
@@ -2,7 +2,7 @@
//
// R-tree removing visitor implementation
//
-// Copyright (c) 2011-2015 Adam Wulkiewicz, Lodz, Poland.
+// Copyright (c) 2011-2017 Adam Wulkiewicz, Lodz, Poland.
//
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -13,7 +13,7 @@
#include <boost/geometry/index/detail/rtree/visitors/is_leaf.hpp>
-#include <boost/geometry/algorithms/covered_by.hpp>
+#include <boost/geometry/algorithms/detail/covered_by/interface.hpp>
namespace boost { namespace geometry { namespace index {