From 8c9817852f22cf5463e0162173c8f2f1d1a94ebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 18 Apr 2017 14:26:34 +0200 Subject: [PATCH] Fixed Interpolation demo The regular triangulation must be built using weighted points --- Interpolation/demo/Interpolation/surface_voronoi.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Interpolation/demo/Interpolation/surface_voronoi.cpp b/Interpolation/demo/Interpolation/surface_voronoi.cpp index ba632edbc2d..a05686bb988 100644 --- a/Interpolation/demo/Interpolation/surface_voronoi.cpp +++ b/Interpolation/demo/Interpolation/surface_voronoi.cpp @@ -206,8 +206,16 @@ int main() //define the triangulation: Gt traits = Gt(p,normal); Regular_triangulation T(traits); + //insert the points: - T.insert(points.begin(), points.end()); + typename Gt::Construct_weighted_point_2 p2wp = + traits.construct_weighted_point_2_object(); + + typename Point_vector::const_iterator pvit = points.begin(), + pvend = points.end(); + for(; pvit!=pvend; ++pvit){ + T.insert(p2wp(*pvit++)); + } char ch; gv << CGAL::VIOLET;