|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61707 - in sandbox/geometry: boost/geometry/extensions/algorithms boost/geometry/extensions/algorithms/buffer libs/geometry/test/algorithms
From: barend.gehrels_at_[hidden]
Date: 2010-04-30 10:58:07
Author: barendgehrels
Date: 2010-04-30 10:58:07 EDT (Fri, 30 Apr 2010)
New Revision: 61707
URL: http://svn.boost.org/trac/boost/changeset/61707
Log:
Updated paths
Added ccw test for area
Text files modified:
sandbox/geometry/boost/geometry/extensions/algorithms/buffer/traversing_buffer.hpp | 6 +++---
sandbox/geometry/boost/geometry/extensions/algorithms/offset.hpp | 2 +-
sandbox/geometry/libs/geometry/test/algorithms/area.cpp | 12 +++++++++++-
3 files changed, 15 insertions(+), 5 deletions(-)
Modified: sandbox/geometry/boost/geometry/extensions/algorithms/buffer/traversing_buffer.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/extensions/algorithms/buffer/traversing_buffer.hpp (original)
+++ sandbox/geometry/boost/geometry/extensions/algorithms/buffer/traversing_buffer.hpp 2010-04-30 10:58:07 EDT (Fri, 30 Apr 2010)
@@ -19,9 +19,9 @@
#include <boost/geometry/core/point_type.hpp>
#include <boost/geometry/strategies/buffer_side.hpp>
-#include <boost/geometry/algorithms/detail/buffer/intersecting_inserter.hpp>
-#include <boost/geometry/algorithms/detail/buffer/linestring_buffer.hpp>
-#include <boost/geometry/algorithms/detail/buffer/line_line_intersection.hpp>
+#include <boost/geometry/extensions/algorithms/buffer/intersecting_inserter.hpp>
+#include <boost/geometry/extensions/algorithms/buffer/linestring_buffer.hpp>
+#include <boost/geometry/extensions/algorithms/buffer/line_line_intersection.hpp>
#include <boost/geometry/algorithms/detail/sections/get_section.hpp>
#include <boost/geometry/algorithms/detail/sections/sectionalize.hpp>
Modified: sandbox/geometry/boost/geometry/extensions/algorithms/offset.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/extensions/algorithms/offset.hpp (original)
+++ sandbox/geometry/boost/geometry/extensions/algorithms/offset.hpp 2010-04-30 10:58:07 EDT (Fri, 30 Apr 2010)
@@ -13,7 +13,7 @@
#include <boost/range/metafunctions.hpp>
#include <boost/geometry/core/point_type.hpp>
-#include <boost/geometry/algorithms/detail/buffer/line_line_intersection.hpp>
+#include <boost/geometry/extensions/algorithms/buffer/line_line_intersection.hpp>
#include <boost/geometry/algorithms/detail/disjoint.hpp>
#include <boost/geometry/geometries/concepts/check.hpp>
Modified: sandbox/geometry/libs/geometry/test/algorithms/area.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/test/algorithms/area.cpp (original)
+++ sandbox/geometry/libs/geometry/test/algorithms/area.cpp 2010-04-30 10:58:07 EDT (Fri, 30 Apr 2010)
@@ -22,7 +22,6 @@
template <typename P>
void test_all()
{
- //test_area_circle<P, double>();
test_geometry<boost::geometry::box<P> >("POLYGON((0 0,2 2))", 4.0);
test_geometry<boost::geometry::box<P> >("POLYGON((2 2,0 0))", 4.0);
@@ -66,6 +65,15 @@
BOOST_CHECK_CLOSE(area, 2.0 * 2.0 * expected, 0.0001);
}
+template <typename P>
+void test_ccw()
+{
+ typedef boost::geometry::polygon<P, std::vector, std::vector, false> ccw_polygon;
+ // counterclockwise rings (second is wrongly ordered)
+ test_geometry<ccw_polygon>("POLYGON((0 0,0 7,4 2,2 0,0 0))", -16.0);
+ test_geometry<ccw_polygon>("POLYGON((0 0,2 0,4 2,0 7,0 0))", 16.0);
+}
+
int test_main(int, char* [])
{
@@ -75,6 +83,8 @@
test_spherical<boost::geometry::point<double, 2, boost::geometry::cs::spherical<boost::geometry::degree> > >();
+ test_ccw<boost::geometry::point<double, 2, boost::geometry::cs::cartesian> >();
+
#if defined(HAVE_CLN)
test_all<boost::geometry::point_xy<boost::numeric_adaptor::cln_value_type> >();
#endif
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