mirror of https://github.com/CGAL/cgal
Fixed Interpolation demo
The regular triangulation must be built using weighted points
This commit is contained in:
parent
c65c15b2c1
commit
8c9817852f
|
|
@ -206,8 +206,16 @@ int main()
|
||||||
//define the triangulation:
|
//define the triangulation:
|
||||||
Gt traits = Gt(p,normal);
|
Gt traits = Gt(p,normal);
|
||||||
Regular_triangulation T(traits);
|
Regular_triangulation T(traits);
|
||||||
|
|
||||||
//insert the points:
|
//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;
|
char ch;
|
||||||
gv << CGAL::VIOLET;
|
gv << CGAL::VIOLET;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue