Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Test for General_polygon_with_holes_2 containment of a Point_2

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Test for General_polygon_with_holes_2 containment of a Point_2


Chronological Thread 
  • From: KHartmann <>
  • To:
  • Subject: Re: [cgal-discuss] Test for General_polygon_with_holes_2 containment of a Point_2
  • Date: Mon, 21 Mar 2016 08:11:16 -0700 (PDT)
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=SoftFail ; spf=None
  • Ironport-phdr: 9a23:rUK4mRRkcens4Kg2U809UUBVR9psv+yvbD5Q0YIujvd0So/mwa64ZxCN2/xhgRfzUJnB7Loc0qyN4/CmADVLvsvJmUtBWaIPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3BPAZ4bt74BpTVx5zukbviq9uKOk4X2XKUWvBbElaflU3prM4YgI9veO4a6yDihT92QdlQ3n5iPlmJnhzxtY+a9Z9n9DlM6bp6r5YTGfayQ6NtRrNRCHEqMns++dbwnRjFVwqGoHUGAUsMlR8dICjM9g3/V5H3+n/5tuNnxCyTO8veRLsxHzO44PE4G1fTlC4bOmthoynsgctqgfcDrQ==

Thanks Efi,

I'm close to getting "locate" to compile but boost doesn't like something
about the way I'm doing things.
Could you tell me why the following code won't compile? The Visual Studio
error message is below the code.
If I comment out the "locate" line, it compiles.

Kevin



#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Polygon_2.h>
#include <CGAL/Polygon_with_holes_2.h>
#include <CGAL/Polygon_set_2.h>
#include <CGAL/Arr_batched_point_location.h>

typedef CGAL::Lazy_kernel<CGAL::Simple_cartesian&lt;CGAL::Gmpq> > Kernel;
typedef Kernel::Point_2 Point_2;
typedef CGAL::Polygon_2<Kernel> Polygon_2;
typedef CGAL::Polygon_with_holes_2<Kernel>
Polygon_with_holes_2;
typedef CGAL::Polygon_set_2<Kernel> Polygon_set_2;

typedef Kernel::Circle_2 Circle_2;
typedef CGAL::Gps_circle_segment_traits_2<Kernel> Traits_2;
typedef CGAL::General_polygon_set_2<Traits_2> Gen_Polygon_set_2;
typedef Traits_2::General_polygon_2 Gen_Polygon_2;
typedef Traits_2::General_polygon_with_holes_2
Gen_Polygon_with_holes_2;
typedef Traits_2::Curve_2 Curve_2;
typedef Traits_2::X_monotone_curve_2
X_monotone_curve_2;

typedef CGAL::Arrangement_2<Traits_2> Arrangement_2;
typedef Gen_Polygon_set_2::Arrangement_2::Point_2 Arr_Point_2;
typedef CGAL::Arr_point_location_result<Arrangement_2>
Point_location_result;
typedef std::pair<Arr_Point_2, Point_location_result::Type> Query_result;


bool TestContainment( Gen_Polygon_with_holes_2& pwh )
{
Gen_Polygon_set_2 gps( pwh );

Gen_Polygon_set_2::Arrangement_2& arr = gps.arrangement();

std::list<Arr_Point_2> points;
points.push_back(Arr_Point_2(1, 2));
points.push_back(Arr_Point_2(4, 3));

std::list<Query_result> results;
CGAL::locate( arr, points.begin(), points.end(), std::back_inserter(
results ));

return false;
}

Error 41 error C2665:
'boost::detail::variant::make_initializer_node::apply<BaseIndexPair,Iterator>::initializer_node::initialize'
: none of the 7 overloads could convert all the argument types
D:\boost\boost-1.56.0\boost\variant\variant.hpp 1442




--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Test-for-General-polygon-with-holes-2-containment-of-a-Point-2-tp4661702p4661709.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page