summaryrefslogtreecommitdiff
path: root/boost/geometry/algorithms/detail/overlay/ring_properties.hpp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-09-13 11:24:46 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-09-13 11:25:39 +0900
commit4fadd968fa12130524c8380f33fcfe25d4de79e5 (patch)
treefd26a490cd15388d42fc6652b3c5c13012e7f93e /boost/geometry/algorithms/detail/overlay/ring_properties.hpp
parentb5c87084afaef42b2d058f68091be31988a6a874 (diff)
downloadboost-4fadd968fa12130524c8380f33fcfe25d4de79e5.tar.gz
boost-4fadd968fa12130524c8380f33fcfe25d4de79e5.tar.bz2
boost-4fadd968fa12130524c8380f33fcfe25d4de79e5.zip
Imported Upstream version 1.65.0upstream/1.65.0
Change-Id: Icf8400b375482cb11bcf77440a6934ba360d6ba4 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/geometry/algorithms/detail/overlay/ring_properties.hpp')
-rw-r--r--boost/geometry/algorithms/detail/overlay/ring_properties.hpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/boost/geometry/algorithms/detail/overlay/ring_properties.hpp b/boost/geometry/algorithms/detail/overlay/ring_properties.hpp
index 0f2da67b62..7dbc5d5fab 100644
--- a/boost/geometry/algorithms/detail/overlay/ring_properties.hpp
+++ b/boost/geometry/algorithms/detail/overlay/ring_properties.hpp
@@ -2,6 +2,10 @@
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// This file was modified by Oracle on 2017.
+// Modifications copyright (c) 2017 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -23,11 +27,11 @@ namespace boost { namespace geometry
namespace detail { namespace overlay
{
-template <typename Point>
+template <typename Point, typename AreaType>
struct ring_properties
{
typedef Point point_type;
- typedef typename default_area_result<Point>::type area_type;
+ typedef AreaType area_type;
bool valid;
@@ -52,17 +56,14 @@ struct ring_properties
, parent_area(-1)
{}
- template <typename RingOrBox>
- inline ring_properties(RingOrBox const& ring_or_box)
+ template <typename RingOrBox, typename AreaStrategy>
+ inline ring_properties(RingOrBox const& ring_or_box, AreaStrategy const& strategy)
: reversed(false)
, discarded(false)
, parent_area(-1)
{
- this->area = geometry::area(ring_or_box);
- // We should take a point somewhere in the middle of the ring,
- // to avoid taking a point on a (self)tangency,
- // in cases where multiple points come together
- valid = geometry::point_on_border(this->point, ring_or_box, true);
+ this->area = geometry::area(ring_or_box, strategy);
+ valid = geometry::point_on_border(this->point, ring_or_box);
}
inline area_type get_area() const