- Make demos and examples use Filtered_kernel.

This commit is contained in:
Sylvain Pion 2001-07-19 14:31:20 +00:00
parent 84b9e8c277
commit fcd2c8bd9e
10 changed files with 25 additions and 130 deletions

View File

@ -1,3 +1,6 @@
Version 1.76 (19 July 01)
- Make demos and examples use Filtered_kernel.
Version 1.75 (18 July 01)
- Fix return type of Compare_distance_3 in the HierarchyTraits_3 doc.
- Remove constructors for vertices in the doc.

View File

@ -1,9 +1,7 @@
The demos use Geomview
[see the chapter Geomview in the cgal manual - support library:
Geomview 1.8.1 is required.
Important: The last line in the startup file .geomview must be (echo
"started"). The two commands rsh and Geomview must be in the user's
path, otherwise the program will not be able to execute.]
Geomview 1.8.1 is required. The geomview command must be in the user's $PATH,
otherwise the program will not be able to execute.]
------- demo -------------------------------------------------
Construction of a Delaunay triangulation.
@ -17,10 +15,6 @@ Locates a point a shows the cell containing it
Draws the triangulation (edges and cells) in geomview,
then the user can move one of the two displayed versions
of the triangulation.
This demo program uses "doubles".
For a robust version, CGAL::Filtered_exact<double, CGAL::MP_Float>
should be used.
--------------------------------------------------------------
------- demo_color -------------------------------------------
@ -43,4 +37,3 @@ Constructs a Delaunay triangulation for points on a grid.
Then removes all the vertices in random order
--------------------------------------------------------------

View File

@ -30,21 +30,11 @@ int main()
}
#else
#include <CGAL/Cartesian.h>
// Workaround for VC++ necessary for Filtered_exact.
#ifdef CGAL_CFG_MATCHING_BUG_2
# define CGAL_IA_CT double
# define CGAL_IA_PROTECTED true
# define CGAL_IA_CACHE No_Filter_Cache
# define CGAL_IA_ET CGAL::MP_Float
#endif
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Filtered_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/MP_Float.h>
#include <CGAL/Filtered_exact.h>
#include <CGAL/IO/Geomview_stream.h>
#include <CGAL/IO/Triangulation_geomview_ostream_3.h>
@ -53,11 +43,7 @@ int main()
#include <unistd.h>
#include <list>
// using Filtered_exact number type is advised :
typedef CGAL::Filtered_exact<double, CGAL::MP_Float> NT;
typedef CGAL::Cartesian<NT> K;
typedef CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > K;
typedef CGAL::Triangulation_3<K> Triangulation;
typedef CGAL::Delaunay_triangulation_3<K> Delaunay;

View File

@ -30,21 +30,11 @@ int main()
}
#else
#include <CGAL/Cartesian.h>
// Workaround for VC++ necessary for Filtered_exact.
#ifdef CGAL_CFG_MATCHING_BUG_2
# define CGAL_IA_CT double
# define CGAL_IA_PROTECTED true
# define CGAL_IA_CACHE No_Filter_Cache
# define CGAL_IA_ET CGAL::MP_Float
#endif
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Filtered_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/MP_Float.h>
#include <CGAL/Filtered_exact.h>
#include <CGAL/IO/Geomview_stream.h>
#include <CGAL/IO/Triangulation_geomview_ostream_3.h>
@ -73,11 +63,7 @@ public :
{}
};
// using Filtered_exact number type is advised :
typedef CGAL::Filtered_exact<double, CGAL::MP_Float> NT;
typedef CGAL::Cartesian<NT> K;
typedef CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > K;
typedef K::Point_3 Point;

View File

@ -31,30 +31,19 @@ int main()
#else
#include <CGAL/Cartesian.h>
// Workaround for VC++ necessary for Filtered_exact.
#ifdef CGAL_CFG_MATCHING_BUG_2
# define CGAL_IA_CT double
# define CGAL_IA_PROTECTED true
# define CGAL_IA_CACHE No_Filter_Cache
# define CGAL_IA_ET CGAL::MP_Float
#endif
#include <CGAL/Filtered_kernel.h>
#include <CGAL/Triangulation_3.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Triangulation_hierarchy_3.h>
#include <CGAL/MP_Float.h>
#include <CGAL/Filtered_exact.h>
#include <CGAL/IO/Geomview_stream.h>
#include <CGAL/IO/Triangulation_geomview_ostream_3.h>
#include <unistd.h>
#include <vector>
typedef CGAL::Filtered_exact<double, CGAL::MP_Float> NT;
typedef CGAL::Cartesian<NT> K;
typedef CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > K;
typedef CGAL::Triangulation_vertex_base_3<K> Vb;
typedef CGAL::Triangulation_hierarchy_vertex_base_3<Vb> Vbh;

View File

@ -30,21 +30,11 @@ int main()
}
#else
#include <CGAL/Cartesian.h>
// Workaround for VC++ necessary for Filtered_exact.
#ifdef CGAL_CFG_MATCHING_BUG_2
# define CGAL_IA_CT double
# define CGAL_IA_PROTECTED true
# define CGAL_IA_CACHE No_Filter_Cache
# define CGAL_IA_ET CGAL::MP_Float
#endif
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Filtered_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/MP_Float.h>
#include <CGAL/Filtered_exact.h>
#include <CGAL/IO/Geomview_stream.h>
#include <CGAL/IO/Triangulation_geomview_ostream_3.h>
@ -53,11 +43,7 @@ int main()
#include <unistd.h>
#include <list>
// using Filtered_exact number type is advised :
typedef CGAL::Filtered_exact<double, CGAL::MP_Float> NT;
typedef CGAL::Cartesian<NT> K;
typedef CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > K;
typedef CGAL::Triangulation_3<K> Triangulation;
typedef CGAL::Delaunay_triangulation_3<K> Delaunay;

View File

@ -4,7 +4,4 @@ Construction of a triangulation.
Makes different tests on it.
Writes the triangulation into a file "output"
This example program uses "doubles".
For a robust version, another arithmetic should be used.
--------------------------------------------------------------

View File

@ -1,17 +1,7 @@
// Triangulation_3/example_color.C
#include <CGAL/Cartesian.h>
// Workaround for VC++ necessary for Filtered_exact.
#ifdef CGAL_CFG_MATCHING_BUG_2
# define CGAL_IA_CT double
# define CGAL_IA_PROTECTED true
# define CGAL_IA_CACHE No_Filter_Cache
# define CGAL_IA_ET CGAL::MP_Float
#endif
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Filtered_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/MP_Float.h>
#include <CGAL/Filtered_exact.h>
#include <cassert>
@ -40,11 +30,7 @@ public :
{}
};
// using Filtered_exact number type is advised :
typedef CGAL::Filtered_exact<double, CGAL::MP_Float> NT;
typedef CGAL::Cartesian<NT> K;
typedef CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > K;
typedef K::Point_3 Point;

View File

@ -1,30 +1,14 @@
// Triangulation_3/example_hierarchy.C
#include <CGAL/Cartesian.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Filtered_kernel.h>
// Workaround for VC++ necessary for Filtered_exact.
#ifdef CGAL_CFG_MATCHING_BUG_2
# define CGAL_IA_CT double
# define CGAL_IA_PROTECTED true
# define CGAL_IA_CACHE No_Filter_Cache
# define CGAL_IA_ET CGAL::MP_Float
#endif
#include <CGAL/Triangulation_data_structure_3.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Triangulation_hierarchy_3.h>
#include <CGAL/MP_Float.h>
#include <CGAL/Filtered_exact.h>
#include <cassert>
#include <vector>
// using Filtered_exact number type is advised :
typedef CGAL::Filtered_exact<double, CGAL::MP_Float> NT;
// chosing the representation (Cartesian or homogeneous)
typedef CGAL::Cartesian<NT> K;
typedef CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > K;
typedef CGAL::Triangulation_vertex_base_3<K> Vb;
typedef CGAL::Triangulation_hierarchy_vertex_base_3<Vb> Vbh;

View File

@ -1,17 +1,8 @@
// Triangulation_3/example_simple.C
#include <CGAL/Cartesian.h>
// Workaround for VC++ necessary for Filtered_exact.
#ifdef CGAL_CFG_MATCHING_BUG_2
# define CGAL_IA_CT double
# define CGAL_IA_PROTECTED true
# define CGAL_IA_CACHE No_Filter_Cache
# define CGAL_IA_ET CGAL::MP_Float
#endif
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Filtered_kernel.h>
#include <CGAL/Triangulation_3.h>
#include <CGAL/MP_Float.h>
#include <CGAL/Filtered_exact.h>
#include <iostream>
#include <fstream>
@ -19,13 +10,7 @@
#include <list>
#include <vector>
// using Filtered_exact number type is advised :
typedef CGAL::Filtered_exact<double, CGAL::MP_Float> NT;
// chosing the representation (Cartesian or homogeneous)
typedef CGAL::Cartesian<NT> K;
typedef CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > K;
typedef CGAL::Triangulation_3<K> Triangulation;