mirror of https://github.com/CGAL/cgal
first version
This commit is contained in:
parent
0b747ce693
commit
12d80561f0
|
|
@ -0,0 +1,79 @@
|
|||
#ifndef CGAL_TYPES_HEADER
|
||||
#define CGAL_TYPES_HEADER
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/MP_Float.h>
|
||||
#include <CGAL/Quotient.h>
|
||||
#include <CGAL/Pm_default_dcel.h>
|
||||
#include <CGAL/Arr_segment_cached_traits_2.h>
|
||||
#include <CGAL/Arr_curve_origin_traits_2.h>
|
||||
#include <CGAL/Arr_polyline_traits_2.h>
|
||||
#include <CGAL/Pm_with_intersections.h>
|
||||
#include <CGAL/squared_distance_2.h>
|
||||
#include <CGAL/Polygon_2.h>
|
||||
#include <CGAL/Polygon_traits_2.h>
|
||||
#include <CGAL/IO/Arr_iostream.h>
|
||||
#include <CGAL/point_generators_2.h>
|
||||
#include <CGAL/Arr_conic_traits_2.h>
|
||||
#include <CGAL/IO/write_pm.h>
|
||||
#include <CGAL/IO/Pm_iostream.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
// Coordinate related typedef - using inexact number type
|
||||
typedef float Coord_type;
|
||||
typedef CGAL::Cartesian<Coord_type> Coord_kernel;
|
||||
typedef Coord_kernel::Point_2 Coord_point;
|
||||
typedef Coord_kernel::Segment_2 Coord_segment;
|
||||
typedef CGAL::Polygon_traits_2<Coord_kernel> PT;
|
||||
typedef std::vector<Coord_point> Container;
|
||||
typedef CGAL::Polygon_2<PT, Container> Cgal_polygon;
|
||||
|
||||
// Planar map typedef - using rational exact number type
|
||||
typedef CGAL::Quotient<CGAL::MP_Float> NT;
|
||||
typedef CGAL::Cartesian<NT> Kernel;
|
||||
|
||||
// Segments:
|
||||
typedef CGAL::Arr_segment_cached_traits_2<Kernel> Base_seg_traits;
|
||||
typedef CGAL::Arr_curve_origin_traits_2<Base_seg_traits> Seg_traits;
|
||||
typedef Seg_traits::Curve_2 Pm_seg_2;
|
||||
typedef Seg_traits::X_monotone_curve_2 Pm_xseg_2;
|
||||
typedef Seg_traits::Point_2 Pm_seg_point_2;
|
||||
typedef CGAL::Pm_default_dcel<Seg_traits> Seg_dcel;
|
||||
typedef CGAL::Planar_map_2<Seg_dcel, Seg_traits> Seg_pm;
|
||||
typedef CGAL::Planar_map_with_intersections_2<Seg_pm> Seg_arr;
|
||||
typedef Seg_arr::Locate_type Seg_locate_type;
|
||||
typedef Seg_arr::Halfedge_handle Seg_halfedge_handle;
|
||||
|
||||
// Polyline
|
||||
typedef CGAL::Arr_polyline_traits_2<Base_seg_traits> Base_pol_traits;
|
||||
typedef CGAL::Arr_curve_origin_traits_2<Base_pol_traits> Pol_traits;
|
||||
typedef Pol_traits::Curve_2 Pm_pol_2;
|
||||
typedef Pol_traits::X_monotone_curve_2 Pm_xpol_2;
|
||||
typedef Pol_traits::Point_2 Pm_pol_point_2;
|
||||
typedef CGAL::Pm_default_dcel<Pol_traits> Pol_dcel;
|
||||
typedef CGAL::Planar_map_2<Pol_dcel, Pol_traits> Pol_pm;
|
||||
typedef CGAL::Planar_map_with_intersections_2<Pol_pm> Pol_arr;
|
||||
typedef Pol_arr::Locate_type Pol_locate_type;
|
||||
typedef Pol_arr::Halfedge_handle Pol_halfedge_handle;
|
||||
typedef Pol_arr::Face_handle Pol_face_handle;
|
||||
typedef Pol_arr::Ccb_halfedge_circulator Pol_ccb_halfedge_circulator;
|
||||
typedef Pol_arr::Holes_iterator Pol_holes_iterator;
|
||||
|
||||
// Conics
|
||||
typedef CGAL::Arr_conic_traits_2<Kernel> Base_conic_traits;
|
||||
typedef CGAL::Arr_curve_origin_traits_2<Base_conic_traits> Conic_traits;
|
||||
typedef Conic_traits::Curve_2 Pm_conic_2;
|
||||
typedef Conic_traits::X_monotone_curve_2 Pm_xconic_2;
|
||||
typedef Conic_traits::Point_2 Pm_conic_point_2;
|
||||
typedef CGAL::Pm_default_dcel<Conic_traits> Conic_dcel;
|
||||
typedef CGAL::Planar_map_2<Conic_dcel, Conic_traits> Conic_pm;
|
||||
typedef CGAL::Planar_map_with_intersections_2<Conic_pm> Conic_arr;
|
||||
typedef Conic_arr::Locate_type Conic_locate_type;
|
||||
typedef Conic_arr::Halfedge_handle Conic_halfedge_handle;
|
||||
typedef CGAL::Pm_file_scanner<Conic_arr> Pm_scanner;
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
/* XPM */
|
||||
char *delete_xpm[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"32 32 4 1",
|
||||
" c opaque",
|
||||
". c navy",
|
||||
"X c #c0c0c0",
|
||||
"o c None",
|
||||
/* pixels */
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"ooooooooooo.oooooo.ooooooooooooo",
|
||||
"ooooooooooo.oooooo.ooooooooooooo",
|
||||
"oooooooooo..oooooo..oooooooooooo",
|
||||
"oooooooooo..oooooo..oooooooooooo",
|
||||
"oooooooooo..oooooo..oooooooooooo",
|
||||
"oooooooooo..oooooo..oooooooooooo",
|
||||
"oooooooooo...oooo...oooooooooooo",
|
||||
"ooooooooooo...oo...ooooooooooooo",
|
||||
"oooooooooooo......oooooooooooooo",
|
||||
"ooooooooooooo....ooooooooooooooo",
|
||||
"oooooooooooo......oooooooooooooo",
|
||||
"ooooooooooo........ooooooooooooo",
|
||||
"oooooooooo....oo....oooooooooooo",
|
||||
"oooooooo......oo......oooooooooo",
|
||||
"oooooo..oooo..oo..oooo..oooooooo",
|
||||
"ooooo..ooooo..oo..ooooo..ooooooo",
|
||||
"ooooo..ooooo..oo..ooooo..ooooooo",
|
||||
"ooooo..oooo..oooo..oooo..ooooooo",
|
||||
"oooooo..oo..oooooo..oo..oooooooo",
|
||||
"ooooooo....oooooooo....ooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo"
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,25 @@
|
|||
/* XPM */
|
||||
char * grid_xpm[] = {
|
||||
"16 16 4 1",
|
||||
" c #EDA1A1",
|
||||
". c None",
|
||||
"+ c #000000",
|
||||
"@ c #1F0670",
|
||||
"....+.......+....",
|
||||
"....+.......+....",
|
||||
"....+.......+....",
|
||||
"....+.......+....",
|
||||
"....+.......+....",
|
||||
"+++++++++++++++++",
|
||||
"....+.......+....",
|
||||
"....+.......+....",
|
||||
"....+.......+....",
|
||||
"....+.......+....",
|
||||
"....+.......+....",
|
||||
"+++++++++++++++++",
|
||||
"....+.......+....",
|
||||
"....+.......+....",
|
||||
"....+.......+....",
|
||||
"....+.......+....",
|
||||
"....+.......+...."
|
||||
};
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
/* XPM */
|
||||
char *insert_xpm[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"32 32 4 1",
|
||||
" c opaque",
|
||||
". c navy",
|
||||
"X c #c0c0c0",
|
||||
"o c None",
|
||||
/* pixels */
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"ooooo......................ooooo",
|
||||
"ooooo......................ooooo",
|
||||
"ooooo......................ooooo",
|
||||
"oooooooooooo.......ooooooooooooo",
|
||||
"oooooooooooo.......ooooooooooooo",
|
||||
"oooooooooooo.......ooooooooooooo",
|
||||
"oooooooooooo.......ooooooooooooo",
|
||||
"oooooooooooo.......ooooooooooooo",
|
||||
"oooooooooooo.......ooooooooooooo",
|
||||
"oooooooooooo.......ooooooooooooo",
|
||||
"oooooooooooo.......ooooooooooooo",
|
||||
"oooooooooooo.......ooooooooooooo",
|
||||
"oooooooooooo.......ooooooooooooo",
|
||||
"oooooooooooo.......ooooooooooooo",
|
||||
"oooooooooooo.......ooooooooooooo",
|
||||
"oooooooooooo.......ooooooooooooo",
|
||||
"oooooooooooo.......ooooooooooooo",
|
||||
"oooooooooooo.......ooooooooooooo",
|
||||
"oooooooooooo.......ooooooooooooo",
|
||||
"ooooo......................ooooo",
|
||||
"ooooo......................ooooo",
|
||||
"ooooo......................ooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo"
|
||||
};
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
# Created by the script create_makefile
|
||||
# This is the makefile for compiling a CGAL application.
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# include platform specific settings
|
||||
#---------------------------------------------------------------------#
|
||||
# Choose the right include file from the <cgalroot>/make directory.
|
||||
|
||||
# CGAL_MAKEFILE = ENTER_YOUR_INCLUDE_MAKEFILE_HERE
|
||||
include $(CGAL_MAKEFILE)
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# compiler flags
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
CXXFLAGS = \
|
||||
-Iinclude \
|
||||
$(CGAL_CXXFLAGS) \
|
||||
$(LONG_NAME_PROBLEM_CXXFLAGS) \
|
||||
$(DEBUG_OPT)
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# linker flags
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
LIBPATH = \
|
||||
$(CGAL_LIBPATH)
|
||||
|
||||
LDFLAGS = \
|
||||
$(LONG_NAME_PROBLEM_LDFLAGS) \
|
||||
$(CGAL_QT_LDFLAGS)
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# target entries
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
all: demo1
|
||||
|
||||
demo1$(OBJ_EXT): demo1.C demo1.moc
|
||||
$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) demo1.C
|
||||
|
||||
demo1.moc: demo1.C
|
||||
${QT_MOC} -o demo1.moc demo1.C
|
||||
|
||||
demo1$(EXE_EXT): demo1$(OBJ_EXT)
|
||||
$(CGAL_CXX) $(EXE_OPT)demo1 demo1$(OBJ_EXT) $(LDFLAGS)
|
||||
|
||||
clean: demo1.clean
|
||||
|
||||
demo1.o : cgal_types1.h
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# suffix rules
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
.C$(OBJ_EXT):
|
||||
$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $<
|
||||
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
/* XPM */
|
||||
char *polyline_xpm[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"32 32 4 1",
|
||||
" c opaque",
|
||||
". c navy",
|
||||
"X c #c0c0c0",
|
||||
"o c None",
|
||||
/* pixels */
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooo XXXXXXXXXXXXXXXXXXXXXXooo",
|
||||
"oooooo XXXXXXXXXXXXXXXXXXXXXXooo",
|
||||
"oooooo XXXXXXXXXXXXXXXXXXXXXXooo",
|
||||
"oooooo XXXXXXXXXXXXXXXXXXXXXXooo",
|
||||
"oooooo XXXXXXXXXXXX oo",
|
||||
"oooooo XXXXXXXXXXXX oooooooooooo",
|
||||
"oooooo XXXXXXXXXXXX oooooooooooo",
|
||||
"oooooo XXXX oooooooooooo",
|
||||
"oooooooooooooo XXXX oooooooooooo",
|
||||
"oooooooooooooo XXXX oooo",
|
||||
"oooooooooooooo XXXXXXXXXXXX oooo",
|
||||
"oooooooooooooo XXXXXXXXXXXX oooo",
|
||||
"oooooooooooooo XXXXXXXXXXXX oooo",
|
||||
"oooooooooooooo XXXXXXXXXXXX oooo",
|
||||
"oooooooooooooo XXXXXXX oooo",
|
||||
"ooooooooooooooooooo XXXXXXX oooo",
|
||||
"ooooooooooooooooooo XXXXXXX oooo",
|
||||
"ooooo........oooooo XXXXXXX oooo",
|
||||
"ooooooo......oooooo XXXXXXX oooo",
|
||||
"ooooooo......oooooo oooo",
|
||||
"oooooo.......ooooooooooooooooooo",
|
||||
"ooooo........ooooooooooooooooooo",
|
||||
"oooo.........ooooooooooooooooooo",
|
||||
"ooo.......oo.ooooooooooooooooooo",
|
||||
"ooo......ooo.ooooooooooooooooooo",
|
||||
"ooo.....oooooooooooooooooooooooo",
|
||||
"ooo....ooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo",
|
||||
"oooooooooooooooooooooooooooooooo"
|
||||
};
|
||||
|
||||
/* XPM */
|
||||
char * polyline_small_xpm[] = {
|
||||
"16 16 4 1",
|
||||
" c None",
|
||||
". c #EDA1A1",
|
||||
"+ c #000000",
|
||||
"@ c #1F0670",
|
||||
" ........ ",
|
||||
" .......... ",
|
||||
" ...+........ ",
|
||||
" ....+......... ",
|
||||
".....++++.......",
|
||||
"........+.......",
|
||||
"........+.......",
|
||||
"........+++.....",
|
||||
"..........+.....",
|
||||
"..@@@@@...+.....",
|
||||
"...@@@@...+..+..",
|
||||
"...@@@@...++++..",
|
||||
" .@@@@@........ ",
|
||||
" @@@..@....... ",
|
||||
"@@@.......... ",
|
||||
"@@ ........ "};
|
||||
Loading…
Reference in New Issue