Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78797 - in trunk/boost/geometry/algorithms/detail: . overlay
From: barend.gehrels_at_[hidden]
Date: 2012-06-01 17:49:29


Author: barendgehrels
Date: 2012-06-01 17:49:28 EDT (Fri, 01 Jun 2012)
New Revision: 78797
URL: http://svn.boost.org/trac/boost/changeset/78797

Log:
[geometry] take output point type (overlay) / enable different point types (point on border)
Text files modified:
   trunk/boost/geometry/algorithms/detail/overlay/overlay.hpp | 2 +-
   trunk/boost/geometry/algorithms/detail/point_on_border.hpp | 9 ++++++---
   2 files changed, 7 insertions(+), 4 deletions(-)

Modified: trunk/boost/geometry/algorithms/detail/overlay/overlay.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/overlay.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/overlay.hpp 2012-06-01 17:49:28 EDT (Fri, 01 Jun 2012)
@@ -233,7 +233,7 @@
         std::cout << "map_turns: " << timer.elapsed() << std::endl;
 #endif
 
- typedef ring_properties<typename geometry::point_type<Geometry1>::type> properties;
+ typedef ring_properties<typename geometry::point_type<GeometryOut>::type> properties;
 
         std::map<ring_identifier, properties> selected;
         select_rings<Direction>(geometry1, geometry2, map, selected, ! turn_points.empty());

Modified: trunk/boost/geometry/algorithms/detail/point_on_border.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/point_on_border.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/point_on_border.hpp 2012-06-01 17:49:28 EDT (Fri, 01 Jun 2012)
@@ -25,6 +25,7 @@
 #include <boost/geometry/geometries/concepts/check.hpp>
 
 #include <boost/geometry/algorithms/assign.hpp>
+#include <boost/geometry/algorithms/detail/convert_point_to_point.hpp>
 #include <boost/geometry/algorithms/detail/disjoint.hpp>
 
 
@@ -50,7 +51,8 @@
 template<typename Point, std::size_t Dimension, std::size_t DimensionCount>
 struct midpoint_helper
 {
- static inline bool apply(Point& p, Point const& p1, Point const& p2)
+ template <typename InputPoint>
+ static inline bool apply(Point& p, InputPoint const& p1, InputPoint const& p2)
     {
         typename coordinate_type<Point>::type const two = 2;
         set<Dimension>(p,
@@ -63,7 +65,8 @@
 template <typename Point, std::size_t DimensionCount>
 struct midpoint_helper<Point, DimensionCount, DimensionCount>
 {
- static inline bool apply(Point& , Point const& , Point const& )
+ template <typename InputPoint>
+ static inline bool apply(Point& , InputPoint const& , InputPoint const& )
     {
         return true;
     }
@@ -102,7 +105,7 @@
 
         if (n > 0)
         {
- point = *boost::begin(range);
+ geometry::detail::conversion::convert_point_to_point(*boost::begin(range), point);
             return true;
         }
         return false;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk