Fixed Interpolation demo

The regular triangulation must be built using weighted points
This commit is contained in:
Mael Rouxel-Labbé 2017-04-18 14:26:34 +02:00
parent c65c15b2c1
commit 8c9817852f
1 changed files with 9 additions and 1 deletions

View File

@ -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;