Fixed traits usage in P2T2

P2DT2 must use P2DTT2, not P2TT2...
This commit is contained in:
Mael Rouxel-Labbé 2017-08-23 10:48:06 +02:00
parent 25b3d8480f
commit 95e110f0ba
12 changed files with 52 additions and 35 deletions

View File

@ -1,6 +1,7 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Periodic_2_triangulation_filtered_traits_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_2.h> #include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_traits_2.h>
#include <CGAL/Triangulation_vertex_base_2.h> #include <CGAL/Triangulation_vertex_base_2.h>
template < class GT, class Vb > template < class GT, class Vb >
@ -32,7 +33,7 @@ public:
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Periodic_2_triangulation_filtered_traits_2<K> GT; typedef CGAL::Periodic_2_Delaunay_triangulation_traits_2<K> GT;
typedef CGAL::Periodic_2_triangulation_vertex_base_2<GT> VbDS; typedef CGAL::Periodic_2_triangulation_vertex_base_2<GT> VbDS;
typedef My_vertex_base<GT, VbDS> Vb; typedef My_vertex_base<GT, VbDS> Vb;

View File

@ -1,11 +1,12 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Periodic_2_triangulation_filtered_traits_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_2.h> #include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_traits_2.h>
#include <CGAL/Triangulation_vertex_base_with_info_2.h> #include <CGAL/Triangulation_vertex_base_with_info_2.h>
#include <CGAL/IO/Color.h> #include <CGAL/IO/Color.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Periodic_2_triangulation_filtered_traits_2<K> GT; typedef CGAL::Periodic_2_Delaunay_triangulation_traits_2<K> GT;
typedef CGAL::Periodic_2_triangulation_vertex_base_2<GT> Vb; typedef CGAL::Periodic_2_triangulation_vertex_base_2<GT> Vb;
typedef CGAL::Triangulation_vertex_base_with_info_2<CGAL::Color, GT, Vb> VbInfo; typedef CGAL::Triangulation_vertex_base_with_info_2<CGAL::Color, GT, Vb> VbInfo;

View File

@ -1,12 +1,13 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Periodic_2_triangulation_traits_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_2.h> #include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_traits_2.h>
#include <iostream> #include <iostream>
#include <vector> #include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Periodic_2_triangulation_traits_2<K> GT; typedef CGAL::Periodic_2_Delaunay_triangulation_traits_2<K> GT;
typedef CGAL::Periodic_2_Delaunay_triangulation_2<GT> PDT; typedef CGAL::Periodic_2_Delaunay_triangulation_2<GT> PDT;

View File

@ -1,13 +1,14 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Periodic_2_triangulation_filtered_traits_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_2.h> #include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_traits_2.h>
#include <CGAL/point_generators_2.h> #include <CGAL/point_generators_2.h>
#include <vector> #include <vector>
#include <cassert> #include <cassert>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Periodic_2_triangulation_filtered_traits_2<K> GT; typedef CGAL::Periodic_2_Delaunay_triangulation_traits_2<K> GT;
typedef CGAL::Periodic_2_Delaunay_triangulation_2<GT> Delaunay; typedef CGAL::Periodic_2_Delaunay_triangulation_2<GT> Delaunay;
typedef Delaunay::Point Point; typedef Delaunay::Point Point;

View File

@ -1,9 +1,10 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Periodic_2_triangulation_traits_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_2.h> #include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_traits_2.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Periodic_2_triangulation_traits_2<K> PK; typedef CGAL::Periodic_2_Delaunay_triangulation_traits_2<K> PK;
typedef CGAL::Periodic_2_Delaunay_triangulation_2<PK> P2DT2; typedef CGAL::Periodic_2_Delaunay_triangulation_2<PK> P2DT2;
typedef PK::Point_2 Point; typedef PK::Point_2 Point;

View File

@ -1,11 +1,14 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_2.h> #include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
#include <CGAL/Periodic_2_triangulation_traits_2.h> #include <CGAL/Periodic_2_Delaunay_triangulation_traits_2.h>
#include <CGAL/Triangulation_vertex_base_with_info_2.h> #include <CGAL/Triangulation_vertex_base_with_info_2.h>
#include <iostream>
#include <vector> #include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Periodic_2_triangulation_traits_2<K> Gt; typedef CGAL::Periodic_2_Delaunay_triangulation_traits_2<K> Gt;
typedef CGAL::Triangulation_vertex_base_with_info_2<unsigned, Gt> Vb; typedef CGAL::Triangulation_vertex_base_with_info_2<unsigned, Gt> Vb;
typedef CGAL::Periodic_2_triangulation_face_base_2<Gt> Fb; typedef CGAL::Periodic_2_triangulation_face_base_2<Gt> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds; typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;

View File

@ -1,11 +1,14 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_2.h> #include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
#include <CGAL/Periodic_2_triangulation_traits_2.h> #include <CGAL/Periodic_2_Delaunay_triangulation_traits_2.h>
#include <CGAL/Triangulation_vertex_base_with_info_2.h> #include <CGAL/Triangulation_vertex_base_with_info_2.h>
#include <iostream>
#include <vector> #include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Periodic_2_triangulation_traits_2<K> Gt; typedef CGAL::Periodic_2_Delaunay_triangulation_traits_2<K> Gt;
typedef CGAL::Triangulation_vertex_base_with_info_2<unsigned, Gt> Vb; typedef CGAL::Triangulation_vertex_base_with_info_2<unsigned, Gt> Vb;
typedef CGAL::Periodic_2_triangulation_face_base_2<Gt> Fb; typedef CGAL::Periodic_2_triangulation_face_base_2<Gt> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds; typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;

View File

@ -1,11 +1,14 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_traits_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_2.h> #include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
#include <CGAL/Periodic_2_triangulation_traits_2.h>
#include <CGAL/Triangulation_vertex_base_with_info_2.h> #include <CGAL/Triangulation_vertex_base_with_info_2.h>
#include <iostream>
#include <vector> #include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Periodic_2_triangulation_traits_2<K> Gt; typedef CGAL::Periodic_2_Delaunay_triangulation_traits_2<K> Gt;
typedef CGAL::Triangulation_vertex_base_with_info_2<unsigned, Gt> Vb; typedef CGAL::Triangulation_vertex_base_with_info_2<unsigned, Gt> Vb;
typedef CGAL::Periodic_2_triangulation_face_base_2<Gt> Fb; typedef CGAL::Periodic_2_triangulation_face_base_2<Gt> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds; typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;

View File

@ -1,5 +1,6 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Periodic_2_triangulation_traits_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_traits_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_2.h> #include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
#include <CGAL/Random.h> #include <CGAL/Random.h>
@ -10,8 +11,7 @@
#include <vector> #include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Periodic_2_triangulation_traits_2<K> GT; typedef CGAL::Periodic_2_Delaunay_triangulation_traits_2<K> GT;
typedef CGAL::Periodic_2_Delaunay_triangulation_2<GT> PDT; typedef CGAL::Periodic_2_Delaunay_triangulation_2<GT> PDT;
typedef PDT::Point Point; typedef PDT::Point Point;

View File

@ -1,6 +1,7 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Periodic_2_triangulation_traits_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_2.h> #include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_traits_2.h>
#include <fstream> #include <fstream>
#include <cassert> #include <cassert>
@ -8,9 +9,9 @@
#include <vector> #include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Periodic_2_triangulation_traits_2<K> GT; typedef CGAL::Periodic_2_Delaunay_triangulation_traits_2<K> GT;
typedef CGAL::Periodic_2_Delaunay_triangulation_2<GT> PDT; typedef CGAL::Periodic_2_Delaunay_triangulation_2<GT> PDT;
typedef PDT::Face_handle Face_handle; typedef PDT::Face_handle Face_handle;
typedef PDT::Vertex_handle Vertex_handle; typedef PDT::Vertex_handle Vertex_handle;

View File

@ -2,26 +2,28 @@
#include "types.h" #include "types.h"
#include "interface_test.h" #include "interface_test.h"
#include <CGAL/Periodic_2_triangulation_2.h>
#include <CGAL/Periodic_2_triangulation_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_traits_2.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h> #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
typedef CGAL::Exact_predicates_exact_constructions_kernel K2; typedef CGAL::Exact_predicates_exact_constructions_kernel K2;
typedef CGAL::Periodic_2_triangulation_traits_2<K2> PTT2; typedef CGAL::Periodic_2_Delaunay_triangulation_traits_2<K2> PTT2;
// Explicit instantiation of the whole class : // Explicit instantiation of the whole class :
template class CGAL::Periodic_2_Delaunay_triangulation_2<PTT2>; template class CGAL::Periodic_2_Delaunay_triangulation_2<PTT2>;
#include <CGAL/MP_Float.h> #include <CGAL/MP_Float.h>
#include <CGAL/Simple_homogeneous.h> #include <CGAL/Simple_homogeneous.h>
typedef CGAL::Simple_homogeneous<CGAL::MP_Float> K3; typedef CGAL::Simple_homogeneous<CGAL::MP_Float> K3;
typedef CGAL::Periodic_2_triangulation_traits_2<K3> PTT3; typedef CGAL::Periodic_2_Delaunay_triangulation_traits_2<K3> PTT3;
// Explicit instantiation of the whole class : // Explicit instantiation of the whole class :
template class CGAL::Periodic_2_Delaunay_triangulation_2<PTT3>; template class CGAL::Periodic_2_Delaunay_triangulation_2<PTT3>;
int main() int main()
{ {
typedef Periodic_2_triangulation_2<Gt> P2T2; typedef CGAL::Periodic_2_triangulation_2<P2TT> P2T2;
typedef Periodic_2_Delaunay_triangulation_2<Gt> DP2T2; typedef CGAL::Periodic_2_Delaunay_triangulation_2<P2DTT> DP2T2;
test<P2T2>(false); test<P2T2>(false);
test<DP2T2>(false); test<DP2T2>(false);

View File

@ -7,11 +7,11 @@ const int N = 10;
void test_orientation() void test_orientation()
{ {
Gt traits; P2TT traits;
traits.set_domain(Gt::Iso_rectangle_2(0, 0, 1, 1)); traits.set_domain(Iso_rectangle(0, 0, 1, 1));
Gt::Offset_2 o0(0, 0); P2TT::Periodic_2_offset_2 o0(0, 0);
Gt::Offset_2 o1(0, 1); P2TT::Periodic_2_offset_2 o1(0, 1);
/// Near degenerate points, which cause the predicate to fail if not filtered /// Near degenerate points, which cause the predicate to fail if not filtered
Point p0(0.5 + (0.4999 / N) * 2, 0.5 + (0.4999 / N) * -5); Point p0(0.5 + (0.4999 / N) * 2, 0.5 + (0.4999 / N) * -5);
@ -54,11 +54,11 @@ void test_orientation()
void test_in_circle() void test_in_circle()
{ {
Gt traits; P2DTT traits;
traits.set_domain(Gt::Iso_rectangle_2(0, 0, 1, 1)); traits.set_domain(Iso_rectangle(0, 0, 1, 1));
Gt::Offset_2 o0(0, 0); P2DTT::Periodic_2_offset_2 o0(0, 0);
Gt::Offset_2 o1(0, 1); P2DTT::Periodic_2_offset_2 o1(0, 1);
/// Near degenerate points, which cause the predicate to fail if not filtered /// Near degenerate points, which cause the predicate to fail if not filtered
/// On the circle with center (0.4999, 0.4999) and radius 5 /// On the circle with center (0.4999, 0.4999) and radius 5