mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-11 13:34:10 +00:00
Updated paths
Added ccw test for area [SVN r61707]
This commit is contained in:
parent
64f3bdb447
commit
da5e753d62
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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 @@ void test_spherical()
|
||||
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 @@ int test_main(int, char* [])
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user