mirror of https://github.com/CGAL/cgal
support for LEDA 5.x (mostly done by Eric Berberich)
This commit is contained in:
parent
f7c9d94fd4
commit
68c3715b5c
|
|
@ -68,8 +68,12 @@ enum MaxFilesNumber {
|
|||
|
||||
#if BENCH_KERNEL == LEDA_KERNEL || BENCH_KERNEL == MY_KERNEL
|
||||
#if defined(USE_CGAL_WINDOW)
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/rat_window.h>
|
||||
#else
|
||||
#include <LEDA/graphics/rat_window.h>
|
||||
#endif
|
||||
#else
|
||||
#include <CGAL/IO/Qt_widget_Leda_rat.h>
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -26,8 +26,13 @@
|
|||
#include <CGAL/IO/Convex_hull_d_window_stream.h>
|
||||
#include <iostream>
|
||||
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/random_source.h>
|
||||
#include <LEDA/d3_window.h>
|
||||
#else
|
||||
#include <LEDA/core/random_source.h>
|
||||
#include <LEDA/graphics/d3_window.h>
|
||||
#endif
|
||||
|
||||
typedef leda_integer RT;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,11 @@
|
|||
#include <CGAL/leda_integer.h>
|
||||
#include <CGAL/Delaunay_d.h>
|
||||
#include <CGAL/IO/Delaunay_d_window_stream.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/d3_window.h>
|
||||
#else
|
||||
#include <LEDA/graphics/d3_window.h>
|
||||
#endif
|
||||
#include <iostream>
|
||||
|
||||
typedef leda_integer RT;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,11 @@
|
|||
#include <CGAL/random_selection.h>
|
||||
#include <iostream>
|
||||
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/misc.h>
|
||||
#else
|
||||
#include <LEDA/system/misc.h>
|
||||
#endif
|
||||
#include <CGAL/leda_integer.h>
|
||||
typedef leda_integer RT;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,10 +26,17 @@
|
|||
|
||||
#include <CGAL/LEDA_basic.h>
|
||||
#include <CGAL/IO/Window_stream.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/graph.h>
|
||||
#include <LEDA/node_map.h>
|
||||
#include <LEDA/node_map2.h>
|
||||
#include <LEDA/d3_point.h>
|
||||
#else
|
||||
#include <LEDA/graph/graph.h>
|
||||
#include <LEDA/graph/node_map.h>
|
||||
#include <LEDA/graph/node_map2.h>
|
||||
#include <LEDA/geo/d3_point.h>
|
||||
#endif
|
||||
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -40,7 +40,11 @@
|
|||
#include <CGAL/Kernel_d/debug.h>
|
||||
|
||||
#ifdef CGAL_USE_LEDA
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/memory.h>
|
||||
#else
|
||||
#include <LEDA/system/memory.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -46,7 +46,11 @@
|
|||
#include <CGAL/Polygon_2_algorithms.h>
|
||||
|
||||
#if defined(CGAL_USE_LEDA)
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/rational.h>
|
||||
#else
|
||||
#include <LEDA/numbers/rational.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
|
|
|||
|
|
@ -52,12 +52,20 @@ inline CGAL::TestrepH to_nt(int d)
|
|||
#include <CGAL/Homogeneous.h>
|
||||
#include <CGAL/Integer.h>
|
||||
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/REDEFINE_NAMES.h>
|
||||
#else
|
||||
#include <LEDA/internal/REDEFINE_NAMES.h>
|
||||
#endif
|
||||
inline integer to_nt(int d)
|
||||
{
|
||||
return integer(d);
|
||||
}
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/UNDEFINE_NAMES.h>
|
||||
#else
|
||||
#include <LEDA/internal/UNDEFINE_NAMES.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct randomint {
|
||||
|
|
|
|||
|
|
@ -19,8 +19,16 @@
|
|||
#endif
|
||||
|
||||
#if TESTR == 5
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/REDEFINE_NAMES.h>
|
||||
#else
|
||||
#include <LEDA/internal/REDEFINE_NAMES.h>
|
||||
#endif
|
||||
typedef integer testnt;
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/UNDEFINE_NAMES.h>
|
||||
#else
|
||||
#include <LEDA/internal/UNDEFINE_NAMES.h>
|
||||
#endif
|
||||
typedef CGAL::Homogeneous<testnt> TestR;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -52,12 +52,20 @@ inline CGAL::TestrepH to_nt(int d)
|
|||
#include <CGAL/Homogeneous.h>
|
||||
#include <CGAL/Integer.h>
|
||||
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/REDEFINE_NAMES.h>
|
||||
#else
|
||||
#include <LEDA/internal/REDEFINE_NAMES.h>
|
||||
#endif
|
||||
inline integer to_nt(int d)
|
||||
{
|
||||
return integer(d);
|
||||
}
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/UNDEFINE_NAMES.h>
|
||||
#else
|
||||
#include <LEDA/internal/UNDEFINE_NAMES.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct randomint {
|
||||
|
|
|
|||
|
|
@ -19,8 +19,16 @@
|
|||
#endif
|
||||
|
||||
#if TESTR == 5
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/REDEFINE_NAMES.h>
|
||||
#else
|
||||
#include <LEDA/internal/REDEFINE_NAMES.h>
|
||||
#endif
|
||||
typedef integer testnt;
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/UNDEFINE_NAMES.h>
|
||||
#else
|
||||
#include <LEDA/internal/UNDEFINE_NAMES.h>
|
||||
#endif
|
||||
typedef CGAL::Homogeneous<testnt> TestR;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -52,12 +52,21 @@ inline CGAL::TestrepH to_nt(int d)
|
|||
#include <CGAL/Homogeneous.h>
|
||||
#include <CGAL/Integer.h>
|
||||
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/REDEFINE_NAMES.h>
|
||||
#else
|
||||
#include <LEDA/internal/REDEFINE_NAMES.h>
|
||||
#endif
|
||||
inline integer to_nt(int d)
|
||||
{
|
||||
return integer(d);
|
||||
|
||||
}
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/UNDEFINE_NAMES.h>
|
||||
#else
|
||||
#include <LEDA/internal/UNDEFINE_NAMES.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct randomint {
|
||||
|
|
|
|||
|
|
@ -19,8 +19,16 @@
|
|||
#endif
|
||||
|
||||
#if TESTR == 5
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/REDEFINE_NAMES.h>
|
||||
#else
|
||||
#include <LEDA/internal/REDEFINE_NAMES.h>
|
||||
#endif
|
||||
typedef integer testnt;
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/UNDEFINE_NAMES.h>
|
||||
#else
|
||||
#include <LEDA/internal/UNDEFINE_NAMES.h>
|
||||
#endif
|
||||
typedef CGAL::Homogeneous<testnt> TestR;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -27,7 +27,11 @@
|
|||
#ifdef CGAL_USE_LEDA
|
||||
#include <CGAL/LEDA_basic.h>
|
||||
#include <CGAL/leda_integer.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/rat_point.h>
|
||||
#else
|
||||
#include <LEDA/geo/rat_point.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -28,7 +28,11 @@
|
|||
// The following is needed for LEDA 4.4 due to min/max problems...
|
||||
# define LEDA_NO_MIN_MAX_TEMPL
|
||||
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/basic.h>
|
||||
#else
|
||||
#include <LEDA/system/basic.h>
|
||||
#endif
|
||||
|
||||
#ifdef LEDA_NAMESPACE
|
||||
# define CGAL_LEDA_SCOPE leda
|
||||
|
|
|
|||
|
|
@ -28,9 +28,15 @@
|
|||
#include <CGAL/basic.h>
|
||||
#include <CGAL/enum.h>
|
||||
#include <CGAL/LEDA_basic.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/point.h>
|
||||
#include <LEDA/segment.h>
|
||||
#include <LEDA/line.h>
|
||||
#else
|
||||
#include <LEDA/geo/point.h>
|
||||
#include <LEDA/geo/segment.h>
|
||||
#include <LEDA/geo/line.h>
|
||||
#endif
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,15 @@
|
|||
#include <CGAL/basic.h>
|
||||
#include <CGAL/enum.h>
|
||||
#include <CGAL/LEDA_basic.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/rat_point.h>
|
||||
#include <LEDA/rat_segment.h>
|
||||
#include <LEDA/rat_line.h>
|
||||
#else
|
||||
#include <LEDA/geo/rat_point.h>
|
||||
#include <LEDA/geo/rat_segment.h>
|
||||
#include <LEDA/geo/rat_line.h>
|
||||
#endif
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,11 @@
|
|||
#include <CGAL/LEDA_basic.h>
|
||||
#include <CGAL/user_classes.h>
|
||||
#include <CGAL/basic_classes.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/rat_point.h>
|
||||
#else
|
||||
#include <LEDA/geo/rat_point.h>
|
||||
#endif
|
||||
#include <CGAL/Homogeneous.h>
|
||||
|
||||
#define CGAL_REP_CLASS_DEFINED
|
||||
|
|
|
|||
|
|
@ -21,9 +21,15 @@
|
|||
#define NEF_POLYHEDRON_2_PS_STREAM_H
|
||||
|
||||
#include <CGAL/Nef_polyhedron_2.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/gen_polygon.h>
|
||||
#include <LEDA/ps_file.h>
|
||||
#include <LEDA/color.h>
|
||||
#else
|
||||
#include <LEDA/geo/gen_polygon.h>
|
||||
#include <LEDA/graphics/ps_file.h>
|
||||
#include <LEDA/graphics/color.h>
|
||||
#endif
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
static int frame_default = 100;
|
||||
|
|
|
|||
|
|
@ -29,12 +29,13 @@
|
|||
#define CGAL_NEF_DEBUG 17
|
||||
#include <CGAL/Nef_2/debug.h>
|
||||
#include <CGAL/Nef_2/geninfo.h>
|
||||
|
||||
#ifdef CGAL_USE_LEDA
|
||||
#include <LEDA/basic.h>
|
||||
#if __LEDA__ > 410 && __LEDA__ < 441
|
||||
#define CGAL_USING_PPL
|
||||
#include <CGAL/Nef_2/PM_persistent_PL.h>
|
||||
#endif
|
||||
#include <CGAL/LEDA_basic.h>
|
||||
# if __LEDA__ > 410 && __LEDA__ < 441
|
||||
# define CGAL_USING_PPL
|
||||
# include <CGAL/Nef_2/PM_persistent_PL.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#if defined(CGAL_USE_LEDA)
|
||||
#include <CGAL/LEDA_basic.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/tuple.h>
|
||||
#include <LEDA/slist.h>
|
||||
#include <LEDA/list.h>
|
||||
|
|
@ -33,6 +34,15 @@
|
|||
#include <LEDA/map2.h>
|
||||
#include <LEDA/sortseq.h>
|
||||
#include <LEDA/p_queue.h>
|
||||
#else
|
||||
#include <LEDA/core/tuple.h>
|
||||
#include <LEDA/core/slist.h>
|
||||
#include <LEDA/core/list.h>
|
||||
#include <LEDA/core/map.h>
|
||||
#include <LEDA/core/map2.h>
|
||||
#include <LEDA/core/sortseq.h>
|
||||
#include <LEDA/core/p_queue.h>
|
||||
#endif
|
||||
#include <utility>
|
||||
#include <sstream>
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,11 @@
|
|||
#define GEN_POINT_LOCATION_H
|
||||
|
||||
#include <CGAL/LEDA_basic.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/pp_dictionary.h>
|
||||
#else
|
||||
#include <LEDA/core/pp_dictionary.h>
|
||||
#endif
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
|
|
|||
|
|
@ -2227,8 +2227,13 @@ drawing window.
|
|||
#include <CGAL/basic.h>
|
||||
#ifdef CGAL_USE_LEDA
|
||||
#include "xpms/nef.xpm"
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/pixmaps/button32/eye.xpm>
|
||||
#include <LEDA/pixmaps/button32/draw.xpm>
|
||||
#else
|
||||
#include <LEDA/graphics/pixmaps/button32/eye.xpm>
|
||||
#include <LEDA/graphics/pixmaps/button32/draw.xpm>
|
||||
#endif
|
||||
#include <CGAL/leda_integer.h>
|
||||
#include <CGAL/Extended_homogeneous.h>
|
||||
#include <CGAL/Filtered_extended_homogeneous.h>
|
||||
|
|
@ -2371,12 +2376,21 @@ operations |main_panel|, |op_panel|. We store a history of polyhedra:
|
|||
|ML| stores the names displayed, |MH| maps the names to the existing
|
||||
objects. |N_display| stores the current object drawn in |W|.
|
||||
<<a small interactive polyhedron editor>>=
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/panel.h>
|
||||
#include <LEDA/list.h>
|
||||
#include <LEDA/d_array.h>
|
||||
#include <LEDA/file_panel.h>
|
||||
#include <LEDA/file.h>
|
||||
#include <LEDA/stream.h>
|
||||
#else
|
||||
#include <LEDA/graphics/panel.h>
|
||||
#include <LEDA/core/list.h>
|
||||
#include <LEDA/core/d_array.h>
|
||||
#include <LEDA/graphics/file_panel.h>
|
||||
#include <LEDA/system/file.h>
|
||||
#include <LEDA/system/stream.h>
|
||||
#endif
|
||||
|
||||
static leda_panel main_panel;
|
||||
static leda_panel op_panel;
|
||||
|
|
@ -3034,10 +3048,17 @@ SUN Ultra-Enterprise-10000 with an 333 MHz UltraSPARC processors.
|
|||
#include <CGAL/IO/Window_stream.h>
|
||||
|
||||
#include <CGAL/IO/Nef_polyhedron_2_Window_stream.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/misc.h>
|
||||
#include <LEDA/rat_gen_polygon.h>
|
||||
#include <LEDA/rat_window.h>
|
||||
#include <LEDA/param_handler.h>
|
||||
#else
|
||||
#include <LEDA/system/misc.h>
|
||||
#include <LEDA/geo/rat_gen_polygon.h>
|
||||
#include <LEDA/graphics/rat_window.h>
|
||||
#include <LEDA/system/param_handler.h>
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ring_or_field<leda_integer> {
|
||||
|
|
@ -3441,7 +3462,11 @@ assert(n1.explorer().number_of_faces()==n2.explorer().number_of_faces());
|
|||
#include <CGAL/Filtered_extended_homogeneous.h>
|
||||
#include <CGAL/Nef_polyhedron_2.h>
|
||||
#include <CGAL/IO/Nef_polyhedron_2_PS_stream.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/stream.h>
|
||||
#else
|
||||
#include <LEDA/system/stream.h>
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ring_or_field<leda_integer> {
|
||||
|
|
|
|||
|
|
@ -1421,11 +1421,16 @@ class |PM_point_locator|.
|
|||
of LEDA starting version 4.2.
|
||||
<<Conditional persistent point location inclusion>>=
|
||||
#ifdef CGAL_USE_LEDA
|
||||
#include <LEDA/basic.h>
|
||||
#if __LEDA__ > 410
|
||||
#define CGAL_USING_PPL
|
||||
#include <CGAL/Nef_2/PM_persistent_PL.h>
|
||||
#endif
|
||||
# if CGAL_LEDA_VERSION < 500
|
||||
# include <LEDA/basic.h>
|
||||
# else
|
||||
# include <LEDA/system/basic.h>
|
||||
# endif
|
||||
|
||||
# if __LEDA__ > 410 && __LEDA__ < 441
|
||||
# define CGAL_USING_PPL
|
||||
# include <CGAL/Nef_2/PM_persistent_PL.h>
|
||||
# endif
|
||||
#endif
|
||||
@ \end{ignoreindiss}%
|
||||
The point location framework is added to the point location class only
|
||||
|
|
|
|||
|
|
@ -1584,9 +1584,15 @@ int main()
|
|||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Gmpz.h>
|
||||
#include <CGAL/Quotient.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/string.h>
|
||||
#include <LEDA/d_array.h>
|
||||
#include <LEDA/stream.h>
|
||||
#else
|
||||
#include <LEDA/core/string.h>
|
||||
#include <LEDA/core/d_array.h>
|
||||
#include <LEDA/system/stream.h>
|
||||
#endif
|
||||
#define POLYNOMIAL_EXPLICIT_OUTPUT
|
||||
|
||||
#ifndef CARTESIAN
|
||||
|
|
@ -1902,7 +1908,11 @@ sub specialize_members {
|
|||
|
||||
<<specialization-test.C>>=
|
||||
#include <CGAL/basic.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/integer.h>
|
||||
#else
|
||||
#include <LEDA/numbers/integer.h>
|
||||
#endif
|
||||
|
||||
// SPECIALIZE_CLASS(T,int) START
|
||||
template <typename T> class A;
|
||||
|
|
|
|||
|
|
@ -364,6 +364,7 @@ static const char* sweepversion = "STL segment overlay sweep";
|
|||
#endif // CGAL_SEGMENT_OVERLAY_TRAITS_H
|
||||
|
||||
<<leda segment overlay model>>=
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/tuple.h>
|
||||
#include <LEDA/slist.h>
|
||||
#include <LEDA/list.h>
|
||||
|
|
@ -371,6 +372,15 @@ static const char* sweepversion = "STL segment overlay sweep";
|
|||
#include <LEDA/map2.h>
|
||||
#include <LEDA/sortseq.h>
|
||||
#include <LEDA/p_queue.h>
|
||||
#else
|
||||
#include <LEDA/core/tuple.h>
|
||||
#include <LEDA/core/slist.h>
|
||||
#include <LEDA/core/list.h>
|
||||
#include <LEDA/core/map.h>
|
||||
#include <LEDA/core/map2.h>
|
||||
#include <LEDA/core/sortseq.h>
|
||||
#include <LEDA/core/p_queue.h>
|
||||
#endif
|
||||
#include <utility>
|
||||
#include <strstream>
|
||||
|
||||
|
|
@ -1459,9 +1469,15 @@ nodes.
|
|||
#ifndef LEDA_OVERLAY_TRAITS_H
|
||||
#define LEDA_OVERLAY_TRAITS_H
|
||||
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/rat_kernel.h>
|
||||
#include <LEDA/graph.h>
|
||||
#include <LEDA/slist.h>
|
||||
#else
|
||||
#include <LEDA/geo/rat_kernel.h>
|
||||
#include <LEDA/graph/graph.h>
|
||||
#include <LEDA/core/slist.h>
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
ostream& operator<<(ostream& os, const leda_slist<T>& s)
|
||||
|
|
@ -1650,7 +1666,11 @@ in the appendix (Section \ref{GenericSweepVisualization}).
|
|||
#ifndef LEDA_OVERLAY_VISUALIZATION_H
|
||||
#define LEDA_OVERLAY_VISUALIZATION_H
|
||||
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/rat_window.h>
|
||||
#else
|
||||
#include <LEDA/graphics/rat_window.h>
|
||||
#endif
|
||||
|
||||
template <class GENSWEEPTRAITS>
|
||||
class leda_visualization {
|
||||
|
|
@ -1735,12 +1755,21 @@ VDEVICE& device() { return W; }
|
|||
|
||||
@ \subsection{Testing the generic LEDA sweep}
|
||||
<<leda_segment_overlay-test.c>>=
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/rat_window.h>
|
||||
#else
|
||||
#include <LEDA/graphics/rat_window.h>
|
||||
#endif
|
||||
#include "Segment_overlay_traits.h"
|
||||
#include "leda_overlay_traits.h"
|
||||
#include "leda_overlay_visualization.h"
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/stream.h>
|
||||
#include <LEDA/param_handler.h>
|
||||
#else
|
||||
#include <LEDA/system/stream.h>
|
||||
#include <LEDA/system/param_handler.h>
|
||||
#endif
|
||||
|
||||
using namespace CGAL;
|
||||
|
||||
|
|
@ -1821,9 +1850,15 @@ square. The runtimes are in seconds on an Ultra 2 200 MHz.
|
|||
#define INCLUDEBOTH // to allow comparison
|
||||
#include "Segment_overlay_traits.h"
|
||||
#include "leda_overlay_traits.h"
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/param_handler.h>
|
||||
#include <LEDA/random_rat_point.h>
|
||||
#include <LEDA/plane_alg.h>
|
||||
#else
|
||||
#include <LEDA/system/param_handler.h>
|
||||
#include <LEDA/geo/random_rat_point.h>
|
||||
#include <LEDA/geo/plane_alg.h>
|
||||
#endif
|
||||
|
||||
typedef leda_list<leda_rat_segment>::iterator Seg_iterator;
|
||||
typedef CGAL::leda_seg_overlay_traits< Seg_iterator,
|
||||
|
|
@ -2242,10 +2277,17 @@ int main(int argc, char** argv)
|
|||
#include "Segment_overlay_traits.h"
|
||||
#include "leda_overlay_traits.h"
|
||||
#include "leda_overlay_visualization.h"
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/stream.h>
|
||||
#include <LEDA/rat_window.h>
|
||||
#include <LEDA/param_handler.h>
|
||||
#include <LEDA/random_rat_point.h>
|
||||
#else
|
||||
#include <LEDA/system/stream.h>
|
||||
#include <LEDA/graphics/rat_window.h>
|
||||
#include <LEDA/system/param_handler.h>
|
||||
#include <LEDA/geo/random_rat_point.h>
|
||||
#endif
|
||||
|
||||
typedef leda_list<leda_rat_segment>::iterator Seg_iterator;
|
||||
typedef CGAL::Segment_overlay_traits< Seg_iterator,
|
||||
|
|
|
|||
|
|
@ -2469,7 +2469,11 @@ LEDA-spezifischen Klassen:%"
|
|||
#ifndef GEN_POINT_LOCATION_H
|
||||
#define GEN_POINT_LOCATION_H
|
||||
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/pp_dictionary.h>
|
||||
#else
|
||||
#include <LEDA/core/pp_dictionary.h>
|
||||
#endif
|
||||
#include <strstream>
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ typedef CGAL::Extended_homogeneous<RT> Kernel;
|
|||
#endif
|
||||
|
||||
#ifdef CGAL_NEF3_USE_LEDA_RATIONAL
|
||||
#include <LEDA/leda_rational.h>
|
||||
#include <CGAL/leda_rational.h>
|
||||
typedef leda_rational NT;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ typedef CGAL::Extended_homogeneous<RT> Kernel;
|
|||
#endif
|
||||
|
||||
#ifdef CGAL_NEF3_USE_LEDA_RATIONAL
|
||||
#include <LEDA/leda_rational.h>
|
||||
#include <CGAL/leda_rational.h>
|
||||
typedef leda_rational NT;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ typedef CGAL::Extended_homogeneous<RT> Kernel;
|
|||
#endif
|
||||
|
||||
#ifdef CGAL_NEF3_USE_LEDA_RATIONAL
|
||||
#include <LEDA/leda_rational.h>
|
||||
#include <CGAL/leda_rational.h>
|
||||
typedef leda_rational NT;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ typedef CGAL::Extended_homogeneous<RT> Kernel;
|
|||
#endif
|
||||
|
||||
#ifdef CGAL_NEF3_USE_LEDA_RATIONAL
|
||||
#include <LEDA/leda_rational.h>
|
||||
#include <CGAL/leda_rational.h>
|
||||
typedef leda_rational NT;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ typedef CGAL::Extended_homogeneous<RT> Kernel;
|
|||
#endif
|
||||
|
||||
#ifdef CGAL_NEF3_USE_LEDA_RATIONAL
|
||||
#include <LEDA/leda_rational.h>
|
||||
#include <CGAL/leda_rational.h>
|
||||
typedef leda_rational NT;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ typedef CGAL::Extended_homogeneous<RT> Kernel;
|
|||
#endif
|
||||
|
||||
#ifdef CGAL_NEF3_USE_LEDA_RATIONAL
|
||||
#include <LEDA/leda_rational.h>
|
||||
#include <CGAL/leda_rational.h>
|
||||
typedef leda_rational NT;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ typedef CGAL::Extended_homogeneous<RT> Kernel;
|
|||
#endif
|
||||
|
||||
#ifdef CGAL_NEF3_USE_LEDA_RATIONAL
|
||||
#include <LEDA/leda_rational.h>
|
||||
#include <CGAL/leda_rational.h>
|
||||
typedef leda_rational NT;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ typedef CGAL::Extended_homogeneous<RT> Kernel;
|
|||
#endif
|
||||
|
||||
#ifdef CGAL_NEF3_USE_LEDA_RATIONAL
|
||||
#include <LEDA/leda_rational.h>
|
||||
#include <CGAL/leda_rational.h>
|
||||
typedef leda_rational NT;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ typedef CGAL::Extended_homogeneous<RT> Kernel;
|
|||
#endif
|
||||
|
||||
#ifdef CGAL_NEF3_USE_LEDA_RATIONAL
|
||||
#include <LEDA/leda_rational.h>
|
||||
#include <CGAL/leda_rational.h>
|
||||
typedef leda_rational NT;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ typedef CGAL::Extended_homogeneous<RT> Kernel;
|
|||
#endif
|
||||
|
||||
#ifdef CGAL_NEF3_USE_LEDA_RATIONAL
|
||||
#include <LEDA/leda_rational.h>
|
||||
#include <CGAL/leda_rational.h>
|
||||
typedef leda_rational NT;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ typedef CGAL::Extended_homogeneous<RT> Kernel;
|
|||
#endif
|
||||
|
||||
#ifdef CGAL_NEF3_USE_LEDA_RATIONAL
|
||||
#include <LEDA/leda_rational.h>
|
||||
#include <CGAL/leda_rational.h>
|
||||
typedef leda_rational NT;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,11 @@
|
|||
#include <CGAL/point_generators_3.h>
|
||||
#include <CGAL/Nef_polyhedron_S2.h>
|
||||
#include <CGAL/IO/Nef_polyhedron_S2_OGLUT_stream.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/param_handler.h>
|
||||
#else
|
||||
#include <LEDA/system/param_handler.h>
|
||||
#endif
|
||||
#include <CGAL/Nef_S2/SM_items.h>
|
||||
|
||||
typedef leda_integer NT;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,11 @@
|
|||
#include <CGAL/copy_n.h>
|
||||
#include <CGAL/random_selection.h>
|
||||
#include <CGAL/point_generators_3.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/param_handler.h>
|
||||
#else
|
||||
#include <LEDA/system/param_handler.h>
|
||||
#endif
|
||||
#include <CGAL/Nef_polyhedron_S2.h>
|
||||
#include <CGAL/Nef_S2/SM_io_parser.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,8 +26,13 @@
|
|||
#include <CGAL/copy_n.h>
|
||||
#include <CGAL/random_selection.h>
|
||||
#include <CGAL/point_generators_3.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/param_handler.h>
|
||||
#include <LEDA/random.h>
|
||||
#else
|
||||
#include <LEDA/system/param_handler.h>
|
||||
#include <LEDA/core/random.h>
|
||||
#endif
|
||||
// #include <CGAL/Nef_S2/leda_sphere_map.h>
|
||||
#include <CGAL/Nef_S2/Sphere_geometry_OGL.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,13 @@
|
|||
#include <CGAL/generic_sweep.h>
|
||||
#include <CGAL/Nef_2/Segment_overlay_traits.h>
|
||||
#include <CGAL/Nef_S2/Sphere_geometry.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/graph.h>
|
||||
#include <LEDA/graph_misc.h>
|
||||
#else
|
||||
#include <LEDA/graph/graph.h>
|
||||
#include <LEDA/graph/graph_misc.h>
|
||||
#endif
|
||||
|
||||
#undef CGAL_NEF_DEBUG
|
||||
#define CGAL_NEF_DEBUG 211
|
||||
|
|
|
|||
|
|
@ -2264,7 +2264,11 @@ int main(int argc, char **argv)
|
|||
#include <CGAL/copy_n.h>
|
||||
#include <CGAL/random_selection.h>
|
||||
#include <CGAL/point_generators_3.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/param_handler.h>
|
||||
#else
|
||||
#include <LEDA/system/param_handler.h>
|
||||
#endif
|
||||
#include <CGAL/Nef_S2/Sphere_map.h>
|
||||
#include <CGAL/Nef_S2/SM_decorator.h>
|
||||
#include <CGAL/Nef_S2/SM_io_parser.h>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,11 @@
|
|||
#include <utility>
|
||||
|
||||
#include <CGAL/LEDA_basic.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/bigfloat.h>
|
||||
#else
|
||||
#include <LEDA/numbers/bigfloat.h>
|
||||
#endif
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,11 @@
|
|||
#include <utility>
|
||||
|
||||
#include <CGAL/LEDA_basic.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/integer.h>
|
||||
#else
|
||||
#include <LEDA/numbers/integer.h>
|
||||
#endif
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,11 @@
|
|||
#include <utility>
|
||||
|
||||
#include <CGAL/LEDA_basic.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/rational.h>
|
||||
#else
|
||||
#include <LEDA/numbers/rational.h>
|
||||
#endif
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,11 @@
|
|||
#include <utility>
|
||||
|
||||
#include <CGAL/LEDA_basic.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/real.h>
|
||||
#else
|
||||
#include <LEDA/numbers/real.h>
|
||||
#endif
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -27,10 +27,16 @@
|
|||
|
||||
#include <CGAL/LEDA_basic.h>
|
||||
#include <CGAL/IO/Color.h>
|
||||
|
||||
#ifdef LEDA_PS_FILE_H
|
||||
# error Internal CGAL error: <LEDA/ps_file.h> should not have been included yet
|
||||
#else
|
||||
# include <LEDA/basic.h>
|
||||
# if CGAL_LEDA_VERSION < 500
|
||||
# error Internal CGAL error: <LEDA/ps_file.h> should not have been included yet
|
||||
# else
|
||||
# error Internal CGAL error: <LEDA/graphics/ps_file.h> should not have been included yet
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (CGAL_LEDA_VERSION < 500)
|
||||
# include <LEDA/list.h>
|
||||
# include <LEDA/string.h>
|
||||
# include <LEDA/stream.h>
|
||||
|
|
@ -39,19 +45,43 @@
|
|||
# include <LEDA/line.h>
|
||||
# include <LEDA/circle.h>
|
||||
# include <LEDA/polygon.h>
|
||||
# if (__LEDA__ >= 400)
|
||||
# include <LEDA/rectangle.h>
|
||||
# endif // 400
|
||||
# include <LEDA/color.h>
|
||||
# include <LEDA/window.h>
|
||||
# if (__LEDA__ >= 400)
|
||||
# include <LEDA/rat_window.h>
|
||||
# include <LEDA/geo_graph.h>
|
||||
# endif // 400
|
||||
# define private protected
|
||||
#else
|
||||
# include <LEDA/core/list.h>
|
||||
# include <LEDA/core/string.h>
|
||||
# include <LEDA/system/stream.h>
|
||||
# include <LEDA/geo/point.h>
|
||||
# include <LEDA/geo/segment.h>
|
||||
# include <LEDA/geo/line.h>
|
||||
# include <LEDA/geo/circle.h>
|
||||
# include <LEDA/geo/polygon.h>
|
||||
# include <LEDA/graphics/color.h>
|
||||
# include <LEDA/graphics/window.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if (CGAL_LEDA_VERSION >= 400)
|
||||
#if (CGAL_LEDA_VERSION < 500)
|
||||
#include <LEDA/rectangle.h>
|
||||
#include <LEDA/rat_window.h>
|
||||
#include <LEDA/geo_graph.h>
|
||||
#else
|
||||
#include <LEDA/geo/rectangle.h>
|
||||
#include <LEDA/graphics/rat_window.h>
|
||||
#include <LEDA/graphics/geo_graph.h>
|
||||
#endif
|
||||
#endif // 400
|
||||
|
||||
#define private protected
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
# include <LEDA/ps_file.h>
|
||||
# undef private
|
||||
#endif // LEDA_PS_FILE_H
|
||||
#else
|
||||
# include <LEDA/graphics/ps_file.h>
|
||||
#endif
|
||||
#undef private
|
||||
|
||||
#include <CGAL/IO/cgal_logo.h>
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
|
|
@ -161,57 +191,6 @@ operator<<(Postscript_file_stream& w, const Point_2<R>& p)
|
|||
return w;
|
||||
}
|
||||
|
||||
template< class R >
|
||||
Postscript_file_stream&
|
||||
operator>>(Postscript_file_stream& w, Point_2<R>& p)
|
||||
{
|
||||
typedef typename R::RT RT;
|
||||
leda_point l_p;
|
||||
leda_drawing_mode save = w.set_mode(leda_xor_mode);
|
||||
if (w >> l_p)
|
||||
{
|
||||
double x = l_p.xcoord();
|
||||
double y = l_p.ycoord();
|
||||
w << l_p;
|
||||
w.set_mode( save);
|
||||
w.draw_point(x,y);
|
||||
|
||||
p = Point_2<R>( RT(x), RT(y));
|
||||
}
|
||||
else
|
||||
{
|
||||
w.set_mode( save);
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
||||
template< class R >
|
||||
Postscript_file_stream&
|
||||
read(Postscript_file_stream& w, Point_2<R>& p)
|
||||
{
|
||||
typedef typename R::RT RT;
|
||||
leda_point l_p;
|
||||
if (w >> l_p)
|
||||
{
|
||||
double x = l_p.xcoord();
|
||||
double y = l_p.ycoord();
|
||||
p = Point_2<R>( RT(x), RT(y));
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
||||
template <class R>
|
||||
void
|
||||
read_mouse_plus(Postscript_file_stream& w, Point_2<R>& p, int& button)
|
||||
{
|
||||
typedef typename R::RT RT;
|
||||
double x, y;
|
||||
button = w.read_mouse(x,y);
|
||||
w.draw_point(x,y);
|
||||
|
||||
p = Point_2<R>(RT(x), RT(y));
|
||||
}
|
||||
|
||||
#endif // CGAL_POSTSCRIPT_FILE_STREAM_POINT_2
|
||||
#endif // CGAL_POINT_2_H
|
||||
|
||||
|
|
@ -230,48 +209,6 @@ operator<<(Postscript_file_stream& w, const Segment_2<R>& s)
|
|||
return w;
|
||||
}
|
||||
|
||||
template< class R >
|
||||
Postscript_file_stream&
|
||||
operator>>(Postscript_file_stream& w, Segment_2<R>& s)
|
||||
{
|
||||
typedef typename R::RT RT;
|
||||
leda_segment l_s;
|
||||
leda_drawing_mode save = w.set_mode(leda_xor_mode);
|
||||
if ( w.read( l_s))
|
||||
{
|
||||
double x1 = l_s.xcoord1();
|
||||
double y1 = l_s.ycoord1();
|
||||
double x2 = l_s.xcoord2();
|
||||
double y2 = l_s.ycoord2();
|
||||
w.set_mode( save);
|
||||
w.draw_segment(x1,y1, x2, y2);
|
||||
s = Segment_2<R>(Point_2<R>( RT(x1), RT(y1)),
|
||||
Point_2<R>( RT(x2), RT(y2)));
|
||||
}
|
||||
else
|
||||
{
|
||||
w.set_mode( save);
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
||||
template< class R >
|
||||
Postscript_file_stream&
|
||||
read(Postscript_file_stream& w, Segment_2<R>& s)
|
||||
{
|
||||
typedef typename R::RT RT;
|
||||
leda_segment l_s;
|
||||
if ( w.read( l_s))
|
||||
{
|
||||
double x1 = l_s.xcoord1();
|
||||
double y1 = l_s.ycoord1();
|
||||
double x2 = l_s.xcoord2();
|
||||
double y2 = l_s.ycoord2();
|
||||
s = Segment_2<R>(Point_2<R>( RT(x1), RT(y1)),
|
||||
Point_2<R>( RT(x2), RT(y2)));
|
||||
}
|
||||
return w;
|
||||
}
|
||||
#endif // CGAL_POSTSCRIPT_FILE_STREAM_SEGMENT_2
|
||||
#endif // CGAL_SEGMENT_2_H
|
||||
|
||||
|
|
@ -291,48 +228,6 @@ operator<<(Postscript_file_stream& w, const Line_2<R>& l)
|
|||
return w;
|
||||
}
|
||||
|
||||
template< class R >
|
||||
Postscript_file_stream&
|
||||
operator>>(Postscript_file_stream& w, Line_2<R>& l)
|
||||
{
|
||||
typedef typename R::RT RT;
|
||||
leda_segment l_s;
|
||||
leda_drawing_mode save = w.set_mode(leda_xor_mode);
|
||||
if ( w.read( l_s))
|
||||
{
|
||||
double x1 = l_s.xcoord1();
|
||||
double y1 = l_s.ycoord1();
|
||||
double x2 = l_s.xcoord2();
|
||||
double y2 = l_s.ycoord2();
|
||||
w.set_mode( save);
|
||||
w.draw_line(x1,y1, x2, y2);
|
||||
l = Line_2<R>(Point_2<R>( RT(x1), RT(y1)),
|
||||
Point_2<R>( RT(x2), RT(y2)));
|
||||
}
|
||||
else
|
||||
{
|
||||
w.set_mode( save);
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
||||
template< class R >
|
||||
Postscript_file_stream&
|
||||
read(Postscript_file_stream& w, Line_2<R>& l)
|
||||
{
|
||||
typedef typename R::RT RT;
|
||||
leda_segment l_s;
|
||||
if ( w.read( l_s))
|
||||
{
|
||||
double x1 = l_s.xcoord1();
|
||||
double y1 = l_s.ycoord1();
|
||||
double x2 = l_s.xcoord2();
|
||||
double y2 = l_s.ycoord2();
|
||||
l = Line_2<R>(Point_2<R>( RT(x1), RT(y1)),
|
||||
Point_2<R>( RT(x2), RT(y2)));
|
||||
}
|
||||
return w;
|
||||
}
|
||||
#endif // CGAL_POSTSCRIPT_FILE_STREAM_LINE_2
|
||||
#endif //CGAL_LINE_2_H
|
||||
|
||||
|
|
@ -352,48 +247,6 @@ operator<<(Postscript_file_stream& w, const Ray_2<R>& r)
|
|||
return w;
|
||||
}
|
||||
|
||||
template< class R >
|
||||
Postscript_file_stream&
|
||||
operator>>(Postscript_file_stream& w, Ray_2<R>& r)
|
||||
{
|
||||
typedef typename R::RT RT;
|
||||
leda_segment l_s;
|
||||
leda_drawing_mode save = w.set_mode(leda_xor_mode);
|
||||
if ( w.read( l_s))
|
||||
{
|
||||
double x1 = l_s.xcoord1();
|
||||
double y1 = l_s.ycoord1();
|
||||
double x2 = l_s.xcoord2();
|
||||
double y2 = l_s.ycoord2();
|
||||
w.set_mode( save);
|
||||
r = Ray_2<R>(Point_2<R>( RT(x1), RT(y1)),
|
||||
Point_2<R>( RT(x2), RT(y2)));
|
||||
w << r;
|
||||
}
|
||||
else
|
||||
{
|
||||
w.set_mode( save);
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
||||
template< class R >
|
||||
Postscript_file_stream&
|
||||
read(Postscript_file_stream& w, Ray_2<R>& r)
|
||||
{
|
||||
typedef typename R::RT RT;
|
||||
leda_segment l_s;
|
||||
if ( w.read( l_s))
|
||||
{
|
||||
double x1 = l_s.xcoord1();
|
||||
double y1 = l_s.ycoord1();
|
||||
double x2 = l_s.xcoord2();
|
||||
double y2 = l_s.ycoord2();
|
||||
r = Ray_2<R>(Point_2<R>( RT(x1), RT(y1)),
|
||||
Point_2<R>( RT(x2), RT(y2)));
|
||||
}
|
||||
return w;
|
||||
}
|
||||
#endif // CGAL_POSTSCRIPT_FILE_STREAM_RAY_2
|
||||
#endif //CGAL_RAY_2_H
|
||||
|
||||
|
|
@ -416,143 +269,6 @@ operator<<(Postscript_file_stream& w, const Triangle_2<R>& t)
|
|||
return w;
|
||||
}
|
||||
|
||||
template< class R >
|
||||
Postscript_file_stream&
|
||||
operator>>(Postscript_file_stream& w, Triangle_2<R>& t)
|
||||
{
|
||||
typedef typename R::RT RT;
|
||||
double x,y;
|
||||
int key = 0;
|
||||
#if ( __LEDA__ < 362 )
|
||||
w.state = 1;
|
||||
#else
|
||||
w.set_state( 1);
|
||||
#endif // __LEDA__ < ...
|
||||
leda_point first, second, third, p;
|
||||
leda_drawing_mode save = w.set_mode(leda_xor_mode);
|
||||
if ( !( w >> first)) { w.set_mode( save); return w; }
|
||||
int save_but[8];
|
||||
w.std_buttons(save_but);
|
||||
key = w.read_mouse_seg( first.xcoord(), first.ycoord(), x, y);
|
||||
if ( key == MOUSE_BUTTON(3))
|
||||
{
|
||||
w.set_buttons( save_but);
|
||||
w.set_mode( save);
|
||||
#if ( __LEDA__ < 362 )
|
||||
w.state = 0;
|
||||
#else
|
||||
w.set_state( 0);
|
||||
#endif // __LEDA__ < ...
|
||||
return w;
|
||||
}
|
||||
else
|
||||
{
|
||||
w << leda_segment( first.xcoord(), first.ycoord(), x, y);
|
||||
second = leda_point( x, y);
|
||||
}
|
||||
key = w.read_mouse_seg( second.xcoord(), second.ycoord(), x, y);
|
||||
if ( key == MOUSE_BUTTON(3))
|
||||
{
|
||||
w << leda_segment( first, second );
|
||||
w.set_buttons( save_but);
|
||||
w.set_mode( save);
|
||||
#if ( __LEDA__ < 362 )
|
||||
w.state = 0;
|
||||
#else
|
||||
w.set_state( 0);
|
||||
#endif // __LEDA__ < ...
|
||||
return w;
|
||||
}
|
||||
else
|
||||
{
|
||||
w << leda_segment( second.xcoord(), second.ycoord(), x, y);
|
||||
third = leda_point( x, y);
|
||||
}
|
||||
w << leda_segment( first, second );
|
||||
w << leda_segment( second, third );
|
||||
double x0 = first.xcoord();
|
||||
double y0 = first.ycoord();
|
||||
double x1 = second.xcoord();
|
||||
double y1 = second.ycoord();
|
||||
double x2 = third.xcoord();
|
||||
double y2 = third.ycoord();
|
||||
w.set_mode( save);
|
||||
w.draw_segment(x0,y0, x1, y1);
|
||||
w.draw_segment(x1,y1, x2, y2);
|
||||
w.draw_segment(x2,y2, x0, y0);
|
||||
|
||||
t = Triangle_2<R>(Point_2<R>( RT(x0), RT(y0)),
|
||||
Point_2<R>( RT(x1), RT(y1)),
|
||||
Point_2<R>( RT(x2), RT(y2)));
|
||||
return w;
|
||||
}
|
||||
|
||||
template< class R >
|
||||
Postscript_file_stream&
|
||||
read(Postscript_file_stream& w, Triangle_2<R>& t)
|
||||
{
|
||||
typedef typename R::RT RT;
|
||||
double x,y;
|
||||
int key = 0;
|
||||
#if ( __LEDA__ < 362 )
|
||||
w.state = 1;
|
||||
#else
|
||||
w.set_state( 1);
|
||||
#endif // __LEDA__ < ...
|
||||
leda_point first, second, third, p;
|
||||
leda_drawing_mode save = w.set_mode(leda_xor_mode);
|
||||
if ( !( w >> first)) { w.set_mode( save); return w; }
|
||||
int save_but[8];
|
||||
w.std_buttons(save_but);
|
||||
key = w.read_mouse_seg( first.xcoord(), first.ycoord(), x, y);
|
||||
if ( key == MOUSE_BUTTON(3))
|
||||
{
|
||||
w.set_buttons( save_but);
|
||||
w.set_mode( save);
|
||||
#if ( __LEDA__ < 362 )
|
||||
w.state = 0;
|
||||
#else
|
||||
w.set_state( 0);
|
||||
#endif // __LEDA__ < ...
|
||||
return w;
|
||||
}
|
||||
else
|
||||
{
|
||||
w << leda_segment( first.xcoord(), first.ycoord(), x, y);
|
||||
second = leda_point( x, y);
|
||||
}
|
||||
key = w.read_mouse_seg( second.xcoord(), second.ycoord(), x, y);
|
||||
if ( key == MOUSE_BUTTON(3))
|
||||
{
|
||||
w << leda_segment( first, second );
|
||||
w.set_buttons( save_but);
|
||||
w.set_mode( save);
|
||||
#if ( __LEDA__ < 362 )
|
||||
w.state = 0;
|
||||
#else
|
||||
w.set_state( 0);
|
||||
#endif // __LEDA__ < ...
|
||||
return w;
|
||||
}
|
||||
else
|
||||
{
|
||||
w << leda_segment( second.xcoord(), second.ycoord(), x, y);
|
||||
third = leda_point( x, y);
|
||||
}
|
||||
w << leda_segment( first, second );
|
||||
w << leda_segment( second, third );
|
||||
double x0 = first.xcoord();
|
||||
double y0 = first.ycoord();
|
||||
double x1 = second.xcoord();
|
||||
double y1 = second.ycoord();
|
||||
double x2 = third.xcoord();
|
||||
double y2 = third.ycoord();
|
||||
w.set_mode( save);
|
||||
t = Triangle_2<R>(Point_2<R>( RT(x0), RT(y0)),
|
||||
Point_2<R>( RT(x1), RT(y1)),
|
||||
Point_2<R>( RT(x2), RT(y2)));
|
||||
return w;
|
||||
}
|
||||
#endif // CGAL_POSTSCRIPT_FILE_STREAM_TRIANGLE_2
|
||||
#endif // CGAL_TRIANGLE_2_H
|
||||
|
||||
|
|
@ -570,88 +286,6 @@ operator<<(Postscript_file_stream& w, const Circle_2<R>& c)
|
|||
return w;
|
||||
}
|
||||
|
||||
template< class R >
|
||||
Postscript_file_stream&
|
||||
operator>>(Postscript_file_stream& w, Circle_2<R>& c)
|
||||
{
|
||||
typedef typename R::RT RT;
|
||||
double x,y;
|
||||
int key = 0;
|
||||
#if ( __LEDA__ < 362 )
|
||||
w.state = 1;
|
||||
#else
|
||||
w.set_state( 1);
|
||||
#endif // __LEDA__ < ...
|
||||
leda_point p;
|
||||
leda_drawing_mode save = w.set_mode(leda_xor_mode);
|
||||
if ( !( w.read( p))) { w.set_mode( save); return w; }
|
||||
double cx = p.xcoord();
|
||||
double cy = p.ycoord();
|
||||
Point_2<R> center = Point_2<R>( RT(cx), RT(cy));
|
||||
int save_but[8];
|
||||
w.std_buttons(save_but);
|
||||
key = w.read_mouse_circle(cx, cy, x, y);
|
||||
if ( key == MOUSE_BUTTON(3))
|
||||
{
|
||||
w.set_buttons( save_but);
|
||||
w.set_mode( save);
|
||||
#if ( __LEDA__ < 362 )
|
||||
w.state = 0;
|
||||
#else
|
||||
w.set_state( 0);
|
||||
#endif // __LEDA__ < ...
|
||||
return w;
|
||||
}
|
||||
double dx = x - cx;
|
||||
double dy = y - cy;
|
||||
double sqr = dx*dx+dy*dy;
|
||||
w.set_mode( save);
|
||||
w.set_buttons( save_but);
|
||||
w.draw_circle(cx, cy , sqrt(sqr));
|
||||
c = Circle_2<R>(center, RT(sqr));
|
||||
return w;
|
||||
}
|
||||
|
||||
template< class R >
|
||||
Postscript_file_stream&
|
||||
read(Postscript_file_stream& w, Circle_2<R>& c)
|
||||
{
|
||||
typedef typename R::RT RT;
|
||||
double x,y;
|
||||
int key = 0;
|
||||
#if ( __LEDA__ < 362 )
|
||||
w.state = 1;
|
||||
#else
|
||||
w.set_state( 1);
|
||||
#endif // __LEDA__ < ...
|
||||
leda_point p;
|
||||
leda_drawing_mode save = w.set_mode(leda_xor_mode);
|
||||
if ( !( w.read( p))) { w.set_mode( save); return w; }
|
||||
double cx = p.xcoord();
|
||||
double cy = p.ycoord();
|
||||
Point_2<R> center = Point_2<R>( RT(cx), RT(cy));
|
||||
int save_but[8];
|
||||
w.std_buttons(save_but);
|
||||
key = w.read_mouse_circle(cx, cy, x, y);
|
||||
if ( key == MOUSE_BUTTON(3))
|
||||
{
|
||||
w.set_buttons( save_but);
|
||||
w.set_mode( save);
|
||||
#if ( __LEDA__ < 362 )
|
||||
w.state = 0;
|
||||
#else
|
||||
w.set_state( 0);
|
||||
#endif // __LEDA__ < ...
|
||||
return w;
|
||||
}
|
||||
double dx = x - cx;
|
||||
double dy = y - cy;
|
||||
double sqr = dx*dx+dy*dy;
|
||||
w.set_mode( save);
|
||||
w.set_buttons( save_but);
|
||||
c = Circle_2<R>(center, RT(sqr));
|
||||
return w;
|
||||
}
|
||||
#endif // CGAL_POSTSCRIPT_FILE_STREAM_CIRCLE_2
|
||||
#endif // CGAL_CIRCLE_2_H
|
||||
|
||||
|
|
@ -673,80 +307,6 @@ operator<<(Postscript_file_stream& w, const Iso_rectangle_2<R>& r)
|
|||
return w;
|
||||
}
|
||||
|
||||
template< class R >
|
||||
Postscript_file_stream&
|
||||
operator>>(Postscript_file_stream& w, Iso_rectangle_2<R>& r)
|
||||
{
|
||||
typedef typename R::RT RT;
|
||||
double x,y;
|
||||
int key = 0;
|
||||
#if ( __LEDA__ < 362 )
|
||||
w.state = 1;
|
||||
#else
|
||||
w.set_state( 1);
|
||||
#endif // __LEDA__ < ...
|
||||
leda_point first, second;
|
||||
leda_drawing_mode save = w.set_mode(leda_xor_mode);
|
||||
if ( !( w.read( first))) { w.set_mode( save); return w; }
|
||||
int save_but[8];
|
||||
w.std_buttons(save_but);
|
||||
key = w.read_mouse_rect( first.xcoord(), first.ycoord(), x, y);
|
||||
if ( key == MOUSE_BUTTON(3))
|
||||
{
|
||||
w.set_buttons( save_but);
|
||||
w.set_mode( save);
|
||||
#if ( __LEDA__ < 362 )
|
||||
w.state = 0;
|
||||
#else
|
||||
w.set_state( 0);
|
||||
#endif // __LEDA__ < ...
|
||||
return w;
|
||||
}
|
||||
r = Iso_rectangle_2<R>(Point_2<R>( RT(first.xcoord()),
|
||||
RT(first.ycoord())),
|
||||
Point_2<R>( RT(x), RT(y)));
|
||||
w.set_mode( save);
|
||||
w.draw_rectangle( first.xcoord(), first.ycoord(), x, y);
|
||||
w.set_buttons( save_but);
|
||||
return w;
|
||||
}
|
||||
|
||||
template< class R >
|
||||
Postscript_file_stream&
|
||||
read(Postscript_file_stream& w, Iso_rectangle_2<R>& r)
|
||||
{
|
||||
typedef typename R::RT RT;
|
||||
double x,y;
|
||||
int key = 0;
|
||||
#if ( __LEDA__ < 362 )
|
||||
w.state = 1;
|
||||
#else
|
||||
w.set_state( 1);
|
||||
#endif // __LEDA__ < ...
|
||||
leda_point first, second;
|
||||
leda_drawing_mode save = w.set_mode(leda_xor_mode);
|
||||
if ( !( w.read( first))) { w.set_mode( save); return w; }
|
||||
int save_but[8];
|
||||
w.std_buttons(save_but);
|
||||
key = w.read_mouse_rect( first.xcoord(), first.ycoord(), x, y);
|
||||
if ( key == MOUSE_BUTTON(3))
|
||||
{
|
||||
w.set_buttons( save_but);
|
||||
w.set_mode( save);
|
||||
#if ( __LEDA__ < 362 )
|
||||
w.state = 0;
|
||||
#else
|
||||
w.set_state( 0);
|
||||
#endif // __LEDA__ < ...
|
||||
return w;
|
||||
}
|
||||
r = Iso_rectangle_2<R>(Point_2<R>( RT(first.xcoord()),
|
||||
RT(first.ycoord())),
|
||||
Point_2<R>( RT(x), RT(y)));
|
||||
w.set_mode( save);
|
||||
w.set_buttons( save_but);
|
||||
return w;
|
||||
}
|
||||
#endif // CGAL_POSTSCRIPT_FILE_STREAM_ISO_RECTANGLE_2
|
||||
#endif // CGAL_ISO_RECTANGLE_2_H
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,11 @@ CGAL_BEGIN_NAMESPACE
|
|||
class window;
|
||||
CGAL_END_NAMESPACE
|
||||
#else
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/window.h>
|
||||
#else
|
||||
#include <LEDA/graphics/window.h>
|
||||
#endif
|
||||
class leda_window;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,11 @@
|
|||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/IO/Color.h>
|
||||
#if CGAL_LEDA_VERSION < 500
|
||||
#include <LEDA/window.h>
|
||||
#else
|
||||
#include <LEDA/graphics/window.h>
|
||||
#endif
|
||||
#include <CGAL/IO/cgal_logo.h>
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
|
|
|
|||
Loading…
Reference in New Issue