mirror of https://github.com/CGAL/cgal
Fixed traits usage in P2T2
P2DT2 must use P2DTT2, not P2TT2...
This commit is contained in:
parent
25b3d8480f
commit
95e110f0ba
|
|
@ -1,6 +1,7 @@
|
|||
#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_traits_2.h>
|
||||
#include <CGAL/Triangulation_vertex_base_2.h>
|
||||
|
||||
template < class GT, class Vb >
|
||||
|
|
@ -32,7 +33,7 @@ public:
|
|||
|
||||
|
||||
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 My_vertex_base<GT, VbDS> Vb;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
#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_traits_2.h>
|
||||
#include <CGAL/Triangulation_vertex_base_with_info_2.h>
|
||||
#include <CGAL/IO/Color.h>
|
||||
|
||||
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::Triangulation_vertex_base_with_info_2<CGAL::Color, GT, Vb> VbInfo;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
#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_traits_2.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
#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_traits_2.h>
|
||||
#include <CGAL/point_generators_2.h>
|
||||
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
|
||||
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 Delaunay::Point Point;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
#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_traits_2.h>
|
||||
|
||||
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 PK::Point_2 Point;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.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 <iostream>
|
||||
#include <vector>
|
||||
|
||||
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::Periodic_2_triangulation_face_base_2<Gt> Fb;
|
||||
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.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 <iostream>
|
||||
#include <vector>
|
||||
|
||||
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::Periodic_2_triangulation_face_base_2<Gt> Fb;
|
||||
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
#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_triangulation_traits_2.h>
|
||||
#include <CGAL/Triangulation_vertex_base_with_info_2.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
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::Periodic_2_triangulation_face_base_2<Gt> Fb;
|
||||
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#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/Random.h>
|
||||
|
|
@ -10,8 +11,7 @@
|
|||
#include <vector>
|
||||
|
||||
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 PDT::Point Point;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#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_traits_2.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <cassert>
|
||||
|
|
@ -8,9 +9,9 @@
|
|||
#include <vector>
|
||||
|
||||
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::Vertex_handle Vertex_handle;
|
||||
|
|
|
|||
|
|
@ -2,26 +2,28 @@
|
|||
|
||||
#include "types.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>
|
||||
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 :
|
||||
template class CGAL::Periodic_2_Delaunay_triangulation_2<PTT2>;
|
||||
|
||||
#include <CGAL/MP_Float.h>
|
||||
#include <CGAL/Simple_homogeneous.h>
|
||||
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 :
|
||||
template class CGAL::Periodic_2_Delaunay_triangulation_2<PTT3>;
|
||||
|
||||
int main()
|
||||
{
|
||||
typedef Periodic_2_triangulation_2<Gt> P2T2;
|
||||
typedef Periodic_2_Delaunay_triangulation_2<Gt> DP2T2;
|
||||
typedef CGAL::Periodic_2_triangulation_2<P2TT> P2T2;
|
||||
typedef CGAL::Periodic_2_Delaunay_triangulation_2<P2DTT> DP2T2;
|
||||
|
||||
test<P2T2>(false);
|
||||
test<DP2T2>(false);
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ const int N = 10;
|
|||
|
||||
void test_orientation()
|
||||
{
|
||||
Gt traits;
|
||||
traits.set_domain(Gt::Iso_rectangle_2(0, 0, 1, 1));
|
||||
P2TT traits;
|
||||
traits.set_domain(Iso_rectangle(0, 0, 1, 1));
|
||||
|
||||
Gt::Offset_2 o0(0, 0);
|
||||
Gt::Offset_2 o1(0, 1);
|
||||
P2TT::Periodic_2_offset_2 o0(0, 0);
|
||||
P2TT::Periodic_2_offset_2 o1(0, 1);
|
||||
|
||||
/// 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);
|
||||
|
|
@ -54,11 +54,11 @@ void test_orientation()
|
|||
|
||||
void test_in_circle()
|
||||
{
|
||||
Gt traits;
|
||||
traits.set_domain(Gt::Iso_rectangle_2(0, 0, 1, 1));
|
||||
P2DTT traits;
|
||||
traits.set_domain(Iso_rectangle(0, 0, 1, 1));
|
||||
|
||||
Gt::Offset_2 o0(0, 0);
|
||||
Gt::Offset_2 o1(0, 1);
|
||||
P2DTT::Periodic_2_offset_2 o0(0, 0);
|
||||
P2DTT::Periodic_2_offset_2 o1(0, 1);
|
||||
|
||||
/// Near degenerate points, which cause the predicate to fail if not filtered
|
||||
/// On the circle with center (0.4999, 0.4999) and radius 5
|
||||
|
|
|
|||
Loading…
Reference in New Issue