Merge branch 'CGAL_headers_only_step1-gdamiand_cjamin-old' into CGAL_headers_only_step1-gdamiand_cjamin

This commit is contained in:
Guillaume Damiand 2016-06-22 20:54:37 +02:00
commit e21ef313c0
134 changed files with 1298 additions and 1016 deletions

View File

@ -13,19 +13,21 @@ endif()
# Include this package's headers first
include_directories( BEFORE ./ ./include ../../include )
# Find CGAL and CGAL Qt5
find_package(CGAL COMPONENTS Qt5 )
include( ${CGAL_USE_FILE} )
find_package(CGAL COMPONENTS Qt5)
# Find Qt5 itself
find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Gui Svg)
include( ${CGAL_USE_FILE} )
# Find OpenGL
find_package(OpenGL)
# Find QGLViewer
if(Qt5_FOUND)
find_package(QGLViewer )
find_package(QGLViewer)
endif(Qt5_FOUND)
if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
@ -45,13 +47,13 @@ if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FO
qt5_generate_moc( "Scene.h" "${CMAKE_CURRENT_BINARY_DIR}/Scene_moc.cpp" )
add_file_dependencies( Scene_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Scene.h" )
qt5_add_resources ( RESOURCE_FILES AABB_demo.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES AABB_demo.qrc )
add_file_dependencies( AABB_demo.cpp "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp"
"${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp"
"${CMAKE_CURRENT_BINARY_DIR}/Scene_moc.cpp" )
add_executable ( AABB_demo AABB_demo.cpp ${UI_FILES} ${RESOURCE_FILES} )
add_executable ( AABB_demo AABB_demo.cpp ${UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES})
qt5_use_modules(AABB_demo Gui OpenGL Xml Script Svg )
# Link with Qt libraries
target_link_libraries( AABB_demo ${QT_LIBRARIES} )
@ -60,12 +62,12 @@ if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FO
target_link_libraries( AABB_demo ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
# Link with libQGLViewer, OpenGL
target_link_libraries( AABB_demo ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} )
target_link_libraries( AABB_demo ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
add_to_cached_list( CGAL_EXECUTABLE_TARGETS AABB_demo )
else (CGAL_FOUND AND CGAL_CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
else (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
set(AABB_MISSING_DEPS "")
@ -74,7 +76,7 @@ else (CGAL_FOUND AND CGAL_CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLV
endif()
if(NOT CGAL_Qt5_FOUND)
set(AABB_MISSING_DEPS "the CGAL Qt5 library, ${AABB_MISSING_DEPS}")
set(AABB_MISSING_DEPS "CGAL_Qt5, ${AABB_MISSING_DEPS}")
endif()
if(NOT Qt5_FOUND)

View File

@ -988,7 +988,7 @@ Bitstream_descartes_E08_tree<BitstreamDescartesE08TreeTraits>
// next try heuristic alpha with small denom (failures don't count)
log_alpha_den = 4;
alpha_den_4 = 1L << (log_alpha_den - 2);
alpha_num = CGAL::default_random.get_int( // TODO .get_long
alpha_num = CGAL::get_default_random().get_int( // TODO .get_long
alpha_den_4, 3*alpha_den_4 + 1
);
++(this->ptr()->subdiv_tries_);
@ -999,7 +999,7 @@ Bitstream_descartes_E08_tree<BitstreamDescartesE08TreeTraits>
log_alpha_den = 4 + this->ptr()->ceil_log_degree_;
alpha_den_4 = 1L << (log_alpha_den - 2);
do {
alpha_num = CGAL::default_random.get_int( // TODO .get_long
alpha_num = CGAL::get_default_random().get_int( // TODO .get_long
alpha_den_4, 3*alpha_den_4 + 1
);
++(this->ptr()->subdiv_tries_);

View File

@ -1327,7 +1327,7 @@ Bitstream_descartes_rndl_tree<BitstreamDescartesRndlTreeTraits>
// next try heuristic alpha with small denom (failures don't count)
log_alpha_den = 4;
alpha_den_4 = 1L << (log_alpha_den - 2);
alpha_num = CGAL::default_random.get_int( // TODO .get_long
alpha_num = CGAL::get_default_random().get_int( // TODO .get_long
alpha_den_4, 3*alpha_den_4 + 1
);
++(n->subdiv_tries_);
@ -1338,7 +1338,7 @@ Bitstream_descartes_rndl_tree<BitstreamDescartesRndlTreeTraits>
log_alpha_den = 5 + this->ptr()->ceil_log_degree_;
alpha_den_4 = 1L << (log_alpha_den - 2);
do {
alpha_num = CGAL::default_random.get_int( // TODO .get_long
alpha_num = CGAL::get_default_random().get_int( // TODO .get_long
alpha_den_4, 3*alpha_den_4 + 1
);
++(n->subdiv_tries_);

View File

@ -32,15 +32,15 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_
qt5_wrap_ui( uis MainWindow.ui )
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( RESOURCE_FILES ./Alpha_shape_3.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ./Alpha_shape_3.qrc )
add_executable ( Alpha_shape_3 Alpha_shape_3.cpp MainWindow.cpp Viewer.cpp ${uis} ${RESOURCE_FILES} )
add_executable ( Alpha_shape_3 Alpha_shape_3.cpp MainWindow.cpp Viewer.cpp ${uis} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES})
qt5_use_modules(Alpha_shape_3 Xml Script OpenGL Svg)
add_to_cached_list( CGAL_EXECUTABLE_TARGETS Alpha_shape_3 )
target_link_libraries( Alpha_shape_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
target_link_libraries( Alpha_shape_3 ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} )
target_link_libraries( Alpha_shape_3 ${OPENGL_gl_LIBRARY} )
target_link_libraries( Alpha_shape_3 ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
else()

View File

@ -23,7 +23,7 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND CGAL_Core_FOUND)
OverlayDialog.ui
ArrangementDemoPropertiesDialog.ui
)
qt5_wrap_cpp( arrangement_2_mocs
qt5_wrap_cpp( CGAL_Qt5_MOC_FILES
ArrangementDemoWindow.h
ArrangementDemoTab.h
Callback.h
@ -35,7 +35,7 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND CGAL_Core_FOUND)
PropertyValueDelegate.h
#PropertyValueDelegate.cpp
)
qt5_add_resources( arrangement_2_resources
qt5_add_resources( CGAL_Qt5_RESOURCE_FILES
ArrangementDemoWindow.qrc
)
add_executable( arrangement_2
@ -61,9 +61,9 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND CGAL_Core_FOUND)
DeleteCurveModeItemEditor.cpp
PointsGraphicsItem.cpp
VerticalRayGraphicsItem.cpp
${arrangement_2_mocs}
${CGAL_Qt5_MOC_FILES}
${arrangement_2_uis}
${arrangement_2_resources}
${CGAL_Qt5_RESOURCE_FILES}
)
qt5_use_modules(arrangement_2 Widgets Script)
target_link_libraries( arrangement_2

View File

@ -26,13 +26,13 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND CGAL_Core_FOUND )
qt5_wrap_ui( CDT_UI_FILES boolean_operations_2.ui )
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( CDT_RESOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/boolean_operations_2.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/boolean_operations_2.qrc )
# use the Qt MOC preprocessor on classes that derives from QObject
qt5_generate_moc( "boolean_operations_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/boolean_operations_2.moc" )
# The executable itself.
add_executable ( boolean_operations_2 ${CMAKE_CURRENT_SOURCE_DIR}/boolean_operations_2.cpp boolean_operations_2.moc ${CDT_UI_FILES} ${CDT_RESOURCE_FILES} )
add_executable ( boolean_operations_2 ${CMAKE_CURRENT_SOURCE_DIR}/boolean_operations_2.cpp boolean_operations_2.moc ${CGAL_Qt5_MOC_FILES} ${CDT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} )
qt5_use_modules(boolean_operations_2 Widgets Script Svg)
# Link with Qt libraries
target_link_libraries( boolean_operations_2 ${QT_LIBRARIES} )

View File

@ -191,7 +191,7 @@ std::ostream
{
typename General_polygon_2<Traits>::Curve_const_iterator i;
switch(os.iword(IO::mode)) {
switch(get_mode(os)) {
case IO::ASCII :
os << p.size() << ' ';
for (i = p.curves_begin(); i != p.curves_end(); ++i) {

View File

@ -143,7 +143,7 @@ std::ostream
{
typename General_polygon_with_holes_2<Polygon_>::Hole_const_iterator hit;
switch(os.iword(IO::mode)) {
switch(get_mode(os)) {
case IO::ASCII :
os << p.outer_boundary() << ' ' << p.number_of_holes()<< ' ';
for (hit = p.holes_begin(); hit != p.holes_end(); ++hit) {

View File

@ -77,7 +77,7 @@ std::ostream& operator<<(std::ostream &os,
{
typename Polygon_with_holes_2<Kernel_,Container_>::Hole_const_iterator i;
switch(os.iword(IO::mode)) {
switch(get_mode(os)) {
case IO::ASCII :
os << p.outer_boundary() << ' ' << p.number_of_holes()<<' ';
for (i = p.holes_begin(); i != p.holes_end(); ++i) {

View File

@ -130,7 +130,7 @@ template < class InputIterator >
Min_circle_2( InputIterator first,
InputIterator last,
bool randomize,
Random& random = CGAL::default_random,
Random& random = CGAL::get_default_random(),
const Traits& traits = Traits() );
/*!

View File

@ -119,7 +119,7 @@ template < class InputIterator >
Min_Ellipse_2( InputIterator first,
InputIterator last,
bool randomize,
Random& random = default_random,
Random& random = get_default_random(),
const Traits& traits = Traits() );
/*!

View File

@ -1,11 +1,11 @@
// computes the smallest enclosing annulus of two point
// sets on nested squares in R^2, using double
// as input type and some internal EXACT floating point type
#include <iostream>
#include <cassert>
#include <CGAL/Homogeneous.h>
#include <CGAL/Min_annulus_d.h>
#include <CGAL/Min_sphere_annulus_d_traits_2.h>
#include <CGAL/Homogeneous.h>
#include <iostream>
#include <cassert>
#ifdef CGAL_USE_GMP
#include <CGAL/Gmpzf.h>

View File

@ -3,15 +3,15 @@
// as input type and some internal EXACT floating point type;
// the fast type double is also safely used for many of the
// internal computations
#include <iostream>
#include <cassert>
#include <CGAL/Homogeneous.h>
#include <CGAL/Min_annulus_d.h>
#include <CGAL/Min_sphere_annulus_d_traits_2.h>
#include <CGAL/Homogeneous.h>
#include <CGAL/Exact_integer.h>
typedef CGAL::Exact_integer ET;
#include <iostream>
#include <cassert>
// use an inexact kernel...
typedef CGAL::Homogeneous<double> K;
typedef K::Point_2 Point;

View File

@ -21,6 +21,11 @@
#ifndef CGAL_MIN_ANNULUS_D_H
#define CGAL_MIN_ANNULUS_D_H
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable: 4244) // conversion warning in Boost iterator_adaptor
#endif
// includes
// --------
#include <CGAL/Optimisation/basic.h>
@ -869,6 +874,10 @@ operator >> ( std::istream& is, CGAL::Min_annulus_d<Traits_>& min_annulus)
} //namespace CGAL
#ifdef _MSC_VER
# pragma warning(pop)
#endif
#endif // CGAL_MIN_ANNULUS_D_H
// ===== EOF ==================================================================

View File

@ -24,10 +24,10 @@
// implementation: test program for Min_annulus (2D traits class)
// ============================================================================
#include <CGAL/Cartesian.h>
#include <CGAL/Homogeneous.h>
#include <CGAL/Min_annulus_d.h>
#include <CGAL/Min_sphere_annulus_d_traits_2.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Homogeneous.h>
#ifdef CGAL_USE_GMP
#include <CGAL/Gmpzf.h>
#include <CGAL/Gmpq.h>

View File

@ -24,10 +24,10 @@
// implementation: test program for Min_annulus (3D traits class)
// ============================================================================
#include <CGAL/Cartesian.h>
#include <CGAL/Homogeneous.h>
#include <CGAL/Min_annulus_d.h>
#include <CGAL/Min_sphere_annulus_d_traits_3.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Homogeneous.h>
#ifdef CGAL_USE_GMP
#include <CGAL/Gmpzf.h>
#include <CGAL/Gmpq.h>

View File

@ -24,10 +24,10 @@
// implementation: test program for Min_annulus (dD traits class)
// ============================================================================
#include <CGAL/Cartesian_d.h>
#include <CGAL/Homogeneous_d.h>
#include <CGAL/Min_annulus_d.h>
#include <CGAL/Min_sphere_annulus_d_traits_d.h>
#include <CGAL/Cartesian_d.h>
#include <CGAL/Homogeneous_d.h>
#ifdef CGAL_USE_GMP
#include <CGAL/Gmpzf.h>
#include <CGAL/Gmpq.h>

View File

@ -42,9 +42,9 @@ struct Util {
NT lo[DIM], max[DIM];
for( int d = 0; d < DIM; ++d ) {
lo[d] =
(NT)(CGAL::default_random.get_double() * (n - maxEdgeLength));
(NT)(CGAL::get_default_random().get_double() * (n - maxEdgeLength));
max[d] =
(NT)(lo[d] + 1 + (CGAL::default_random.get_double() * maxEdgeLength));
(NT)(lo[d] + 1 + (CGAL::get_default_random().get_double() * maxEdgeLength));
}
boxes.push_back( Box( &lo[0], &max[0]) );
}

View File

@ -62,7 +62,7 @@ namespace CORE {
const double relEps = (1.0 + std::ldexp(1.0, -52));
/// CORE_DIAGFILE is used for all warning and error messages
extern const char* CORE_DIAGFILE;
const char* const CORE_DIAGFILE = "Core_Diagnostics"; // global file name
/// template function returns the maximum value of two
template <class T>

View File

@ -194,9 +194,6 @@ int IntExponent(double d) {
return e-53;
}
/// CORE_DIAGFILE is file name for core_error(..) output.
const char* CORE_DIAGFILE = "Core_Diagnostics"; // global file name
/// core_error is the method to write Core Library warning or error messages
/** Both warnings and errors are written to a file called CORE_DIAGFILE.
* But errors are also written on std:cerr (similar to std::perror()).

View File

@ -40,6 +40,12 @@
#define CORE_INLINE
#endif
#ifdef CGAL_HEADER_ONLY
#define CGAL_INLINE_FUNCTION inline
#else
#define CGAL_INLINE_FUNCTION
#endif
// Macros for memory pool
#ifdef CORE_DISABLE_MEMORY_POOL
#define CORE_NEW(T)
@ -51,9 +57,9 @@
#define CORE_DELETE(T) void operator delete( void *p, size_t );
#define CORE_MEMORY_IMPL(T) \
void *T::operator new( size_t size) \
CGAL_INLINE_FUNCTION void *T::operator new( size_t size) \
{ return MemoryPool<T>::global_allocator().allocate(size); } \
void T::operator delete( void *p, size_t ) \
CGAL_INLINE_FUNCTION void T::operator delete( void *p, size_t ) \
{ MemoryPool<T>::global_allocator().free(p); }
#endif

View File

@ -10,11 +10,13 @@ link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
collect_cgal_library(CGAL_Core "")
# CGAL_Core does not depend on CGAL in either DEBUG or RELEASE, but we
# still link it.
target_link_libraries( CGAL_Core CGAL ${CGAL_3RD_PARTY_LIBRARIES} )
if(NOT CGAL_HEADER_ONLY)
# CGAL_Core does not depend on CGAL in either DEBUG or RELEASE, but we
# still link it.
target_link_libraries( CGAL_Core CGAL ${CGAL_3RD_PARTY_LIBRARIES} )
add_dependencies( CGAL_Core CGAL )
add_dependencies( CGAL_Core CGAL )
endif()
message("libCGAL_Core is configured")

View File

@ -14,6 +14,10 @@ include( CGAL_CreateSingleSourceCGALProgram )
if(CGAL_ImageIO_FOUND)
create_single_source_cgal_program( "convert_raw_image_to_inr.cpp" )
create_single_source_cgal_program( "test_imageio.cpp" )
if(CGAL_ImageIO_USE_ZLIB)
target_link_libraries(convert_raw_image_to_inr ${ZLIB_LIBRARY})
target_link_libraries(test_imageio ${ZLIB_LIBRARY})
endif()
else()
message(STATUS "NOTICE: This demo needs the CGAL ImageIO library, and will not be compiled.")
endif()

View File

@ -62,14 +62,6 @@
#include "mincio.h"
#endif
/** the first file format is initialized to null */
static PTRIMAGE_FORMAT firstFormat=NULL;
/** the Inrimage file format (default format) is initialized to null */
static PTRIMAGE_FORMAT InrimageFormat=NULL;
struct Remove_supported_file_format {
~Remove_supported_file_format()
{
@ -77,9 +69,52 @@ struct Remove_supported_file_format {
}
};
#ifdef CGAL_HEADER_ONLY
inline PTRIMAGE_FORMAT & get_static_firstFormat()
{
static PTRIMAGE_FORMAT firstFormat = NULL;
return firstFormat;
}
inline PTRIMAGE_FORMAT & get_static_inrimageFormat()
{
static PTRIMAGE_FORMAT inrimageFormat = NULL;
return inrimageFormat;
}
inline Remove_supported_file_format & get_static_rsff()
{
static Remove_supported_file_format rsff;
return rsff;
}
// Dummy call to get_static_rsff(), otherwise it would not get instanced
static Remove_supported_file_format &rsff_dummy_ref = get_static_rsff();
#else // not header-only
/** the first file format is initialized to null */
static PTRIMAGE_FORMAT firstFormat = NULL;
inline PTRIMAGE_FORMAT & get_static_firstFormat()
{
return firstFormat;
}
/** the Inrimage file format (default format) is initialized to null */
static PTRIMAGE_FORMAT InrimageFormat = NULL;
inline PTRIMAGE_FORMAT & get_static_inrimageFormat()
{
return InrimageFormat;
}
static Remove_supported_file_format rsff;
inline Remove_supported_file_format & get_static_rsff()
{
return rsff;
}
#endif
/*--------------------------------------------------
*
@ -141,6 +176,7 @@ size_t ImageIO_write(const _image *im, const void *buf, size_t len) {
//return 0;
}
CGAL_INLINE_FUNCTION
size_t ImageIO_limit_read(size_t to_be_read)
{
return (std::min)(to_be_read, size_t(1u<<30));
@ -511,7 +547,7 @@ _image *_initImage() {
im->imageFormat = NULL;
/** eventually initializes the supported file formats */
if (firstFormat==NULL)
if (get_static_firstFormat()==NULL)
initSupportedFileFormat();
/* return image descriptor */
return im;
@ -569,7 +605,7 @@ _image *_createImage(int x, int y, int z, int v,
im->imageFormat = NULL;
/** eventually initializes the supported file formats */
if (firstFormat==NULL)
if (get_static_firstFormat()==NULL)
initSupportedFileFormat();
/* return image descriptor */
return im;
@ -812,7 +848,7 @@ int _writeImage(_image *im, const char *name_to_be_written ) {
/* what is the wanted format
*/
if ( name == NULL ) {
im->imageFormat = InrimageFormat;
im->imageFormat = get_static_inrimageFormat();
} else {
int i,extLength;
PTRIMAGE_FORMAT f;
@ -824,7 +860,7 @@ int _writeImage(_image *im, const char *name_to_be_written ) {
im->imageFormat=NULL;
length=strlen(name);
for(f=firstFormat;(f!=NULL)&& (im->imageFormat==NULL);f=f->next) {
for(f=get_static_firstFormat();(f!=NULL)&& (im->imageFormat==NULL);f=f->next) {
/* scan all extensions for that format */
ptr=&f->fileExtension[0];
@ -857,7 +893,7 @@ int _writeImage(_image *im, const char *name_to_be_written ) {
if (!im->imageFormat) {
fprintf(stderr, "_writeImage: warning : unknown extension in %s = assuming Inrimage\n",name);
im->imageFormat=InrimageFormat;
im->imageFormat=get_static_inrimageFormat();
baseName=strdup(name);
}
}
@ -879,7 +915,7 @@ int _writeImage(_image *im, const char *name_to_be_written ) {
if (im->imageFormat) {
if (im->imageFormat->writeImage==NULL) {
im->imageFormat=InrimageFormat;
im->imageFormat=get_static_inrimageFormat();
}
if ( 0 ) {
@ -984,7 +1020,7 @@ _image *_readImageHeaderAndGetError( const char *name_to_be_read, int *error )
assume that stdin is inrimage
*/
if(im->openMode == OM_STD) {
im->imageFormat=InrimageFormat;
im->imageFormat=get_static_inrimageFormat();
}
else {
/* get magic string for disk files
@ -993,7 +1029,7 @@ _image *_readImageHeaderAndGetError( const char *name_to_be_read, int *error )
magic[4] = '\0';
ImageIO_seek(im, 0L, SEEK_SET);
/** test each format */
for(f=firstFormat;(f!=NULL)&& (im->imageFormat==NULL);f=f->next) {
for(f=get_static_firstFormat();(f!=NULL)&& (im->imageFormat==NULL);f=f->next) {
/* test if it is the correct format based on magic and file extension */
if (((*f->testImageFormat)(magic, name)) >=0) {
im->imageFormat=f;
@ -1377,10 +1413,10 @@ PTRIMAGE_FORMAT imageType(const char *fileName) {
if(fileName) fclose( f );
#endif
if (firstFormat==NULL)
if (get_static_firstFormat()==NULL)
initSupportedFileFormat();
for(format=firstFormat;(format!=NULL);format=format->next) {
for(format=get_static_firstFormat();(format!=NULL);format=format->next) {
/* test if it is the correct header based on magic and file extension */
if (((*format->testImageFormat)(magic,fileName)) >=0) {
return format;
@ -1414,8 +1450,8 @@ int addImageFormat( PTRIMAGE_FORMAT format)
(strlen(format->fileExtension)>0) &&
(strlen(format->realName)>0) ) {
format->next=firstFormat;
firstFormat=format;
format->next=get_static_firstFormat();
get_static_firstFormat()=format;
return 0;
@ -1440,11 +1476,11 @@ int addImageFormatAtEnd( PTRIMAGE_FORMAT format)
format->next = NULL;
if (firstFormat == NULL) {
firstFormat=format;
if (get_static_firstFormat() == NULL) {
get_static_firstFormat()=format;
}
else {
for(f=firstFormat;(f->next!=NULL);f=f->next)
for(f=get_static_firstFormat();(f->next!=NULL);f=f->next)
;
f->next=format;
}
@ -1465,7 +1501,7 @@ CGAL_INLINE_FUNCTION
void initSupportedFileFormat()
{
PTRIMAGE_FORMAT f;
if ( InrimageFormat == NULL ) {
if ( get_static_inrimageFormat() == NULL ) {
f = createAnalyzeFormat();
addImageFormatAtEnd( f );
f = createBMPFormat();
@ -1482,8 +1518,8 @@ void initSupportedFileFormat()
addImageFormatAtEnd( f );
f = createPpmFormat();
addImageFormatAtEnd( f );
InrimageFormat = createInrimageFormat();
addImageFormat( InrimageFormat );
get_static_inrimageFormat() = createInrimageFormat();
addImageFormat( get_static_inrimageFormat() );
}
}
@ -1491,7 +1527,7 @@ void initSupportedFileFormat()
CGAL_INLINE_FUNCTION
PTRIMAGE_FORMAT firstImageFormat() {
return firstFormat;
return get_static_firstFormat();
}
@ -1504,7 +1540,7 @@ void printSupportedFileFormat() {
initSupportedFileFormat();
for(i=0, f=firstFormat;(f!=NULL);i++, f=f->next) {
for(i=0, f=get_static_firstFormat();(f!=NULL);i++, f=f->next) {
if ( (f->testImageFormat) &&
(f->readImageHeader) &&
(strlen(f->fileExtension)>0) &&
@ -1524,14 +1560,14 @@ void printSupportedFileFormat() {
/** remove supported image formats */
CGAL_INLINE_FUNCTION
void removeSupportedFileFormat() {
PTRIMAGE_FORMAT f=firstFormat;
PTRIMAGE_FORMAT f=get_static_firstFormat();
while( f != NULL) {
PTRIMAGE_FORMAT f_old = f;
f = f->next;
ImageIO_free( f_old);
}
InrimageFormat=NULL;
get_static_inrimageFormat()=NULL;
}

View File

@ -19,25 +19,33 @@ endif()
use_essential_libs()
include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} .)
link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
if (CGAL_HEADER_ONLY)
cache_set(CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR})
endif()
collect_cgal_library( CGAL_ImageIO "")
add_dependencies( CGAL_ImageIO CGAL )
if (NOT CGAL_HEADER_ONLY)
add_definitions( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_ImageIO_3RD_PARTY_DEFINITIONS} )
include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} .)
link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
add_dependencies( CGAL_ImageIO CGAL )
add_definitions( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_ImageIO_3RD_PARTY_DEFINITIONS} )
# CGAL_ImageIO only depends on CGAL in DEBUG, but we still link it
# in both build types.
target_link_libraries( CGAL_ImageIO CGAL ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_ImageIO_3RD_PARTY_LIBRARIES} )
# CGAL_ImageIO only depends on CGAL in DEBUG, but we still link it
# in both build types.
target_link_libraries( CGAL_ImageIO CGAL ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_ImageIO_3RD_PARTY_LIBRARIES} )
else()
target_link_libraries( CGAL_ImageIO INTERFACE ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_ImageIO_3RD_PARTY_LIBRARIES} )
target_include_directories( CGAL_ImageIO INTERFACE ${CGAL_3RD_PARTY_LIBRARIES_DIRS})
install(DIRECTORY "./" DESTINATION "${CGAL_INSTALL_INC_DIR}/CGAL/" FILES_MATCHING PATTERN "*.h")
endif()
message("libCGAL_ImageIO is configured")
if(NOT ZLIB_FOUND)
message( STATUS "NOTICE: libCGAL_ImageIO needs ZLib to read compressed files. That feature will not be activated.")
endif(NOT ZLIB_FOUND)
endif()

View File

@ -32,7 +32,7 @@
CGAL_INLINE_FUNCTION
char *fgetns(char *str, int n, _image *im ) {
char *ret;
int l;
std::size_t l;
memset( str, 0, n );
ret = ImageIO_gets( im, str, n );

View File

@ -121,10 +121,10 @@ PTRIMAGE_FORMAT createGisFormat();
int writeGis( char *basename, _image* im ) ;
/*
return:
-1: error
1: success
false: error
true: success
*/
int writeGisHeader( const _image* im ) ;
bool writeGisHeader( const _image* im ) ;
/*

View File

@ -48,8 +48,8 @@ PTRIMAGE_FORMAT createGisFormat() {
CGAL_INLINE_FUNCTION
int writeGis( char *name, _image* im) {
char *outputName;
int length, extLength=0, res;
std::size_t res;
std::size_t length, extLength = 0;
length=strlen(name);
outputName= (char *)ImageIO_alloc(length+8);
@ -80,15 +80,14 @@ int writeGis( char *name, _image* im) {
return ImageIO_OPENING;
}
res = writeGisHeader(im);
if (res < 0 ) {
if ( !writeGisHeader(im) ) {
fprintf(stderr, "writeGis: error: unable to write header of \'%s\'\n",
outputName);
if ( outputName != NULL ) ImageIO_free( outputName );
ImageIO_close( im );
im->fd = NULL;
im->openMode = OM_CLOSE;
return( res );
return -1;
}
ImageIO_close(im);
@ -110,7 +109,7 @@ int writeGis( char *name, _image* im) {
}
if ( im->dataMode == DM_ASCII ) {
int i, j, n, size;
std::size_t i, j, n, size;
char *str = (char*)ImageIO_alloc( _LGTH_STRING_+1 );
size = im->xdim * im->ydim * im->zdim * im->vdim;
n = ( im->xdim < 16 ) ? im->xdim : 16;
@ -143,8 +142,8 @@ int writeGis( char *name, _image* im) {
if ( j<n && i<size ) sprintf( str+strlen(str), " " );
}
sprintf( str+strlen(str), "\n" );
res = ImageIO_write( im, str, strlen( str ) );
if ( res <= 0 ) {
res = ImageIO_write( im, str, strlen( str ));
if ( res < strlen(str) ) {
fprintf(stderr, "writeGis: error when writing data in \'%s\'\n", outputName);
if ( outputName != NULL ) ImageIO_free( outputName );
return( -3 );
@ -162,8 +161,8 @@ int writeGis( char *name, _image* im) {
if ( j<n && i<size ) sprintf( str+strlen(str), " " );
}
sprintf( str+strlen(str), "\n" );
res = ImageIO_write( im, str, strlen( str ) );
if ( res <= 0 ) {
res = ImageIO_write( im, str, strlen( str ));
if ( res < strlen(str) ) {
fprintf(stderr, "writeGis: error when writing data in \'%s\'\n", outputName);
if ( outputName != NULL ) ImageIO_free( outputName );
return( -3 );
@ -189,8 +188,8 @@ int writeGis( char *name, _image* im) {
if ( j<n && i<size ) sprintf( str+strlen(str), " " );
}
sprintf( str+strlen(str), "\n" );
res = ImageIO_write( im, str, strlen( str ) );
if ( res <= 0 ) {
res = ImageIO_write( im, str, strlen( str ));
if ( res < strlen(str) ) {
fprintf(stderr, "writeGis: error when writing data in \'%s\'\n", outputName);
if ( outputName != NULL ) ImageIO_free( outputName );
return( -3 );
@ -208,8 +207,8 @@ int writeGis( char *name, _image* im) {
if ( j<n && i<size ) sprintf( str+strlen(str), " " );
}
sprintf( str+strlen(str), "\n" );
res = ImageIO_write( im, str, strlen( str ) );
if ( res <= 0 ) {
res = ImageIO_write( im, str, strlen( str ));
if ( res < strlen(str) ) {
fprintf(stderr, "writeGis: error when writing data in \'%s\'\n", outputName);
if ( outputName != NULL ) ImageIO_free( outputName );
return( -3 );
@ -223,13 +222,14 @@ int writeGis( char *name, _image* im) {
} /* end of switch( im->wordKind ) */
ImageIO_free( str );
if (outputName != NULL) ImageIO_free(outputName);
return static_cast<int>(res);
}
else {
res = _writeInrimageData(im);
bool ret = _writeInrimageData(im);
if (outputName != NULL) ImageIO_free(outputName);
return (ret ? 1 : -1);
}
if ( outputName != NULL ) ImageIO_free( outputName );
return res;
}
CGAL_INLINE_FUNCTION
@ -261,8 +261,7 @@ int readGisHeader( const char* name,_image* im)
iss.str(str);
iss >> im->xdim >> im->ydim >> im->zdim >> im->vdim;
status = iss.str().length();
switch ( status ) {
switch (iss.str().length()) {
case 2 : im->zdim = 1;
case 3 : im->vdim = 1;
case 4 : break;
@ -468,7 +467,7 @@ int readGisHeader( const char* name,_image* im)
/* header is read. close header file and open data file. */
if( name != NULL ) {
int length = strlen(name) ;
std::size_t length = strlen(name) ;
char* data_filename = (char *) ImageIO_alloc(length+4) ;
if( strcmp( name+length-4, ".dim" ) ) {
@ -510,7 +509,7 @@ int readGisHeader( const char* name,_image* im)
only U8 and S8
*/
if ( im->dataMode == DM_ASCII ) {
int size = im->xdim * im->ydim * im->zdim * im->vdim * im->wdim;
std::size_t size = im->xdim * im->ydim * im->zdim * im->vdim * im->wdim;
unsigned int n;
char *tmp;
int ret, iv=0;
@ -636,14 +635,14 @@ int readGisHeader( const char* name,_image* im)
CGAL_INLINE_FUNCTION
int writeGisHeader( const _image* inr )
bool writeGisHeader( const _image* inr )
{
const char *proc = "writeGisHeader";
std::ostringstream oss;
if ( inr->vectMode == VM_NON_INTERLACED ) {
fprintf( stderr, "%s: can not write non interlaced data\n", proc );
return -1;
return false;
}
/* dimensions
@ -671,7 +670,7 @@ int writeGisHeader( const _image* inr )
break;
default :
fprintf( stderr, "%s: unknown wordSign\n", proc );
return -1;
return false;
}
break;
case WK_FLOAT :
@ -683,12 +682,12 @@ int writeGisHeader( const _image* inr )
}
else {
fprintf( stderr, "%s: unknown WK_FLOAT word dim\n", proc );
return -1;
return false;
}
break;
default :
fprintf( stderr, "%s: unknown wordKind for image\n", proc );
return -1;
return false;
}
oss << "\n";
@ -717,9 +716,9 @@ int writeGisHeader( const _image* inr )
oss << "-om ascii\n";
}
if( ImageIO_write( inr, oss.str().data(), oss.str().length()) == 0) {
return -1;
return false;
}
return 1;
return true;
}

View File

@ -36,7 +36,7 @@ int _writeInrimageHeader(const _image *im,
/** Writes the given image body in an already opened file.
@param im image descriptor */
int _writeInrimageData(const _image *im);
bool _writeInrimageData(const _image *im);
/** read header from an opened inrimage file
@param im opened inrmage descriptor */

View File

@ -75,7 +75,7 @@ static void concatStringElement(const stringListHead *strhead,
/* Writes the given inrimage header in an already opened file.*/
CGAL_INLINE_FUNCTION
int _writeInrimageHeader(const _image *im, ENDIANNESS end) {
unsigned int pos, i;
std::size_t pos, i;
char type[30], endianness[5], buf[257], scale[20];
std::ostringstream oss;
@ -194,9 +194,8 @@ int _writeInrimageHeader(const _image *im, ENDIANNESS end) {
/* Writes the given image body in an already opened file.*/
CGAL_INLINE_FUNCTION
int _writeInrimageData(const _image *im) {
unsigned long size, nbv, nwrt, i;
unsigned int v;
bool _writeInrimageData(const _image *im) {
std::size_t size, nbv, nwrt, i, v;
unsigned char **vp;
if(im->openMode != OM_CLOSE) {
@ -205,8 +204,7 @@ int _writeInrimageData(const _image *im) {
if(im->vectMode != VM_NON_INTERLACED) {
size = im->xdim * im->ydim * im->zdim * im->vdim * im->wdim;
nwrt = ImageIO_write(im, im->data, size);
if(nwrt != size) return -1;
else return 1;
return nwrt == size;
}
/* non interlaced vectors: interlace for saving */
@ -219,14 +217,14 @@ int _writeInrimageData(const _image *im) {
for(i = 0; i < nbv; i++)
for(v = 0; v < im->vdim; v++) {
if(ImageIO_write(im, (const void *) vp[v], im->wdim) != im->wdim)
return -1;
return false;
vp[v] += im->wdim;
}
ImageIO_free(vp);
return 1;
return true;
}
}
else return -1;
else return false;
}
@ -487,14 +485,13 @@ int writeInrimage(char *name,_image *im) {
return( res );
}
res = _writeInrimageData( im );
if (res < 0) {
if (!_writeInrimageData(im)) {
fprintf(stderr, "writeInrimage: error: unable to write data of \'%s\'\n",
name);
ImageIO_close( im );
im->fd = NULL;
im->openMode = OM_CLOSE;
return( res );
return -1;
}
ImageIO_close( im );

View File

@ -31,7 +31,7 @@ int readIrisImage( const char *name, _image *im );
int testIrisHeader(char *magic,const char *name);
#ifdef CGAL_HEADER_ONLY
#include <CGAL/iris_impl.h>
#include "iris_impl.h"
#endif // CGAL_HEADER_ONLY
#endif

View File

@ -229,7 +229,7 @@ CGAL_INLINE_FUNCTION
int readIrisImage( const char *, _image *im ) {
byte *rawdata, *rptr;
byte *pic824, *bptr, *iptr;
int i, j, size;
std::size_t i, j, size;
unsigned short imagic, type;
int xsize, ysize, zsize;

View File

@ -565,7 +565,7 @@ int writePgmImage(char *name,_image *im )
ImageIO_write( im, string, strlen( string ) );
if ( im->dataMode == DM_ASCII ) {
int i, j, n, size;
std::size_t i, j, n, size;
char *str = (char*)ImageIO_alloc( _LGTH_STRING_+1 );
size = im->xdim * im->ydim * im->zdim * im->vdim;
n = ( im->xdim < 16 ) ? im->xdim : 16;

View File

@ -19,6 +19,9 @@ if ( CGAL_FOUND )
if (WITH_CGAL_ImageIO)
create_single_source_cgal_program( "test_trilinear_interpolation.cpp" )
if(CGAL_ImageIO_USE_ZLIB)
target_link_libraries(test_trilinear_interpolation ${ZLIB_LIBRARY})
endif()
else()
message(STATUS "NOTICE: Some tests require the CGAL_ImageIO library, and will not be compiled.")
endif()

View File

@ -19,7 +19,7 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_
include_directories (${QGLVIEWER_INCLUDE_DIR})
include_directories (BEFORE ../../include ./ )
add_executable ( Circular_kernel_3 Circular_kernel_3.cpp Viewer.cpp )
add_executable (Circular_kernel_3 Circular_kernel_3.cpp Viewer.cpp ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES})
qt5_use_modules( Circular_kernel_3 Xml Script OpenGL)
@ -27,7 +27,7 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_
target_link_libraries( Circular_kernel_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
target_link_libraries( Circular_kernel_3 ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} )
target_link_libraries( Circular_kernel_3 ${OPENGL_gl_LIBRARY} )
target_link_libraries( Circular_kernel_3 ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
else()

View File

@ -324,6 +324,21 @@ variable `BUILD_SHARED_LIBS` to `FALSE`. If you use
These setting affect the variants of third-party libraries (see next
section) selected whenever the choice is available.
\subsection subsection_headeronly Header-only option
Since \cgal 4.X, \cgal can be used in headers only mode, i.e. without compiling the \cgal libraries and linking with these libraries when compiling examples, tests and demo. This possibility can be enabled by setting the value of the CMake variable `CGAL_HEADERS_ONLY` to `ON`.
One advantage of using \cgal in header-only mode is that you do not need to compile and install \cgal libraries before compiling a given example or demo. Note that even in header-only mode we still need to run cmake on \cgal in order to generate different configuration files. So, setting up \cgal becomes now:
<PRE>
cd CGAL-\cgalReleaseNumber # go to \cgal directory
cmake . # configure \cgal
</PRE>
and we do not need to run make anymore.
There is one possible problem when using \cgal in header-only mode on a Windows operating system when compiling a program using several modules (executable programs or dynamic-link libraries DLL). If two different modules use the same static variable, this variable is defined independently in each of these modules. If one module modifies the value of this variable, it will not be modified in the other module, which could induce an unexpected behavior. In \cgal, this concerns only a few specific variables: the <A HREF="http://doc.cgal.org/latest/Generator/classCGAL_1_1Random.html">default random</A>, the <A HREF="http://doc.cgal.org/latest/STL_Extension/group__PkgStlExtensionAssertions.html">failure behavior</A>, <A HREF="http://doc.cgal.org/latest/Stream_support/group__PkgIOstreams.html">IO mode</A>. One example is the following: if you change the default random in one DLL, then if you use the default random in another DLL, you will not obtain the modified default random but the original one.
\section secessential3rdpartysoftware Essential Third Party Libraries
The focus of \cgal is on geometry, and we rely on other

View File

@ -104,7 +104,7 @@ public:
while (begin != end)
{
if (CGAL::default_random.get_bool())
if (CGAL::get_default_random().get_bool())
*set1++ = *begin++;
else
*set2++ = *begin++;

View File

@ -43,7 +43,7 @@ int my_rand()
{
int res;
do {
res = int(CGAL::default_random.get_double()*(1<<31));
res = int(CGAL::get_default_random().get_double()*(1<<31));
} while(res == 0);
return res;

View File

@ -289,7 +289,7 @@ void compute_epsilons()
int main(int argc, char **argv)
{
int loops = (argc < 2) ? 2000 : std::atoi(argv[1]);
int seed = (argc < 3) ? CGAL::default_random.get_int(0, 1<<30)
int seed = (argc < 3) ? CGAL::get_default_random().get_int(0, 1<<30)
: std::atoi(argv[2]);
std::cout << "Initializing random generator with seed = " << seed

View File

@ -18,12 +18,15 @@ It can be very useful, e.g. for debugging, to reproduce a sequence of
random numbers. This can be done by either initialising with a fixed
seed, or by using the state functions as described below.
\note A `Random` object is not deterministic when used by several threads at
the same time, even if a fixed seed has been chosen.
\cgalHeading{Implementation}
We use the boost random library function `boost::rand48` to generate the random
numbers.
\sa `CGAL::default_random`
\sa `CGAL::get_default_random`
*/
@ -178,8 +181,16 @@ bool operator == ( Random const& random2) const;
/*!
\ingroup PkgGenerators
The variable `default_random` is the default random numbers generator used for
the generator functions and classes.
The global function `get_default_random()` returns the default random
numbers generator used for the generator functions and classes.
*/
Random &get_default_random();
/*!
\ingroup PkgGenerators
\deprecated The variable `default_random` is the default random
numbers generator used for the generator functions and
classes. Deprecated. Use `get_default_random()` instead.
*/
extern CGAL::Random default_random;

View File

@ -36,7 +36,7 @@ are needed from `rnd` for each point.
*/
template <class ForwardIterator, class Creator>
void perturb_points_2( ForwardIterator first, ForwardIterator last,
double xeps, double yeps = xeps, Random& rnd = default_random,
double xeps, double yeps = xeps, Random& rnd = get_default_random(),
Creator creator = Creator_uniform_2<Kernel_traits<P>::Kernel::RT,P>);
@ -132,7 +132,7 @@ Returns the value of `first2` after inserting the \f$ n\f$ points.
template <class RandomAccessIterator, class OutputIterator, class Creator>
OutputIterator random_collinear_points_2( RandomAccessIterator first,
RandomAccessIterator last,
std::size_t n, OutputIterator first2, Random& rnd = default_random,
std::size_t n, OutputIterator first2, Random& rnd = get_default_random(),
Creator creator = Creator_uniform_2<Kernel_traits<P>::Kernel::RT,P>);
/// @}
@ -199,7 +199,7 @@ i.e.\ \f$ |*g| < r\f$. Two random numbers are needed from
*/
Random_points_in_disc_2( double r, Random& rnd =
default_random);
get_default_random());
/// @}
@ -268,7 +268,7 @@ Two random numbers are needed from `rnd` for each point.
*/
Random_points_in_square_2( double a, Random& rnd =
default_random);
get_default_random());
/// @}
@ -337,7 +337,7 @@ Two random numbers are needed from `rnd` for each point.
*/
Random_points_in_triangle_2(Point_2& p, Point_2& q, Point_2& r, Random& rnd =
default_random);
get_default_random());
/*!
Creates an input iterator `g` generating points of type `Point_2` uniformly
@ -347,7 +347,7 @@ Two random numbers are needed from `rnd` for each point.
*/
Random_points_in_triangle_2(Triangle_2& t, Random& rnd =
default_random);
get_default_random());
/// @}
@ -418,7 +418,7 @@ i.e.\ \f$ |*g| == r\f$. A single random number is needed from
*/
Random_points_on_circle_2( double r, Random& rnd =
default_random);
get_default_random());
/// @}
@ -488,7 +488,7 @@ A single random number is needed from `rnd` for each point.
The expressions `to_double(p.x())` and `to_double(p.y())` must result in the respective `double` representation of the coordinates of \f$ p\f$, and similarly for \f$ q\f$.
*/
Random_points_on_segment_2( const Point_2& p, const Point_2& q,
Random& rnd = default_random);
Random& rnd = get_default_random());
/// @}
@ -560,7 +560,7 @@ A single random number is needed from `rnd` for each point.
*/
Random_points_on_square_2( double a, Random& rnd =
default_random);
get_default_random());
/// @}

View File

@ -95,7 +95,7 @@ Three random numbers are needed from `rnd` for each point.
*/
Random_points_in_cube_3( double a, Random& rnd =
default_random);
get_default_random());
/// @}
@ -164,7 +164,7 @@ i.e.\ \f$ |*g| < r\f$ . Three random numbers are needed from
*/
Random_points_in_sphere_3( double r, Random& rnd =
default_random);
get_default_random());
/// @}
@ -233,7 +233,7 @@ Two random numbers are needed from `rnd` for each point.
*/
Random_points_in_triangle_3(Point_3& p, Point_3& q, Point_3& r, Random& rnd =
default_random);
get_default_random());
/*!
Creates an input iterator `g` generating points of type `Point_3` uniformly
@ -243,7 +243,7 @@ Two random numbers are needed from `rnd` for each point.
*/
Random_points_in_triangle_3(Triangle_3& t, Random& rnd =
default_random);
get_default_random());
/// @}
@ -313,7 +313,7 @@ Three random numbers are needed from `rnd` for each point.
*/
Random_points_in_tetrahedron_3(Point_3& p, Point_3& q, Point_3& r, Point_3& s, Random& rnd =
default_random);
get_default_random());
/*!
Creates an input iterator `g` generating points of type `Point_3` uniformly
@ -323,7 +323,7 @@ Three random numbers are needed from `rnd` for each point.
*/
Random_points_in_tetrahedron_3(Tetrahedron_3& t, Random& rnd =
default_random);
get_default_random());
/// @}
@ -394,7 +394,7 @@ i.e.\ \f$ |*g| == r\f$ . Two random numbers are needed from
*/
Random_points_on_sphere_3( double r, Random& rnd =
default_random);
get_default_random());
/// @}

View File

@ -166,7 +166,7 @@ For every point \f$ p = *g\f$ and for all \f$ i<dim\f$ we have \f$ -a \le p[i] <
*/
Random_points_in_cube_d(int dim, double a, Random& rnd =
default_random);
get_default_random());
/// @}
@ -240,7 +240,7 @@ i.e.\ \f$ |*g| == r\f$ . \f$ 2\cdot dim\f$ random numbers are needed from
*/
Random_points_on_sphere_d(int dim, double r, Random& rnd =
default_random);
get_default_random());
/// @}

View File

@ -22,6 +22,6 @@ template <class RandomAccessIterator, class Size,
class OutputIterator, class Random>
OutputIterator random_selection( RandomAccessIterator first,
RandomAccessIterator last,
Size n, OutputIterator result, Random& rnd = default_random);
Size n, OutputIterator result, Random& rnd = get_default_random());
} /* namespace CGAL */

View File

@ -50,10 +50,7 @@ achieve random permutations for otherwise regular generators (
- `CGAL::random_polygon_2()`
- `CGAL::random_selection()`
- `CGAL::random_convex_hull_in_disc_2()`
## Variables ##
- `CGAL::default_random`
- `CGAL::get_default_random()`
## Classes ##

View File

@ -504,15 +504,15 @@ public:
typedef Random_points_in_triangle_2<P> This;
typedef typename Kernel_traits<P>::Kernel::Triangle_2 Triangle_2;
Random_points_in_triangle_2() {}
Random_points_in_triangle_2( const This& x,Random& rnd = default_random)
Random_points_in_triangle_2( const This& x,Random& rnd = get_default_random())
: Random_generator_base<P>( 1, rnd ),_p(x._p),_q(x._q),_r(x._r) {
generate_point();
}
Random_points_in_triangle_2( const P& p, const P& q, const P& r, Random& rnd = default_random)
Random_points_in_triangle_2( const P& p, const P& q, const P& r, Random& rnd = get_default_random())
: Random_generator_base<P>( 1, rnd ),_p(p),_q(q),_r(r) {
generate_point();
}
Random_points_in_triangle_2( const Triangle_2& triangle,Random& rnd = default_random)
Random_points_in_triangle_2( const Triangle_2& triangle,Random& rnd = get_default_random())
: Random_generator_base<P>( 1,
rnd),_p(triangle[0]),_q(triangle[1]),_r(triangle[2]) {
generate_point();

View File

@ -205,15 +205,15 @@ public:
typedef Random_points_in_triangle_3<P> This;
typedef typename Kernel_traits<P>::Kernel::Triangle_3 Triangle_3;
Random_points_in_triangle_3() {}
Random_points_in_triangle_3( const This& x,Random& rnd = default_random)
Random_points_in_triangle_3( const This& x,Random& rnd = get_default_random())
: Random_generator_base<P>( 1, rnd ),_p(x._p),_q(x._q),_r(x._r) {
generate_point();
}
Random_points_in_triangle_3( const P& p, const P& q, const P& r, Random& rnd = default_random)
Random_points_in_triangle_3( const P& p, const P& q, const P& r, Random& rnd = get_default_random())
: Random_generator_base<P>( 1, rnd ),_p(p),_q(q),_r(r) {
generate_point();
}
Random_points_in_triangle_3( const Triangle_3& triangle,Random& rnd = default_random)
Random_points_in_triangle_3( const Triangle_3& triangle,Random& rnd = get_default_random())
: Random_generator_base<P>( 1,
rnd),_p(triangle[0]),_q(triangle[1]),_r(triangle[2]) {
generate_point();
@ -257,15 +257,15 @@ public:
typedef Random_points_in_tetrahedron_3<P> This;
typedef typename Kernel_traits<P>::Kernel::Tetrahedron_3 Tetrahedron_3;
Random_points_in_tetrahedron_3() {}
Random_points_in_tetrahedron_3( const This& x,Random& rnd = default_random)
Random_points_in_tetrahedron_3( const This& x,Random& rnd = get_default_random())
: Random_generator_base<P>( 1, rnd ),_p(x._p),_q(x._q),_r(x._r),_s(x._s) {
generate_point();
}
Random_points_in_tetrahedron_3( const P& p, const P& q, const P& r, const P& s,Random& rnd = default_random)
Random_points_in_tetrahedron_3( const P& p, const P& q, const P& r, const P& s,Random& rnd = get_default_random())
: Random_generator_base<P>( 1, rnd ),_p(p),_q(q),_r(r),_s(s) {
generate_point();
}
Random_points_in_tetrahedron_3( const Tetrahedron_3& tetrahedron,Random& rnd = default_random)
Random_points_in_tetrahedron_3( const Tetrahedron_3& tetrahedron,Random& rnd = get_default_random())
: Random_generator_base<P>( 1, rnd),_p(tetrahedron[0]),_q(tetrahedron[1]),_r(tetrahedron[2]),_s(tetrahedron[3]) {
generate_point();
}

View File

@ -26,13 +26,13 @@ add_definitions(-DQT_NO_KEYWORDS)
qt5_wrap_ui( DT_UI_FILES Alpha_shapes_2.ui )
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( DT_RESOURCE_FILES ./Alpha_shapes_2.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ./Alpha_shapes_2.qrc )
# use the Qt MOC preprocessor on classes that derives from QObject
qt5_generate_moc( Alpha_shapes_2.cpp Alpha_shapes_2.moc )
# The executable itself.
add_executable ( Alpha_shapes_2 Alpha_shapes_2.cpp Alpha_shapes_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
add_executable ( Alpha_shapes_2 Alpha_shapes_2.cpp Alpha_shapes_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES})
qt5_use_modules(Alpha_shapes_2 Xml Script OpenGL Svg)

View File

@ -24,13 +24,13 @@ add_definitions(-DQT_NO_KEYWORDS)
qt5_wrap_ui( DT_UI_FILES Apollonius_graph_2.ui )
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( DT_RESOURCE_FILES ./Apollonius_graph_2.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ./Apollonius_graph_2.qrc )
# use the Qt MOC preprocessor on classes that derives from QObject
qt5_generate_moc( Apollonius_graph_2.cpp Apollonius_graph_2.moc )
# The executable itself.
add_executable ( Apollonius_graph_2 Apollonius_graph_2.cpp Apollonius_graph_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
add_executable ( Apollonius_graph_2 Apollonius_graph_2.cpp Apollonius_graph_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES})
qt5_use_modules(Apollonius_graph_2 Xml Script OpenGL Svg)

View File

@ -29,13 +29,13 @@ add_definitions(-DQT_NO_KEYWORDS)
qt5_wrap_ui( DT_UI_FILES Bounding_volumes.ui )
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( DT_RESOURCE_FILES ./Bounding_volumes.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ./Bounding_volumes.qrc )
# use the Qt MOC preprocessor on classes that derives from QObject
qt5_generate_moc( "Bounding_volumes.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Bounding_volumes.moc" )
# The executable itself.
add_executable ( Bounding_volumes Bounding_volumes.cpp Bounding_volumes.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
add_executable ( Bounding_volumes Bounding_volumes.cpp Bounding_volumes.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES})
qt5_use_modules(Bounding_volumes Xml Script OpenGL Svg)

View File

@ -29,13 +29,13 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
qt5_wrap_ui( DT_UI_FILES Circular_kernel_2.ui )
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( DT_RESOURCE_FILES ./Circular_kernel_2.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ./Circular_kernel_2.qrc )
# use the Qt MOC preprocessor on classes that derives from QObject
qt5_generate_moc( "Circular_kernel_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Circular_kernel_2.moc" )
# The executable itself.
add_executable ( Circular_kernel_2 Circular_kernel_2.cpp Circular_kernel_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
add_executable ( Circular_kernel_2 Circular_kernel_2.cpp Circular_kernel_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES})
qt5_use_modules(Circular_kernel_2 Xml Script OpenGL Svg)

View File

@ -26,13 +26,13 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
qt5_wrap_ui( DT_UI_FILES Generator_2.ui )
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( DT_RESOURCE_FILES ./Generator_2.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ./Generator_2.qrc )
# use the Qt MOC preprocessor on classes that derives from QObject
qt5_generate_moc( "Generator_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Generator_2.moc" )
# The executable itself.
add_executable ( Generator_2 Generator_2.cpp Generator_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
add_executable ( Generator_2 Generator_2.cpp Generator_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES} )
qt5_use_modules(Generator_2 Xml Script OpenGL Svg)

View File

@ -17,7 +17,7 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
add_definitions(-DQT_NO_KEYWORDS)
add_executable ( min min.cpp )
add_executable ( min min.cpp ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES})
qt5_use_modules(min Xml Script OpenGL Svg)

View File

@ -28,13 +28,13 @@ add_definitions(-DQT_NO_KEYWORDS)
qt5_wrap_ui( DT_UI_FILES L1_voronoi_diagram_2.ui )
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( DT_RESOURCE_FILES ./L1_voronoi_diagram_2.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ./L1_voronoi_diagram_2.qrc )
# use the Qt MOC preprocessor on classes that derives from QObject
qt5_generate_moc( L1_voronoi_diagram_2.cpp L1_voronoi_diagram_2.moc )
# The executable itself.
add_executable ( L1_voronoi_diagram_2 L1_voronoi_diagram_2.cpp L1_voronoi_diagram_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
add_executable ( L1_voronoi_diagram_2 L1_voronoi_diagram_2.cpp L1_voronoi_diagram_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES} )
qt5_use_modules(L1_voronoi_diagram_2 Xml Script OpenGL Svg)

View File

@ -27,13 +27,13 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
qt5_wrap_ui( DT_UI_FILES Largest_empty_rectangle_2.ui )
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( DT_RESOURCE_FILES ./Largest_empty_rectangle_2.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ./Largest_empty_rectangle_2.qrc )
# use the Qt MOC preprocessor on classes that derives from QObject
qt5_generate_moc( Largest_empty_rectangle_2.cpp Largest_empty_rectangle_2.moc )
# The executable itself.
add_executable ( Largest_empty_rectangle_2 Largest_empty_rectangle_2.cpp Largest_empty_rectangle_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
add_executable ( Largest_empty_rectangle_2 Largest_empty_rectangle_2.cpp Largest_empty_rectangle_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES} )
qt5_use_modules(Largest_empty_rectangle_2 Xml Script OpenGL Svg)

View File

@ -27,7 +27,7 @@ add_definitions(-DQT_NO_KEYWORDS)
qt5_wrap_ui( DT_UI_FILES Periodic_2_triangulation_2.ui )
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( DT_RESOURCE_FILES ./Periodic_2_triangulation_2.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ./Periodic_2_triangulation_2.qrc )
# use the Qt MOC preprocessor on classes that derives from QObject
qt5_generate_moc( Periodic_2_Delaunay_triangulation_2.cpp Periodic_2_triangulation_2.moc )
@ -43,7 +43,7 @@ SOURCE_GROUP("QT" FILES ${QT_headers})
add_executable ( Periodic_2_Delaunay_triangulation_2
Periodic_2_Delaunay_triangulation_2.cpp
Periodic_2_triangulation_2.moc
${DT_UI_FILES} ${DT_RESOURCE_FILES}
${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES}
${headers} ${QT_headers} ${P2T2_headers})
qt5_use_modules( Periodic_2_Delaunay_triangulation_2 Xml Script OpenGL Svg)

View File

@ -31,7 +31,7 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
qt5_wrap_ui( DT_UI_FILES Polygon_2.ui )
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( DT_RESOURCE_FILES ./Polygon_2.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ./Polygon_2.qrc )
# use the Qt MOC preprocessor on classes that derives from QObject
qt5_generate_moc( Polygon_2.cpp "${CMAKE_CURRENT_BINARY_DIR}/Polygon_2.moc" )
@ -40,7 +40,7 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
# SET_PROPERTY(TARGET CGAL PROPERTY IMPORTED_LOCATION ${CGAL_LIBRARY} )
# The executable itself.
add_executable ( Polygon_2 Polygon_2.cpp Polygon_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
add_executable ( Polygon_2 Polygon_2.cpp Polygon_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES} )
qt5_use_modules(Polygon_2 Xml Script OpenGL Svg)

View File

@ -34,13 +34,13 @@ add_definitions(-DQT_NO_KEYWORDS)
qt5_wrap_ui( CDT_UI_FILES Segment_voronoi_2.ui )
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( CDT_RESOURCE_FILES ./Segment_voronoi_2.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ./Segment_voronoi_2.qrc )
# use the Qt MOC preprocessor on classes that derives from QObject
qt5_generate_moc( "Segment_voronoi_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Segment_voronoi_2.moc" )
# The executable itself.
add_executable ( Segment_voronoi_2 Segment_voronoi_2.cpp Segment_voronoi_2.moc ${CDT_UI_FILES} ${CDT_RESOURCE_FILES} )
add_executable ( Segment_voronoi_2 Segment_voronoi_2.cpp Segment_voronoi_2.moc ${CDT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES})
qt5_use_modules(Segment_voronoi_2 Xml Script OpenGL Svg)

View File

@ -34,13 +34,13 @@ add_definitions(-DQT_NO_KEYWORDS)
qt5_wrap_ui( CDT_UI_FILES Segment_voronoi_2.ui )
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( CDT_RESOURCE_FILES ./Segment_voronoi_2.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ./Segment_voronoi_2.qrc )
# use the Qt MOC preprocessor on classes that derives from QObject
qt5_generate_moc( "Segment_voronoi_linf_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Segment_voronoi_linf_2.moc" )
# The executable itself.
add_executable ( Segment_voronoi_linf_2 Segment_voronoi_linf_2.cpp Segment_voronoi_linf_2.moc ${CDT_UI_FILES} ${CDT_RESOURCE_FILES} )
add_executable ( Segment_voronoi_linf_2 Segment_voronoi_linf_2.cpp Segment_voronoi_linf_2.moc ${CDT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES})
qt5_use_modules(Segment_voronoi_linf_2 Xml Script OpenGL Svg)

View File

@ -26,13 +26,13 @@ add_definitions(-DQT_NO_KEYWORDS)
qt5_wrap_ui( DT_UI_FILES Snap_rounding_2.ui )
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( DT_RESOURCE_FILES ./Snap_rounding_2.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ./Snap_rounding_2.qrc )
# use the Qt MOC preprocessor on classes that derives from QObject
qt5_generate_moc( Snap_rounding_2.cpp Snap_rounding_2.moc )
# The executable itself.
add_executable ( Snap_rounding_2 Snap_rounding_2.cpp Snap_rounding_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
add_executable ( Snap_rounding_2 Snap_rounding_2.cpp Snap_rounding_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES} )
qt5_use_modules(Snap_rounding_2 Xml Script OpenGL Svg)

View File

@ -28,13 +28,13 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
qt5_wrap_ui( DT_UI_FILES Spatial_searching_2.ui )
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( DT_RESOURCE_FILES ./Spatial_searching_2.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ./Spatial_searching_2.qrc )
# use the Qt MOC preprocessor on classes that derives from QObject
qt5_generate_moc( Spatial_searching_2.cpp Spatial_searching_2.moc )
# The executable itself.
add_executable ( Spatial_searching_2 Spatial_searching_2.cpp Spatial_searching_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
add_executable ( Spatial_searching_2 Spatial_searching_2.cpp Spatial_searching_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES} )
qt5_use_modules(Spatial_searching_2 Xml Script OpenGL Svg)

View File

@ -27,13 +27,13 @@ add_definitions(-DQT_NO_KEYWORDS)
qt5_wrap_ui( DT_UI_FILES Stream_lines_2.ui )
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( DT_RESOURCE_FILES ./Stream_lines_2.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ./Stream_lines_2.qrc )
# use the Qt MOC preprocessor on classes that derives from QObject
qt5_generate_moc( Stream_lines_2.cpp Stream_lines_2.moc )
# The executable itself.
add_executable ( Stream_lines_2 Stream_lines_2.cpp Stream_lines_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
add_executable ( Stream_lines_2 Stream_lines_2.cpp Stream_lines_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES} )
qt5_use_modules(Stream_lines_2 Xml Script OpenGL Svg)

View File

@ -40,7 +40,7 @@ qt5_add_resources ( CDT_RESOURCE_FILES ./Constrained_Delaunay_triangulation_2.qr
qt5_generate_moc( "Constrained_Delaunay_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Constrained_Delaunay_triangulation_2.moc" )
# The executable itself.
add_executable ( Constrained_Delaunay_triangulation_2 Constrained_Delaunay_triangulation_2.cpp Constrained_Delaunay_triangulation_2.moc ${CDT_UI_FILES} ${CDT_RESOURCE_FILES} )
add_executable ( Constrained_Delaunay_triangulation_2 Constrained_Delaunay_triangulation_2.cpp Constrained_Delaunay_triangulation_2.moc ${CDT_UI_FILES} ${CDT_RESOURCE_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES})
qt5_use_modules(Constrained_Delaunay_triangulation_2 Xml Script OpenGL Svg)
@ -64,7 +64,7 @@ qt5_add_resources ( DT_RESOURCE_FILES ./Delaunay_triangulation_2.qrc )
qt5_generate_moc( "Delaunay_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Delaunay_triangulation_2.moc" )
# The executable itself.
add_executable ( Delaunay_triangulation_2 Delaunay_triangulation_2.cpp Delaunay_triangulation_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
add_executable ( Delaunay_triangulation_2 Delaunay_triangulation_2.cpp Delaunay_triangulation_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES})
qt5_use_modules(Delaunay_triangulation_2 Xml Script OpenGL Svg)
@ -88,7 +88,7 @@ qt5_add_resources ( DT_RESOURCE_FILES ./Regular_triangulation_2.qrc )
qt5_generate_moc( "Regular_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Regular_triangulation_2.moc" )
# The executable itself.
add_executable ( Regular_triangulation_2 Regular_triangulation_2.cpp Regular_triangulation_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
add_executable ( Regular_triangulation_2 Regular_triangulation_2.cpp Regular_triangulation_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES})
qt5_use_modules(Regular_triangulation_2 Xml Script OpenGL Svg)

View File

@ -368,7 +368,7 @@ DemosMainWindow::openRecentFile_aux()
{
QAction *action = qobject_cast<QAction *>(sender());
if (action)
emit openRecentFile(action->data().toString());
Q_EMIT openRecentFile(action->data().toString());
}
CGAL_INLINE_FUNCTION

View File

@ -183,7 +183,7 @@ namespace Qt {
QMouseEvent* mouseEvent = static_cast<QMouseEvent*>(event);
QPointF pos = v->mapToScene(mouseEvent->pos());
QString xy = QString(" ") + QString::number(pos.x(),'g', 6) + " , " + QString::number(pos.y(),'g', 6) + " ";
emit mouseCoordinates(xy);
Q_EMIT mouseCoordinates(xy);
if(rectItem->isVisible()) {
QPointF size = v->mapToScene(mouseEvent->pos());
size = size - rect_first_point;

View File

@ -4,87 +4,98 @@ if(POLICY CMP0043)
cmake_policy(SET CMP0043 OLD)
endif()
find_package(Qt5 QUIET COMPONENTS OpenGL Svg QUIET)
find_package(OpenGL QUIET)
if(CGAL_HEADER_ONLY)
cache_set(CGAL_Qt5_3RD_PARTY_LIBRARIES Qt5::OpenGL Qt5::Svg )
else(CGAL_HEADER_ONLY)
find_package(Qt5 QUIET COMPONENTS OpenGL Svg QUIET)
find_package(OpenGL QUIET)
set(CGAL_Qt5_MISSING_DEPS "")
if(NOT Qt5OpenGL_FOUND)
set(CGAL_Qt5_MISSING_DEPS "Qt5OpenGL")
endif()
if(NOT Qt5Svg_FOUND)
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5Svg")
endif()
if(NOT Qt5_FOUND)
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5")
endif()
if(NOT OPENGL_FOUND)
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} OpenGL")
endif()
set(CGAL_Qt5_MISSING_DEPS "")
if(NOT Qt5OpenGL_FOUND)
set(CGAL_Qt5_MISSING_DEPS "Qt5OpenGL")
endif()
if(NOT Qt5Svg_FOUND)
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5Svg")
endif()
if(NOT Qt5_FOUND)
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5")
endif()
if(NOT OPENGL_FOUND)
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} OpenGL")
endif()
if(CGAL_Qt5_MISSING_DEPS)
message(STATUS "libCGAL_Qt5 is missing the dependencies: ${CGAL_Qt5_MISSING_DEPS} cannot be configured.")
return()
endif()
if(CGAL_Qt5_MISSING_DEPS)
message(STATUS "libCGAL_Qt5 is missing the dependencies: ${CGAL_Qt5_MISSING_DEPS} cannot be configured.")
return()
endif()
include_directories (BEFORE ../../include)
include_directories (BEFORE ../../include)
message( STATUS "USING Qt5_VERSION = '${Qt5Core_VERSION_STRING}'" )
if(COMMAND add_config_flag)
set( CGAL_HAS_QT5 TRUE )
add_config_flag( CGAL_HAS_QT5 )
endif()
message( STATUS "USING Qt5_VERSION = '${Qt5Core_VERSION_STRING}'" )
if(COMMAND add_config_flag)
set( CGAL_HAS_QT5 TRUE )
add_config_flag( CGAL_HAS_QT5 )
endif()
get_property(QT_UIC_EXECUTABLE TARGET Qt5::uic PROPERTY LOCATION)
message( STATUS "OpenGL include: ${OPENGL_INCLUDE_DIR}" )
message( STATUS "OpenGL libraries: ${OPENGL_LIBRARIES}" )
message( STATUS "OpenGL definitions: ${OPENGL_DEFINITIONS}" )
message( STATUS "Qt5Core include: ${Qt5Core_INCLUDE_DIRS}" )
message( STATUS "Qt5 libraries: ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Svg_LIBRARIES} ${Qt5OpenGL_LIBRARIES}" )
message( STATUS "Qt5Core definitions: ${Qt5Core_DEFINITIONS}" )
message( STATUS "moc executable: ${QT_MOC_EXECUTABLE}" )
message( STATUS "uic executable: ${QT_UIC_EXECUTABLE}" )
get_property(QT_UIC_EXECUTABLE TARGET Qt5::uic PROPERTY LOCATION)
message( STATUS "OpenGL include: ${OPENGL_INCLUDE_DIR}" )
message( STATUS "OpenGL libraries: ${OPENGL_LIBRARIES}" )
message( STATUS "OpenGL definitions: ${OPENGL_DEFINITIONS}" )
message( STATUS "Qt5Core include: ${Qt5Core_INCLUDE_DIRS}" )
message( STATUS "Qt5 libraries: ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Svg_LIBRARIES} ${Qt5OpenGL_LIBRARIES}" )
message( STATUS "Qt5Core definitions: ${Qt5Core_DEFINITIONS}" )
message( STATUS "moc executable: ${QT_MOC_EXECUTABLE}" )
message( STATUS "uic executable: ${QT_UIC_EXECUTABLE}" )
cache_set(CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS ${QT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} )
cache_set(CGAL_Qt5_3RD_PARTY_LIBRARIES ${QT_LIBRARIES} ${OPENGL_LIBRARIES} )
cache_set(CGAL_Qt5_3RD_PARTY_DEFINITIONS ${QT_DEFINITIONS} ${OPENGL_DEFINITIONS} )
cache_set(CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS ${QT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} )
cache_set(CGAL_Qt5_3RD_PARTY_LIBRARIES ${QT_LIBRARIES} ${OPENGL_LIBRARIES} )
cache_set(CGAL_Qt5_3RD_PARTY_DEFINITIONS ${QT_DEFINITIONS} ${OPENGL_DEFINITIONS} )
set(mocfiles "")
set(RESOURCE_FILES "")
set(mocfiles "")
set(RESOURCE_FILES "")
foreach (package ${CGAL_CONFIGURED_PACKAGES} )
file(GLOB PACKAGE_QTMOC_FILES "${package}/src/CGAL_Qt5/*.qtmoc.cmake")
list(SORT PACKAGE_QTMOC_FILES)
foreach(package_qtmoc_file ${PACKAGE_QTMOC_FILES})
# includes 'moccing' for sources/headers in package + collects lists of moc-files for dependency (to properly build the lib)
include(${package_qtmoc_file})
# message(STATUS QTMOC------------FILE: ${package_qtmoc_file})
foreach (package ${CGAL_CONFIGURED_PACKAGES} )
file(GLOB PACKAGE_QTMOC_FILES "${package}/src/CGAL_Qt5/*.qtmoc.cmake")
list(SORT PACKAGE_QTMOC_FILES)
foreach(package_qtmoc_file ${PACKAGE_QTMOC_FILES})
# includes 'moccing' for sources/headers in package + collects lists of moc-files for dependency (to properly build the lib)
include(${package_qtmoc_file})
# message(STATUS QTMOC------------FILE: ${package_qtmoc_file})
endforeach()
endforeach()
endforeach()
foreach(mocfile ${mocfiles})
list(APPEND additional_files ${mocfile})
endforeach()
foreach(resfile ${RESOURCE_FILES})
list(APPEND additional_files ${resfile})
endforeach()
foreach(mocfile ${mocfiles})
list(APPEND additional_files ${mocfile})
endforeach()
foreach(resfile ${RESOURCE_FILES})
list(APPEND additional_files ${resfile})
endforeach()
# message(STATUS "Additional input files: ${additional_files}")
use_essential_libs()
use_essential_libs()
include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS} )
include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS} )
link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
endif(CGAL_HEADER_ONLY)
collect_cgal_library( CGAL_Qt5 "${additional_files}")
qt5_use_modules(CGAL_Qt5 OpenGL Svg)
if(CGAL_HEADER_ONLY)
install(DIRECTORY "../../include/CGAL/Qt/" DESTINATION "${CGAL_INSTALL_INC_DIR}/CGAL/include/CGAL/Qt")
install(DIRECTORY "../../demo/resources/" DESTINATION "${CGAL_INSTALL_INC_DIR}/CGAL/demo/resources")
install(DIRECTORY "../../demo/icons/" DESTINATION "${CGAL_INSTALL_INC_DIR}/CGAL/demo/icons")
else()
qt5_use_modules(CGAL_Qt5 OpenGL Svg)
add_dependencies( CGAL_Qt5 CGAL )
add_dependencies( CGAL_Qt5 CGAL )
# CGAL_Qt5 only depends on CGAL in DEBUG, but we still link it in
# both build types.
target_link_libraries( CGAL_Qt5 CGAL ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_Qt5_3RD_PARTY_LIBRARIES} )
# CGAL_Qt5 only depends on CGAL in DEBUG, but we still link it in
# both build types.
target_link_libraries( CGAL_Qt5 CGAL ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_Qt5_3RD_PARTY_LIBRARIES} )
endif()
add_definitions ( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_Qt5_3RD_PARTY_DEFINITIONS} )

View File

@ -6,4 +6,3 @@ qt5_wrap_cpp(mocfiles ../../include/CGAL/Qt/GraphicsViewNavigation.h
# qrc files (resources files, that contain icons, at least)
qt5_add_resources ( RESOURCE_FILES ../../demo/resources/CGAL.qrc ../../demo/icons/Input.qrc ../../demo/icons/File.qrc ../../demo/icons/Triangulation_2.qrc)

View File

@ -30,6 +30,18 @@ endif()
# Use GNUInstallDirst to get canonical paths
include(GNUInstallDirs)
#--------------------------------------------------------------------------------------------------
#
# -= HEADER ONLY =-
#
#--------------------------------------------------------------------------------------------------
option(CGAL_HEADER_ONLY "Enable the header only version of CGAL" ON )
if (CGAL_HEADER_ONLY)
set(CGAL_HEADER_ONLY TRUE CACHE BOOL "Enable cgal header only" FORCE)
add_definitions(-DCGAL_HEADER_ONLY)
endif (CGAL_HEADER_ONLY)
#--------------------------------------------------------------------------------------------------
#
# -= PACKAGE SETUP =-
@ -77,6 +89,7 @@ if ( CGAL_BRANCH_BUILD )
set(CGAL_INSTALLATION_PACKAGE_DIR "${CMAKE_SOURCE_DIR}/Installation" CACHE INTERNAL "Directory containing the Installation package")
set(CGAL_MAINTENANCE_PACKAGE_DIR "${CMAKE_SOURCE_DIR}/Maintenance" CACHE INTERNAL "Directory containing the Maintenance package")
set(CGAL_CORE_PACKAGE_DIR "${CMAKE_SOURCE_DIR}/Core" CACHE INTERNAL "Directory containing the Core package")
set(CGAL_GRAPHICSVIEW_PACKAGE_DIR "${CMAKE_SOURCE_DIR}/GraphicsView" CACHE INTERNAL "Directory containing the GraphicsView package")
message(STATUS "Installation package directory: ${CGAL_INSTALLATION_PACKAGE_DIR}")
message(STATUS "Maintenance package directory: ${CGAL_MAINTENANCE_PACKAGE_DIR}")
@ -99,6 +112,7 @@ else ( CGAL_BRANCH_BUILD )
set(CGAL_INSTALLATION_PACKAGE_DIR "${CMAKE_SOURCE_DIR}" CACHE INTERNAL "Directory containing the Installation package")
set(CGAL_MAINTENANCE_PACKAGE_DIR "${CMAKE_SOURCE_DIR}" CACHE INTERNAL "Directory containing the Maintenance package")
set(CGAL_CORE_PACKAGE_DIR "${CMAKE_SOURCE_DIR}" CACHE INTERNAL "Directory containing the Core package")
set(CGAL_GRAPHICSVIEW_PACKAGE_DIR "${CMAKE_SOURCE_DIR}" CACHE INTERNAL "Directory containing the GraphicsView package")
endif (CGAL_BRANCH_BUILD )

View File

@ -10,6 +10,8 @@ set(CGAL_CONFIG_LOADED TRUE)
get_filename_component(CGAL_CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(CGAL_HEADER_ONLY "@CGAL_HEADER_ONLY@" )
# The code for including exported targets is different from
# CGAL_Config_install.cmake. We do not have separate export files in
# an installed version and we need to make sure that we are not
@ -26,7 +28,7 @@ if(NOT POLICY CMP0024 OR NOT CGAL_BUILDING_LIBS)
endif()
endmacro()
if(NOT MSVC)
if(NOT MSVC AND NOT CGAL_HEADER_ONLY)
CGAL_get_property_optional(CGAL_LIBRARY CGAL::CGAL LOCATION)
CGAL_get_property_optional(CGAL_Core_LIBRARY CGAL::CGAL_Core LOCATION)
CGAL_get_property_optional(CGAL_ImageIO_LIBRARY CGAL::CGAL_ImageIO LOCATION)
@ -68,6 +70,7 @@ endforeach()
set(CGAL_INSTALLATION_PACKAGE_DIR "@CGAL_INSTALLATION_PACKAGE_DIR@")
set(CGAL_CORE_PACKAGE_DIR "@CGAL_CORE_PACKAGE_DIR@")
set(CGAL_GRAPHICSVIEW_PACKAGE_DIR "@CGAL_GRAPHICSVIEW_PACKAGE_DIR@")
set(CGAL_MAJOR_VERSION "@CGAL_MAJOR_VERSION@" )
set(CGAL_MINOR_VERSION "@CGAL_MINOR_VERSION@" )
@ -126,8 +129,51 @@ macro(check_cgal_component COMPONENT)
set( CHECK_CGAL_ERROR_TAIL "" )
else()
if ( WITH_${CGAL_LIB} )
if(TARGET CGAL::${CGAL_LIB})
set( ${CGAL_LIB}_FOUND TRUE )
if(CGAL_HEADER_ONLY OR TARGET CGAL::${CGAL_LIB})
if ("${CGAL_LIB}" STREQUAL "CGAL_Qt5")
find_package(OpenGL QUIET)
find_package(Qt5 COMPONENTS OpenGL Svg QUIET)
set(CGAL_Qt5_MISSING_DEPS "")
if(NOT Qt5OpenGL_FOUND)
set(CGAL_Qt5_MISSING_DEPS "Qt5OpenGL")
endif()
if(NOT Qt5Svg_FOUND)
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5Svg")
endif()
if(NOT Qt5_FOUND)
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5")
endif()
if(NOT OPENGL_FOUND)
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} OpenGL")
endif()
if(CGAL_Qt5_MISSING_DEPS)
set( ${CGAL_LIB}_FOUND FALSE )
message(STATUS "Missing the dependencies: ${CGAL_Qt5_MISSING_DEPS} cannot be configured.")
else()
set( ${CGAL_LIB}_FOUND TRUE )
if (CGAL_HEADER_ONLY)
include("${CGAL_MODULES_DIR}/Use_CGAL_Qt5_headers.cmake")
endif()
endif()
else()
if ("${CGAL_LIB}" STREQUAL "CGAL_ImageIO")
find_package( OpenGL QUIET )
find_package( ZLIB QUIET )
if(OPENGL_FOUND)
set( ${CGAL_LIB}_FOUND TRUE )
else(OPENGL_FOUND)
set( ${CGAL_LIB}_FOUND FALSE )
message(STATUS "Notice: ImageIO disabled because it requires OpenGL.")
endif(OPENGL_FOUND)
else()
# Librairies that have no dependencies
set( ${CGAL_LIB}_FOUND TRUE )
endif()
endif()
else()
set( ${CGAL_LIB}_FOUND FALSE )
set( CHECK_${CGAL_LIB}_ERROR_TAIL " CGAL was configured with WITH_${CGAL_LIB}=ON, but one of the dependencies of ${CGAL_LIB} was not configured properly." )

View File

@ -10,6 +10,8 @@ set(CGAL_CONFIG_LOADED TRUE)
get_filename_component(CGAL_CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(CGAL_HEADER_ONLY "@CGAL_HEADER_ONLY@" )
# CGAL_DIR is the directory where this CGALConfig.cmake is installed
string(REPLACE "@CGAL_INSTALL_CMAKE_DIR@" "" CGAL_INSTALL_PREFIX "${CGAL_CONFIG_DIR}")
@ -43,6 +45,7 @@ set(CGAL_ImageIO_USE_ZLIB "@CGAL_ImageIO_USE_ZLIB@" )
set(CGAL_VERSION "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUILD_VERSION}")
set(CGAL_USE_FILE "${CGAL_MODULES_DIR}/UseCGAL.cmake" )
set(CGAL_GRAPHICSVIEW_PACKAGE_DIR "${CGAL_INCLUDE_DIRS}/CGAL/" CACHE INTERNAL "Directory containing the GraphicsView package")
if ( CGAL_FIND_REQUIRED )
set( CHECK_CGAL_COMPONENT_MSG_ON_ERROR TRUE )
@ -73,15 +76,62 @@ macro(check_cgal_component COMPONENT)
include(${CGAL_CONFIG_DIR}/CGALLibConfig.cmake)
set( CHECK_CGAL_ERROR_TAIL "" )
else()
if (EXISTS ${CGAL_CONFIG_DIR}/${CGAL_LIB}LibConfig.cmake)
if (EXISTS ${CGAL_CONFIG_DIR}/${CGAL_LIB}Exports.cmake)
# include export files for requested component
include(${CGAL_CONFIG_DIR}/${CGAL_LIB}Exports.cmake)
# include config file (defining WITH_${CGAL_LIB})
include(${CGAL_CONFIG_DIR}/${CGAL_LIB}LibConfig.cmake)
endif()
if ( WITH_${CGAL_LIB} )
if(TARGET CGAL::${CGAL_LIB})
if(TARGET CGAL::${CGAL_LIB} OR CGAL_HEADER_ONLY )
set( ${CGAL_LIB}_FOUND TRUE )
if ("${CGAL_LIB}" STREQUAL "CGAL_Qt5")
find_package(OpenGL QUIET)
find_package(Qt5 COMPONENTS OpenGL Svg QUIET)
set(CGAL_Qt5_MISSING_DEPS "")
if(NOT Qt5OpenGL_FOUND)
set(CGAL_Qt5_MISSING_DEPS "Qt5OpenGL")
endif()
if(NOT Qt5Svg_FOUND)
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5Svg")
endif()
if(NOT Qt5_FOUND)
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5")
endif()
if(NOT OPENGL_FOUND)
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} OpenGL")
endif()
if(CGAL_Qt5_MISSING_DEPS)
set( ${CGAL_LIB}_FOUND FALSE )
message(STATUS "Missing the dependencies: ${CGAL_Qt5_MISSING_DEPS} cannot be configured.")
else()
set( ${CGAL_LIB}_FOUND TRUE )
if (CGAL_HEADER_ONLY)
include("${CGAL_MODULES_DIR}/Use_CGAL_Qt5_headers.cmake")
endif()
endif()
else()
if ("${CGAL_LIB}" STREQUAL "CGAL_ImageIO")
find_package( OpenGL QUIET )
find_package( ZLIB QUIET )
if(OPENGL_FOUND)
set( ${CGAL_LIB}_FOUND TRUE )
else(OPENGL_FOUND)
set( ${CGAL_LIB}_FOUND FALSE )
message(STATUS "Notice: ImageIO disabled because it requires OpenGL.")
endif(OPENGL_FOUND)
else()
# Librairies that have no dependencies
set( ${CGAL_LIB}_FOUND TRUE )
endif()
else()
# Librairies that have no dependencies
set( ${CGAL_LIB}_FOUND TRUE )
endif()
else()
set( ${CGAL_LIB}_FOUND FALSE )
set( CHECK_${CGAL_LIB}_ERROR_TAIL " CGAL was configured with WITH_${CGAL_LIB}=ON, but one of the dependencies of ${CGAL_LIB} was not configured properly." )

View File

@ -5,7 +5,7 @@ set(WITH_@LIBRARY_NAME@ "ON")
# CMake<=2.8.11 (detected by the absence of CMP0024), the else()
# condition is never used.
if(NOT POLICY CMP0024 OR NOT CGAL_BUILDING_LIBS)
if(NOT MSVC)
if(NOT MSVC AND NOT CGAL_HEADER_ONLY)
get_property(@LIBRARY_NAME@_LIBRARY TARGET CGAL::@LIBRARY_NAME@ PROPERTY LOCATION)
else()
set(@LIBRARY_NAME@_LIBRARY "")
@ -16,7 +16,7 @@ else()
# access the LOCATION property here to set lib_LIBRARY, since those
# targets are not imported and this is disallowed by CMP0026. Just
# set it to the target name.
if(TARGET @LIBRARY_NAME@ AND NOT TARGET CGAL::@LIBRARY_NAME@)
if(TARGET @LIBRARY_NAME@ AND NOT TARGET CGAL::@LIBRARY_NAME@ AND NOT CGAL_HEADER_ONLY)
add_library(CGAL::@LIBRARY_NAME@ ALIAS @LIBRARY_NAME@)
set(@LIBRARY_NAME@_LIBRARY CGAL::@LIBRARY_NAME@)
else()

View File

@ -284,11 +284,33 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
if (${component} STREQUAL "ImageIO")
find_package( OpenGL QUIET )
find_package( ZLIB QUIET )
if (OPENGL_FOUND)
add_definitions("${OPENGL_DEFINITIONS}")
if (OPENGL_INCLUDE_DIR)
include_directories( SYSTEM "${OPENGL_INCLUDE_DIR}" )
endif ()
endif(OPENGL_FOUND)
if(ZLIB_FOUND)
cache_set(CGAL_ImageIO_USE_ZLIB "ON")
add_definitions("-DCGAL_USE_ZLIB")
include_directories( SYSTEM ${ZLIB_INCLUDE_DIR} )
endif(ZLIB_FOUND)
if(WITH_VTK)
if( VTK_FOUND )
add_definitions("-DCGAL_USE_VTK")
include_directories( SYSTEM ${VTK_INCLUDE_DIRS} )
link_directories(${vtkImagingCore_RUNTIME_LIBRARY_DIRS} ${vtkImagingCore_LIBRARY_DIRS} ${vtkIOImage_RUNTIME_LIBRARY_DIRS} ${vtkIOImage_LIBRARY_DIRS} ${vtkFiltersImaging_RUNTIME_LIBRARY_DIRS} ${vtkFiltersImaging_LIBRARY_DIRS})
endif()
endif()
endif()
if (${component} STREQUAL "Qt5")
find_package( OpenGL QUIET )
find_package( Qt5 QUIET COMPONENTS OpenGL Svg )
find_package(OpenGL QUIET)
find_package(Qt5 COMPONENTS OpenGL Gui Core Script ScriptTools QUIET)
endif()
else(WITH_CGAL_${component})
@ -312,14 +334,34 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
####message( STATUS "External library ${component} has not been preconfigured")
if (${component} STREQUAL "ImageIO")
find_package( OpenGL )
find_package( ZLIB )
find_package( OpenGL QUIET )
find_package( ZLIB QUIET )
if (OPENGL_FOUND)
add_definitions("${OPENGL_DEFINITIONS}")
include_directories( SYSTEM "${OPENGL_INCLUDE_DIR}" )
endif(OPENGL_FOUND)
if(ZLIB_FOUND)
cache_set(CGAL_ImageIO_USE_ZLIB "ON")
add_definitions("-DCGAL_USE_ZLIB")
include_directories( SYSTEM ${ZLIB_INCLUDE_DIR} )
endif(ZLIB_FOUND)
if(WITH_VTK)
if( VTK_FOUND )
add_definitions("-DCGAL_USE_VTK")
include_directories( SYSTEM ${VTK_INCLUDE_DIRS} )
link_directories(${vtkImagingCore_RUNTIME_LIBRARY_DIRS} ${vtkImagingCore_LIBRARY_DIRS} ${vtkIOImage_RUNTIME_LIBRARY_DIRS} ${vtkIOImage_LIBRARY_DIRS} ${vtkFiltersImaging_RUNTIME_LIBRARY_DIRS} ${vtkFiltersImaging_LIBRARY_DIRS})
endif()
endif()
endif()
if (${component} STREQUAL "Qt5")
set(CGAL_${component}_FOUND TRUE)
find_package( OpenGL )
find_package (Qt5 COMPONENTS OpenGL Gui Core Script ScriptTools)
find_package(OpenGL QUIET)
find_package(Qt5 COMPONENTS OpenGL Gui Core Script ScriptTools QUIET)
endif()
####message( STATUS "External library ${vlib} after find")
if (${vlib}_FOUND)
@ -450,7 +492,6 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
endif()
endmacro()
## All the following macros are probably unused. -- Laurent Rineau, 2011/07/21
# Composes a tagged list of libraries: a list with interpersed keywords or tags

View File

@ -53,8 +53,13 @@ if(NOT USE_CGAL_FILE_INCLUDED)
include_directories ( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} )
add_definitions ( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_DEFINITIONS} )
link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
link_libraries ( ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
if (CGAL_HEADER_ONLY)
add_definitions(-DCGAL_HEADER_ONLY)
link_directories ( ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
link_libraries ( ${CGAL_3RD_PARTY_LIBRARIES} )
else()
link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
link_libraries ( ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
endif()
endif()

View File

@ -0,0 +1,13 @@
qt5_wrap_cpp(CGAL_Qt5_MOC_FILES
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsViewNavigation.h
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/DemosMainWindow.h
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsItem.h
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsViewInput.h)
# qrc files (resources files, that contain icons, at least)
qt5_add_resources (CGAL_Qt5_RESOURCE_FILES
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/resources/CGAL.qrc
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/icons/Input.qrc
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/icons/File.qrc
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/icons/Triangulation_2.qrc)

View File

@ -28,6 +28,10 @@
#ifndef CGAL_CONFIG_H
#define CGAL_CONFIG_H
#ifdef CGAL_HEADER_ONLY
# define CGAL_NO_AUTOLINK 1
#endif
// Workaround for a bug in Boost, that checks WIN64 instead of _WIN64
// https://svn.boost.org/trac/boost/ticket/5519
#if defined(_WIN64) && ! defined(WIN64)
@ -414,12 +418,20 @@ using std::max;
// Macro to trigger deprecation warnings
#ifdef CGAL_NO_DEPRECATION_WARNINGS
# define CGAL_DEPRECATED
# define CGAL_DEPRECATED_UNUSED
#elif defined(__GNUC__) || __has_attribute(__deprecated__)
# define CGAL_DEPRECATED __attribute__((__deprecated__))
#if __has_attribute(__unused__)
# define CGAL_DEPRECATED_UNUSED __attribute__((__deprecated__, __unused__))
#else
# define CGAL_DEPRECATED_UNUSED __attribute__((__deprecated__))
#endif
#elif defined (_MSC_VER) && (_MSC_VER > 1300)
# define CGAL_DEPRECATED __declspec(deprecated)
# define CGAL_DEPRECATED_UNUSED __declspec(deprecated)
#else
# define CGAL_DEPRECATED
# define CGAL_DEPRECATED_UNUSED
#endif

View File

@ -10,6 +10,8 @@ link_directories(${CGAL_3RD_PARTY_LIBRARIES_DIRS})
collect_cgal_library(CGAL "")
target_link_libraries(CGAL ${CGAL_3RD_PARTY_LIBRARIES})
if(NOT CGAL_HEADER_ONLY)
target_link_libraries(CGAL ${CGAL_3RD_PARTY_LIBRARIES})
endif()
message("libCGAL is configured")

View File

@ -1,4 +1,6 @@
function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES)
if (NOT CGAL_HEADER_ONLY)
# IMPORTANT: First delete all_files.cpp
if (EXISTS ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp)
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp)
@ -24,6 +26,7 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES)
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp "\#include \"${source}\"\n")
endif()
endforeach()
endif()
if(CGAL_BUILD_SHARED_LIBS)
set(CGAL_LIB_PREFIX "")
@ -41,38 +44,47 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES)
set(rc_file )
endif()
add_library (${LIBRARY_NAME}
${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp
${rc_file}
${ADDITIONAL_FILES})
if(CGAL_SOVERSION AND CGAL_SONAME_VERSION)
set_target_properties(${LIBRARY_NAME} PROPERTIES
VERSION "${CGAL_SOVERSION}"
SOVERSION "${CGAL_SONAME_VERSION}")
if (NOT CGAL_HEADER_ONLY)
add_library (${LIBRARY_NAME}
${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp
${rc_file}
${ADDITIONAL_FILES})
# add_library (${LIBRARY_NAME} ${CGAL_LIBRARY_SOURCE_FILES} ${rc_file} ${ADDITIONAL_FILES}) # builing not creating temporary all_files.cpp
if(CGAL_SOVERSION AND CGAL_SONAME_VERSION)
set_target_properties(${LIBRARY_NAME} PROPERTIES
VERSION "${CGAL_SOVERSION}"
SOVERSION "${CGAL_SONAME_VERSION}")
endif()
else()
add_library(${LIBRARY_NAME} INTERFACE)
endif()
if(CGAL_AUTO_LINK_ENABLED)
set_target_properties( ${LIBRARY_NAME} PROPERTIES
OUTPUT_NAME_DEBUG "${DEBUG_MANGLED_NAME}"
OUTPUT_NAME_RELEASE "${RELEASE_MANGLED_NAME}"
OUTPUT_NAME_MINSIZEREL "${RELEASE_MANGLED_NAME}"
OUTPUT_NAME_RELWITHDEBINFO "${RELEASE_MANGLED_NAME}"
)
if (NOT CGAL_HEADER_ONLY)
set_target_properties( ${LIBRARY_NAME} PROPERTIES
OUTPUT_NAME_DEBUG "${DEBUG_MANGLED_NAME}"
OUTPUT_NAME_RELEASE "${RELEASE_MANGLED_NAME}"
OUTPUT_NAME_MINSIZEREL "${RELEASE_MANGLED_NAME}"
OUTPUT_NAME_RELWITHDEBINFO "${RELEASE_MANGLED_NAME}"
)
if ( HAS_CFG_INTDIR )
add_custom_command(TARGET ${LIBRARY_NAME} POST_BUILD COMMAND if exist \"$(TargetDir)$(TargetName).dll\" copy /Y \"$(TargetDir)$(TargetName).dll\" \"$(TargetDir)..\" )
add_custom_command(TARGET ${LIBRARY_NAME} POST_BUILD COMMAND if exist \"$(TargetDir)$(TargetName).pdb\" copy /Y \"$(TargetDir)$(TargetName).pdb\" \"$(TargetDir)..\" )
add_custom_command(TARGET ${LIBRARY_NAME} POST_BUILD COMMAND if exist \"$(SolutionDir)lib\\$(ConfigurationName)\\$(TargetName).lib\" copy /Y \"$(SolutionDir)lib\\$(ConfigurationName)\\$(TargetName).lib\" \"$(SolutionDir)lib\" )
if ( HAS_CFG_INTDIR )
add_custom_command(TARGET ${LIBRARY_NAME} POST_BUILD COMMAND if exist \"$(TargetDir)$(TargetName).dll\" copy /Y \"$(TargetDir)$(TargetName).dll\" \"$(TargetDir)..\" )
add_custom_command(TARGET ${LIBRARY_NAME} POST_BUILD COMMAND if exist \"$(TargetDir)$(TargetName).pdb\" copy /Y \"$(TargetDir)$(TargetName).pdb\" \"$(TargetDir)..\" )
add_custom_command(TARGET ${LIBRARY_NAME} POST_BUILD COMMAND if exist \"$(SolutionDir)lib\\$(ConfigurationName)\\$(TargetName).lib\" copy /Y \"$(SolutionDir)lib\\$(ConfigurationName)\\$(TargetName).lib\" \"$(SolutionDir)lib\" )
endif()
endif()
endif()
install(TARGETS ${LIBRARY_NAME} EXPORT ${LIBRARY_NAME}Exports
RUNTIME DESTINATION "${CGAL_INSTALL_BIN_DIR}"
LIBRARY DESTINATION "${CGAL_INSTALL_LIB_DIR}"
ARCHIVE DESTINATION "${CGAL_INSTALL_LIB_DIR}")
install(EXPORT ${LIBRARY_NAME}Exports
DESTINATION "${CGAL_INSTALL_CMAKE_DIR}"
NAMESPACE CGAL::)
# if (NOT CGAL_HEADER_ONLY)
install(TARGETS ${LIBRARY_NAME} EXPORT ${LIBRARY_NAME}Exports
RUNTIME DESTINATION "${CGAL_INSTALL_BIN_DIR}"
LIBRARY DESTINATION "${CGAL_INSTALL_LIB_DIR}"
ARCHIVE DESTINATION "${CGAL_INSTALL_LIB_DIR}")
install(EXPORT ${LIBRARY_NAME}Exports
DESTINATION "${CGAL_INSTALL_CMAKE_DIR}"
NAMESPACE CGAL::)
# endif()
# We have to call configure_file twice to force double expansion of variables.
configure_file("${CGAL_MODULES_DIR}/CGALLibConfig.cmake.in"
@ -80,6 +92,7 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES)
configure_file("${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake"
"${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" @ONLY)
install(FILES "${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" DESTINATION ${CGAL_INSTALL_CMAKE_DIR})
endfunction()
function( configure_component DIR COMPONENT )
@ -191,7 +204,9 @@ CGAL_add_if_target(CGAL_Core)
CGAL_add_if_target(CGAL_ImageIO)
CGAL_add_if_target(CGAL_Qt5)
export(TARGETS ${CGAL_ACTUAL_CONFIGURED_LIBRARIES} NAMESPACE CGAL:: FILE "${CMAKE_BINARY_DIR}/CGALExports.cmake")
# if (NOT CGAL_HEADER_ONLY)
export(TARGETS ${CGAL_ACTUAL_CONFIGURED_LIBRARIES} NAMESPACE CGAL:: FILE "${CMAKE_BINARY_DIR}/CGALExports.cmake")
# endif()
message(STATUS "Sources for CGAL component libraries '${CGAL_CONFIGURED_LIBRARIES}' detected")

View File

@ -18,7 +18,7 @@ macro(create_link_to_program COMPONENT )
link_directories( ${${COMPONENT}_3RD_PARTY_LIBRARIES_DIRS})
# Link the executable to CGAL and third-party libraries
if ( CGAL_AUTO_LINK_ENABLED )
if ( CGAL_AUTO_LINK_ENABLED OR CGAL_HEADER_ONLY)
target_link_libraries(link_to_${COMPONENT} ${CGAL_3RD_PARTY_LIBRARIES} ${${COMPONENT}_3RD_PARTY_LIBRARIES} )
else()
target_link_libraries(link_to_${COMPONENT} CGAL::${COMPONENT} ${CGAL_3RD_PARTY_LIBRARIES} ${${COMPONENT}_3RD_PARTY_LIBRARIES} )
@ -69,7 +69,9 @@ if ( CGAL_FOUND )
find_package(Qt5 QUIET)
if( Qt5_FOUND )
create_link_to_program(CGAL_Qt5)
qt5_use_modules(link_to_CGAL_Qt5)
if (CGAL_HEADER_ONLY)
qt5_use_modules(link_to_CGAL_Qt5)
endif()
endif()
endif()

View File

@ -4,7 +4,7 @@
std::ostream &
operator<<(std::ostream &os, const MyPointC2 &p)
{
switch(os.iword(CGAL::IO::mode)) {
switch(CGAL::get_mode(os)) {
case CGAL::IO::ASCII :
return os << p.x() << ' ' << p.y() << ' ' << p.color();
case CGAL::IO::BINARY :
@ -24,7 +24,7 @@ operator>>(std::istream &is, MyPointC2 &p)
{
double x, y;
int c;
switch(is.iword(CGAL::IO::mode)) {
switch(CGAL::get_mode(is)) {
case CGAL::IO::ASCII :
is >> x >> y >> c;
break;

View File

@ -224,7 +224,7 @@ template < class R >
std::ostream &
operator<<(std::ostream &os, const MySegmentC2<R> &s)
{
switch(os.iword(CGAL::IO::mode)) {
switch(CGAL::get_mode(os)) {
case CGAL::IO::ASCII :
return os << s.source() << ' ' << s.target();
case CGAL::IO::BINARY :

View File

@ -57,14 +57,14 @@ qt5_wrap_ui(uis MainWindow.ui CreateMesh.ui CreateMenger.ui
CreateSierpinskiCarpet.ui CreateSierpinskiTriangle.ui)
# qrc files (resources files, that contain icons, at least)
qt5_add_resources (RESOURCE_FILES ./Linear_cell_complex_3.qrc)
qt5_add_resources (CGAL_Qt5_RESOURCE_FILES ./Linear_cell_complex_3.qrc)
add_executable(Linear_cell_complex_3_demo
Linear_cell_complex_3_demo.cpp MainWindow.cpp
Viewer.cpp Linear_cell_complex_3_subdivision.cpp
Linear_cell_complex_pqq_subdivision.cpp
${uis} ${RESOURCE_FILES} )
${uis} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES})
qt5_use_modules(Linear_cell_complex_3_demo Xml Script OpenGL Svg)
add_to_cached_list(CGAL_EXECUTABLE_TARGETS Linear_cell_complex_3_demo)
@ -73,6 +73,7 @@ target_link_libraries(Linear_cell_complex_3_demo ${CGAL_LIBRARIES}
${CGAL_3RD_PARTY_LIBRARIES})
target_link_libraries(Linear_cell_complex_3_demo ${QT_LIBRARIES}
${QGLVIEWER_LIBRARIES} )
target_link_libraries(Linear_cell_complex_3_demo ${OPENGL_gl_LIBRARY} )
target_link_libraries(Linear_cell_complex_3_demo ${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY} )
endif()

View File

@ -23,7 +23,7 @@ int main()
Vector a;
const int n = 5;
for (int i = 0; i < n; ++i)
a.push_back(CGAL::default_random(100));
a.push_back(CGAL::get_default_random()(100));
std::sort(a.begin(), a.end());
std::cout << "a = ( ";
std::copy(a.begin(), a.end(), std::ostream_iterator<int>(std::cout," "));

View File

@ -60,7 +60,7 @@ using std::atoi;
using std::exit;
using CGAL::Cartesian_matrix;
using CGAL::Random;
using CGAL::default_random;
using CGAL::get_default_random;
using CGAL::sorted_matrix_search;
using CGAL::sorted_matrix_search_traits_adaptor;
@ -108,7 +108,7 @@ main( int argc, char* argv[])
#endif
// generate random seed
random_seed = default_random.get_int( 0, (1 << 30));
random_seed = get_default_random().get_int( 0, (1 << 30));
}
else
random_seed = atoi(argv[4]);

View File

@ -33,6 +33,7 @@ if ( CGAL_FOUND )
create_single_source_cgal_program( "mesh_implicit_domains.cpp" "../examples/Mesh_3/implicit_functions.cpp" )
if( CGAL_ImageIO_USE_ZLIB )
create_single_source_cgal_program( "mesh_3D_image.cpp" )
target_link_libraries(mesh_3D_image ${ZLIB_LIBRARY})
else()
message( STATUS "NOTICE: The example mesh_3D_image.cpp needs CGAL_ImageIO to be configured with ZLIB support, and will not be compiled." )
endif()

View File

@ -146,7 +146,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND AND Boost_F
qt5_wrap_cpp( VOLUME_MOC_OUTFILES ${CMAKE_CURRENT_SOURCE_DIR}/Volume_plane_thread.h )
qt5_wrap_cpp( VOLUME_MOC_OUTFILES ${CMAKE_CURRENT_SOURCE_DIR}/Volume_plane_interface.h )
qt5_add_resources ( RESOURCE_FILES Mesh_3.qrc )
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES Mesh_3.qrc )
# put plugins (which are shared libraries) at the same location as
# executable files
@ -220,7 +220,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND AND Boost_F
Scene_moc.cpp)
#ADD_MSVC_PRECOMPILED_HEADER("StdAfx.h" "StdAfx.cpp" MESH_3_SOURCE_FILES)
LIST(APPEND MESH_3_SOURCE_FILES ${UI_FILES} ${RESOURCE_FILES})
LIST(APPEND MESH_3_SOURCE_FILES ${UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES})
add_executable( Mesh_3 ${MESH_3_SOURCE_FILES} )
qt5_use_modules(Mesh_3 Xml Script OpenGL Svg)
add_to_cached_list( CGAL_EXECUTABLE_TARGETS Mesh_3 )

View File

@ -158,7 +158,7 @@ Mesh_function<D_>::
launch()
{
#ifdef CGAL_MESH_3_INITIAL_POINTS_NO_RANDOM_SHOOTING
CGAL::default_random = CGAL::Random(0);
CGAL::get_default_random() = CGAL::Random(0);
#endif
// Create mesh criteria

View File

@ -84,9 +84,12 @@ if ( CGAL_FOUND )
create_single_source_cgal_program( "mesh_3D_image_with_features.cpp" )
if( CGAL_ImageIO_USE_ZLIB )
create_single_source_cgal_program( "mesh_optimization_example.cpp" )
create_single_source_cgal_program( "mesh_optimization_lloyd_example.cpp" )
create_single_source_cgal_program( "mesh_3D_image.cpp" )
create_single_source_cgal_program( "mesh_3D_image_with_custom_initialization.cpp" )
create_single_source_cgal_program( "mesh_3D_image_variable_size.cpp" )
else()
message( STATUS "NOTICE: The examples mesh_3D_image.cpp, mesh_3D_image_variable_size.cpp, mesh_optimization_example.cpp and mesh_optimization_lloyd_example.cpp need CGAL_ImageIO to be configured with ZLIB support, and will not be compiled." )

View File

@ -424,7 +424,7 @@ void make_mesh_3_impl(C3T3& c3t3,
mesh_options = parameters::internal::Mesh_3_options())
{
#ifdef CGAL_MESH_3_INITIAL_POINTS_NO_RANDOM_SHOOTING
CGAL::default_random = CGAL::Random(0);
CGAL::get_default_random() = CGAL::Random(0);
#endif
// Initialize c3t3

View File

@ -39,7 +39,10 @@ if ( CGAL_FOUND )
create_single_source_cgal_program( "test_mesh_criteria_creation.cpp" )
if(CGAL_ImageIO_USE_ZLIB)
create_single_source_cgal_program( "test_meshing_3D_image.cpp" )
target_link_libraries(test_meshing_3D_image ${ZLIB_LIBRARY})
create_single_source_cgal_program( "test_meshing_3D_gray_image.cpp" )
target_link_libraries(test_meshing_3D_gray_image ${ZLIB_LIBRARY})
else()
message(STATUS "test_meshing_3D_image requires the ZLIB library, and will not be compiled.")
endif()

View File

@ -76,14 +76,14 @@ public:
}
std::cout << "\tSeed is\t"
<< CGAL::default_random.get_seed() << std::endl;
<< CGAL::get_default_random().get_seed() << std::endl;
// Domain
Mesh_domain domain(image,
2.9f, //isovalue
0.f, //value_outside
1e-3, //error_bound
&CGAL::default_random);//random generator for determinism
&CGAL::get_default_random());//random generator for determinism
const CGAL::Mesh_facet_topology topology =
boost::is_same<Concurrency_tag, CGAL::Sequential_tag>::value ?

View File

@ -53,8 +53,8 @@ public:
image.read("data/liver.inr.gz");
std::cout << "\tSeed is\t"
<< CGAL::default_random.get_seed() << std::endl;
Mesh_domain domain(image, 1e-9, &CGAL::default_random);
<< CGAL::get_default_random().get_seed() << std::endl;
Mesh_domain domain(image, 1e-9, &CGAL::get_default_random());
// Set mesh criteria
Facet_criteria facet_criteria(25, 20*image.vx(), 5*image.vx());

View File

@ -61,11 +61,11 @@ struct Implicit_tester : public Tester<K>
// Data generation
//-------------------------------------------------------
std::cout << "\tSeed is\t"
<< CGAL::default_random.get_seed() << std::endl;
<< CGAL::get_default_random().get_seed() << std::endl;
Mesh_domain domain(Implicit_tester<K>::sphere_function,
Sphere_3(CGAL::ORIGIN,2.),
1e-3,
&CGAL::default_random);
&CGAL::get_default_random());
// Set mesh criteria
Facet_criteria facet_criteria(0, 0, 0.3);

View File

@ -56,8 +56,8 @@ struct Polyhedron_tester : public Tester<K>
input.close();
std::cout << "\tSeed is\t"
<< CGAL::default_random.get_seed() << std::endl;
Mesh_domain domain(polyhedron, &CGAL::default_random);
<< CGAL::get_default_random().get_seed() << std::endl;
Mesh_domain domain(polyhedron, &CGAL::get_default_random());
// Set mesh criteria
Facet_criteria facet_criteria(30, 0.2, 0.02);

View File

@ -55,8 +55,8 @@ struct Polyhedron_with_features_tester : public Tester<K>
// Data generation
//-------------------------------------------------------
std::cout << "\tSeed is\t"
<< CGAL::default_random.get_seed() << std::endl;
Mesh_domain domain("data/cube.off", &CGAL::default_random);
<< CGAL::get_default_random().get_seed() << std::endl;
Mesh_domain domain("data/cube.off", &CGAL::get_default_random());
domain.detect_features();
// Set mesh criteria

View File

@ -47,8 +47,8 @@ int main(int argc, char** argv)
Point(0, 0, 1));
std::cout << "\tSeed is\t"
<< CGAL::default_random.get_seed() << std::endl;
Mesh_domain domain(p, &CGAL::default_random);
<< CGAL::get_default_random().get_seed() << std::endl;
Mesh_domain domain(p, &CGAL::get_default_random());
typedef std::vector<K::Point_3> Polyline;
typedef std::vector<Polyline> Polylines;

View File

@ -27,7 +27,273 @@
namespace CGAL {
namespace internal {
CGAL_EXPORT extern const int primes[2000];
const int primes[2000] = {
/*
* Generated in SAGE with:
*
* N = 2000
* p = 2^26
* L = []
* while len(L) < N:
* p = previous_prime(p)
* if GF(p)(2).is_primitive_root():
* L.append(p)
* k = 8
* for i in range(N/k):
* print ' ' + ', '.join (str(p) for p in L[k*i:k*(i+1)]) + ','
*/
67108859, 67108819, 67108763, 67108757, 67108747, 67108739, 67108709, 67108693,
67108669, 67108667, 67108661, 67108597, 67108579, 67108507, 67108493, 67108453,
67108387, 67108373, 67108331, 67108219, 67108187, 67108109, 67108037, 67108003,
67107941, 67107797, 67107787, 67107773, 67107757, 67107749, 67107707, 67107643,
67107541, 67107539, 67107533, 67107461, 67107427, 67107389, 67107323, 67107317,
67107301, 67107253, 67107203, 67107149, 67107043, 67106987, 67106821, 67106813,
67106797, 67106749, 67106717, 67106693, 67106483, 67106477, 67106357, 67106339,
67106323, 67106243, 67106213, 67106189, 67106107, 67106099, 67106093, 67106059,
67105963, 67105933, 67105877, 67105867, 67105811, 67105771, 67105763, 67105699,
67105691, 67105517, 67105459, 67105453, 67105373, 67105349, 67105267, 67105187,
67105141, 67105133, 67105061, 67104997, 67104931, 67104923, 67104893, 67104883,
67104859, 67104803, 67104757, 67104707, 67104691, 67104589, 67104581, 67104571,
67104563, 67104539, 67104517, 67104437, 67104419, 67104379, 67104341, 67104293,
67104277, 67104251, 67104227, 67104139, 67104061, 67104053, 67103963, 67103909,
67103867, 67103851, 67103837, 67103821, 67103731, 67103669, 67103653, 67103587,
67103579, 67103549, 67103507, 67103483, 67103219, 67103173, 67103149, 67103147,
67103107, 67103083, 67103051, 67103027, 67103021, 67102963, 67102949, 67102901,
67102843, 67102733, 67102627, 67102613, 67102531, 67102499, 67102459, 67102397,
67102333, 67102331, 67102283, 67102237, 67102181, 67102163, 67102099, 67102093,
67102069, 67102067, 67102019, 67101997, 67101989, 67101899, 67101883, 67101877,
67101779, 67101739, 67101691, 67101637, 67101613, 67101509, 67101493, 67101491,
67101469, 67101443, 67101413, 67101341, 67101323, 67101299, 67101187, 67101173,
67101053, 67100987, 67100981, 67100963, 67100947, 67100939, 67100909, 67100899,
67100861, 67100851, 67100827, 67100773, 67100731, 67100699, 67100669, 67100659,
67100653, 67100587, 67100459, 67100357, 67100347, 67100179, 67100141, 67100123,
67100101, 67099987, 67099957, 67099931, 67099861, 67099853, 67099829, 67099819,
67099699, 67099589, 67099547, 67099541, 67099517, 67099499, 67099397, 67099387,
67099363, 67099339, 67099267, 67099213, 67099141, 67099133, 67099037, 67098931,
67098923, 67098917, 67098907, 67098827, 67098821, 67098739, 67098653, 67098589,
67098419, 67098389, 67098347, 67098341, 67098323, 67098299, 67098277, 67098259,
67098203, 67098197, 67098179, 67098149, 67098067, 67098029, 67097917, 67097819,
67097813, 67097803, 67097747, 67097699, 67097669, 67097659, 67097579, 67097413,
67097363, 67097339, 67097333, 67097291, 67097269, 67097123, 67097053, 67096987,
67096979, 67096973, 67096907, 67096867, 67096837, 67096693, 67096669, 67096507,
67096499, 67096483, 67096411, 67096387, 67096373, 67096301, 67096109, 67096067,
67096021, 67096013, 67095989, 67095971, 67095893, 67095869, 67095797, 67095731,
67095701, 67095683, 67095667, 67095659, 67095629, 67095499, 67095421, 67095419,
67095349, 67095317, 67095173, 67095139, 67095131, 67095101, 67095037, 67095011,
67094987, 67094981, 67094917, 67094899, 67094891, 67094837, 67094827, 67094723,
67094717, 67094707, 67094701, 67094581, 67094557, 67094507, 67094501, 67094459,
67094437, 67094411, 67094389, 67094309, 67094299, 67094267, 67094141, 67094123,
67094099, 67093979, 67093933, 67093931, 67093861, 67093853, 67093757, 67093723,
67093699, 67093627, 67093619, 67093613, 67093603, 67093597, 67093547, 67093349,
67093307, 67093181, 67093171, 67093163, 67093157, 67093109, 67093069, 67093043,
67093003, 67092997, 67092947, 67092869, 67092821, 67092787, 67092757, 67092749,
67092709, 67092691, 67092643, 67092611, 67092563, 67092539, 67092491, 67092461,
67092419, 67092331, 67092323, 67092301, 67092227, 67092203, 67092197, 67092107,
67091987, 67091939, 67091933, 67091923, 67091797, 67091779, 67091771, 67091669,
67091611, 67091491, 67091477, 67091443, 67091357, 67091341, 67091243, 67091203,
67091149, 67091107, 67091029, 67090979, 67090973, 67090939, 67090861, 67090763,
67090627, 67090613, 67090589, 67090579, 67090549, 67090547, 67090523, 67090459,
67090451, 67090411, 67090403, 67090307, 67090259, 67090229, 67090189, 67090117,
67090099, 67090091, 67090043, 67090027, 67090013, 67089949, 67089829, 67089739,
67089733, 67089707, 67089683, 67089587, 67089541, 67089461, 67089299, 67089283,
67089277, 67089221, 67089059, 67088963, 67088821, 67088797, 67088779, 67088717,
67088683, 67088653, 67088627, 67088621, 67088603, 67088597, 67088573, 67088509,
67088501, 67088453, 67088429, 67088381, 67088347, 67088267, 67088117, 67088093,
67088059, 67087973, 67087957, 67087901, 67087883, 67087859, 67087723, 67087717,
67087637, 67087571, 67087547, 67087459, 67087451, 67087421, 67087277, 67087259,
67087243, 67087187, 67087123, 67087019, 67086949, 67086931, 67086917, 67086893,
67086869, 67086827, 67086757, 67086667, 67086637, 67086629, 67086611, 67086589,
67086421, 67086347, 67086323, 67086317, 67086307, 67086293, 67086259, 67086109,
67086067, 67086053, 67086043, 67086013, 67085939, 67085933, 67085899, 67085869,
67085867, 67085861, 67085819, 67085813, 67085803, 67085771, 67085741, 67085677,
67085531, 67085443, 67085437, 67085429, 67085357, 67085341, 67085267, 67085189,
67085173, 67085171, 67085099, 67085093, 67085003, 67084981, 67084973, 67084931,
67084861, 67084789, 67084757, 67084709, 67084643, 67084637, 67084603, 67084547,
67084517, 67084483, 67084427, 67084349, 67084333, 67084331, 67084309, 67084189,
67084187, 67084139, 67084013, 67083883, 67083859, 67083811, 67083803, 67083787,
67083739, 67083707, 67083629, 67083619, 67083613, 67083539, 67083517, 67083461,
67083437, 67083371, 67083323, 67083221, 67083197, 67083067, 67082989, 67082987,
67082963, 67082933, 67082909, 67082891, 67082861, 67082843, 67082779, 67082707,
67082699, 67082579, 67082549, 67082531, 67082453, 67082363, 67082339, 67082227,
67082189, 67082131, 67082123, 67082101, 67082003, 67081957, 67081829, 67081811,
67081787, 67081741, 67081733, 67081709, 67081691, 67081661, 67081579, 67081499,
67081477, 67081429, 67081283, 67081237, 67081213, 67081211, 67081139, 67081123,
67081051, 67080971, 67080947, 67080917, 67080859, 67080821, 67080803, 67080763,
67080701, 67080653, 67080557, 67080491, 67080437, 67080413, 67080323, 67080179,
67080173, 67080131, 67080107, 67080061, 67079981, 67079963, 67079941, 67079933,
67079917, 67079693, 67079587, 67079491, 67079459, 67079429, 67079347, 67079333,
67079323, 67079317, 67079267, 67079237, 67079219, 67079213, 67079203, 67079149,
67079141, 67079123, 67079083, 67079027, 67078981, 67078931, 67078877, 67078819,
67078813, 67078789, 67078763, 67078643, 67078573, 67078469, 67078387, 67078331,
67078309, 67078301, 67078283, 67078213, 67078181, 67078139, 67078133, 67078069,
67078061, 67078013, 67077947, 67077917, 67077851, 67077827, 67077797, 67077757,
67077643, 67077611, 67077541, 67077539, 67077419, 67077403, 67077379, 67077349,
67077341, 67077299, 67077293, 67077259, 67077181, 67077173, 67077133, 67076899,
67076869, 67076851, 67076843, 67076803, 67076773, 67076741, 67076693, 67076683,
67076677, 67076651, 67076629, 67076627, 67076573, 67076539, 67076413, 67076411,
67076357, 67076341, 67076291, 67076189, 67076147, 67076117, 67076077, 67076069,
67076029, 67075973, 67075949, 67075933, 67075907, 67075867, 67075787, 67075691,
67075669, 67075573, 67075493, 67075373, 67075363, 67075277, 67075243, 67075147,
67075109, 67075091, 67075069, 67075067, 67075037, 67074947, 67074901, 67074859,
67074853, 67074851, 67074829, 67074691, 67074619, 67074613, 67074611, 67074587,
67074523, 67074467, 67074317, 67074307, 67074277, 67074269, 67074179, 67073947,
67073917, 67073899, 67073803, 67073731, 67073707, 67073701, 67073683, 67073651,
67073603, 67073597, 67073579, 67073533, 67073459, 67073387, 67073339, 67073333,
67073323, 67073309, 67073261, 67073197, 67073189, 67073107, 67073051, 67073003,
67072997, 67072979, 67072909, 67072877, 67072781, 67072757, 67072739, 67072693,
67072541, 67072373, 67072363, 67072339, 67072309, 67072283, 67072277, 67072253,
67072139, 67072037, 67071997, 67071989, 67071947, 67071923, 67071899, 67071883,
67071877, 67071821, 67071707, 67071637, 67071547, 67071419, 67071413, 67071317,
67071299, 67071293, 67071157, 67071149, 67071139, 67071061, 67070989, 67070981,
67070909, 67070869, 67070837, 67070827, 67070813, 67070803, 67070749, 67070699,
67070621, 67070573, 67070539, 67070459, 67070357, 67070317, 67070291, 67070261,
67070251, 67070203, 67070053, 67070027, 67069979, 67069819, 67069813, 67069787,
67069781, 67069763, 67069669, 67069661, 67069549, 67069531, 67069469, 67069427,
67069397, 67069339, 67069157, 67069133, 67069109, 67069099, 67069043, 67069021,
67068971, 67068931, 67068787, 67068653, 67068643, 67068629, 67068571, 67068557,
67068539, 67068509, 67068493, 67068371, 67068301, 67068269, 67068259, 67068227,
67068203, 67068187, 67068181, 67068173, 67068163, 67068101, 67067971, 67067933,
67067909, 67067789, 67067779, 67067773, 67067723, 67067629, 67067597, 67067501,
67067453, 67067437, 67067389, 67067387, 67067339, 67067293, 67067269, 67067213,
67067173, 67067171, 67067069, 67067059, 67067029, 67066907, 67066861, 67066859,
67066771, 67066757, 67066723, 67066709, 67066667, 67066619, 67066613, 67066379,
67066277, 67066243, 67066211, 67066157, 67066093, 67066061, 67066019, 67065979,
67065931, 67065917, 67065883, 67065827, 67065787, 67065667, 67065659, 67065653,
67065643, 67065619, 67065563, 67065461, 67065437, 67065389, 67065373, 67065293,
67065283, 67065227, 67065211, 67065157, 67065091, 67064843, 67064827, 67064819,
67064773, 67064771, 67064741, 67064717, 67064693, 67064611, 67064597, 67064587,
67064579, 67064549, 67064467, 67064299, 67064267, 67064237, 67064213, 67064197,
67064171, 67064147, 67064131, 67064093, 67064059, 67063853, 67063813, 67063723,
67063643, 67063637, 67063523, 67063517, 67063397, 67063349, 67063307, 67063189,
67063163, 67063133, 67063123, 67063099, 67063093, 67063069, 67063043, 67063037,
67063019, 67062923, 67062893, 67062883, 67062859, 67062659, 67062629, 67062613,
67062539, 67062509, 67062469, 67062461, 67062379, 67062349, 67062299, 67062221,
67062179, 67062157, 67062067, 67062029, 67062011, 67061987, 67061947, 67061933,
67061909, 67061867, 67061861, 67061789, 67061747, 67061693, 67061627, 67061597,
67061563, 67061531, 67061333, 67061299, 67061227, 67061219, 67061179, 67061173,
67061147, 67061003, 67060997, 67060957, 67060949, 67060933, 67060837, 67060813,
67060627, 67060549, 67060523, 67060517, 67060507, 67060451, 67060421, 67060373,
67060333, 67060307, 67060277, 67060261, 67060229, 67060187, 67060171, 67060141,
67060109, 67060067, 67060043, 67060027, 67060013, 67059989, 67059907, 67059899,
67059869, 67059779, 67059757, 67059749, 67059731, 67059709, 67059701, 67059637,
67059613, 67059581, 67059547, 67059533, 67059523, 67059437, 67059427, 67059259,
67059173, 67059061, 67058963, 67058941, 67058909, 67058899, 67058891, 67058867,
67058843, 67058723, 67058699, 67058669, 67058627, 67058531, 67058389, 67058347,
67058339, 67058323, 67058309, 67058269, 67058227, 67058213, 67058141, 67058003,
67057883, 67057853, 67057819, 67057813, 67057763, 67057733, 67057723, 67057717,
67057709, 67057643, 67057499, 67057493, 67057387, 67057381, 67057379, 67057363,
67057307, 67057147, 67057141, 67056989, 67056971, 67056917, 67056877, 67056763,
67056677, 67056667, 67056659, 67056637, 67056611, 67056581, 67056461, 67056419,
67056371, 67056259, 67056251, 67056179, 67056107, 67056083, 67056053, 67056043,
67056013, 67055957, 67055909, 67055843, 67055789, 67055771, 67055629, 67055539,
67055491, 67055477, 67055467, 67055347, 67055309, 67055299, 67055291, 67055267,
67055243, 67055203, 67055179, 67055147, 67054997, 67054979, 67054907, 67054877,
67054859, 67054763, 67054733, 67054717, 67054541, 67054523, 67054483, 67054411,
67054387, 67054301, 67054213, 67054051, 67054037, 67053997, 67053971, 67053941,
67053893, 67053787, 67053733, 67053659, 67053653, 67053643, 67053629, 67053619,
67053563, 67053557, 67053523, 67053517, 67053419, 67053397, 67053373, 67053317,
67053251, 67053229, 67053197, 67053179, 67053149, 67053037, 67053029, 67052963,
67052939, 67052933, 67052819, 67052813, 67052779, 67052723, 67052677, 67052509,
67052477, 67052467, 67052243, 67052021, 67051979, 67051949, 67051909, 67051883,
67051861, 67051813, 67051811, 67051781, 67051709, 67051651, 67051643, 67051573,
67051571, 67051547, 67051493, 67051379, 67051373, 67051331, 67051253, 67051189,
67051181, 67051099, 67051069, 67051021, 67050979, 67050931, 67050917, 67050869,
67050827, 67050749, 67050707, 67050701, 67050619, 67050611, 67050541, 67050509,
67050443, 67050421, 67050419, 67050371, 67050301, 67050299, 67050251, 67050187,
67050101, 67050077, 67049987, 67049981, 67049963, 67049909, 67049891, 67049867,
67049837, 67049813, 67049747, 67049707, 67049693, 67049629, 67049627, 67049603,
67049573, 67049539, 67049453, 67049413, 67049267, 67049261, 67049251, 67049179,
67049149, 67049141, 67049093, 67049027, 67048963, 67048859, 67048819, 67048757,
67048733, 67048693, 67048627, 67048621, 67048523, 67048469, 67048411, 67048349,
67048277, 67048259, 67048141, 67048123, 67048109, 67047989, 67047859, 67047787,
67047763, 67047749, 67047733, 67047731, 67047683, 67047619, 67047613, 67047611,
67047581, 67047517, 67047509, 67047413, 67047397, 67047283, 67047131, 67047077,
67047061, 67047059, 67047053, 67047037, 67047011, 67046989, 67046939, 67046899,
67046797, 67046779, 67046731, 67046549, 67046531, 67046477, 67046467, 67046437,
67046429, 67046411, 67046387, 67046363, 67046341, 67046333, 67046261, 67046197,
67046107, 67046069, 67046059, 67046051, 67045973, 67045949, 67045907, 67045877,
67045723, 67045613, 67045579, 67045571, 67045549, 67045541, 67045507, 67045403,
67045339, 67045301, 67045267, 67045261, 67045211, 67045189, 67045133, 67045117,
67045109, 67045061, 67045037, 67045019, 67044973, 67044907, 67044829, 67044797,
67044779, 67044773, 67044763, 67044739, 67044541, 67044427, 67044371, 67044347,
67044301, 67044283, 67044203, 67044157, 67044083, 67044077, 67044067, 67044053,
67043981, 67043939, 67043909, 67043813, 67043797, 67043707, 67043507, 67043477,
67043443, 67043243, 67043147, 67043107, 67043083, 67043069, 67043059, 67043051,
67043027, 67042979, 67042973, 67042949, 67042931, 67042709, 67042643, 67042637,
67042589, 67042571, 67042541, 67042523, 67042501, 67042453, 67042427, 67042363,
67042307, 67042301, 67042259, 67042211, 67042091, 67042043, 67041907, 67041893,
67041869, 67041797, 67041749, 67041731, 67041701, 67041613, 67041581, 67041563,
67041547, 67041539, 67041509, 67041467, 67041461, 67041419, 67041371, 67041307,
67041283, 67041269, 67041203, 67041187, 67041179, 67041043, 67040917, 67040893,
67040789, 67040773, 67040723, 67040629, 67040627, 67040621, 67040587, 67040549,
67040509, 67040443, 67040387, 67040381, 67040317, 67040291, 67040261, 67040243,
67040219, 67040203, 67040069, 67040021, 67039997, 67039957, 67039883, 67039877,
67039867, 67039853, 67039811, 67039757, 67039723, 67039699, 67039669, 67039627,
67039613, 67039571, 67039547, 67039501, 67039499, 67039309, 67039307, 67039253,
67039187, 67039139, 67039051, 67039003, 67038947, 67038941, 67038877, 67038869,
67038827, 67038787, 67038739, 67038637, 67038589, 67038557, 67038539, 67038533,
67038427, 67038371, 67038341, 67038299, 67038277, 67038221, 67038197, 67038173,
67038149, 67038133, 67038131, 67038067, 67038029, 67038011, 67037843, 67037837,
67037819, 67037797, 67037771, 67037723, 67037683, 67037627, 67037603, 67037563,
67037483, 67037459, 67037429, 67037389, 67037261, 67037227, 67037213, 67037107,
67037101, 67037053, 67036979, 67036909, 67036901, 67036877, 67036867, 67036843,
67036819, 67036811, 67036747, 67036643, 67036589, 67036547, 67036507, 67036469,
67036397, 67036379, 67036357, 67036259, 67036243, 67036187, 67036181, 67036157,
67036093, 67036027, 67036019, 67035989, 67035949, 67035931, 67035901, 67035803,
67035707, 67035659, 67035653, 67035643, 67035589, 67035499, 67035491, 67035469,
67035413, 67035349, 67035347, 67035307, 67035277, 67035149, 67035107, 67035077,
67034987, 67034819, 67034699, 67034683, 67034677, 67034477, 67034419, 67034381,
67034339, 67034309, 67034293, 67034171, 67034117, 67034069, 67034021, 67033859,
67033763, 67033741, 67033709, 67033699, 67033667, 67033619, 67033613, 67033597,
67033541, 67033507, 67033469, 67033429, 67033403, 67033357, 67033331, 67033283,
67033277, 67033229, 67033157, 67033117, 67033061, 67032997, 67032941, 67032811,
67032803, 67032701, 67032661, 67032653, 67032613, 67032587, 67032541, 67032523,
67032517, 67032491, 67032461, 67032451, 67032443, 67032421, 67032389, 67032349,
67032347, 67032299, 67032221, 67032179, 67032101, 67031941, 67031933, 67031893,
67031851, 67031819, 67031813, 67031749, 67031693, 67031509, 67031483, 67031443,
67031429, 67031387, 67031243, 67031219, 67031203, 67031189, 67031149, 67031147,
67031123, 67031101, 67031059, 67030963, 67030933, 67030907, 67030867, 67030853,
67030757, 67030741, 67030739, 67030693, 67030669, 67030597, 67030517, 67030451,
67030427, 67030333, 67030331, 67030181, 67030069, 67030013, 67029947, 67029931,
67029923, 67029917, 67029901, 67029811, 67029779, 67029763, 67029749, 67029709,
67029707, 67029581, 67029541, 67029509, 67029491, 67029451, 67029437, 67029427,
67029421, 67029373, 67029341, 67029323, 67029293, 67029269, 67029253, 67029229,
67029077, 67029059, 67029043, 67029013, 67028981, 67028917, 67028771, 67028669,
67028653, 67028651, 67028597, 67028557, 67028539, 67028477, 67028413, 67028387,
67028243, 67028197, 67028083, 67028069, 67028021, 67027997, 67027963, 67027949,
67027931, 67027867, 67027861, 67027811, 67027693, 67027627, 67027619, 67027547,
67027507, 67027453, 67027427, 67027339, 67027283, 67027237, 67027189, 67027187,
67027069, 67027027, 67027019, 67027013, 67026979, 67026907, 67026829, 67026811,
67026803, 67026787, 67026643, 67026613, 67026539, 67026469, 67026467, 67026451,
67026437, 67026403, 67026307, 67026299, 67026227, 67026187, 67026139, 67026131,
67026109, 67026107, 67026083, 67026067, 67025971, 67025963, 67025957, 67025843,
67025779, 67025773, 67025723, 67025701, 67025683, 67025669, 67025579, 67025573,
67025531, 67025501, 67025459, 67025411, 67025363, 67025219, 67025213, 67025173,
67025107, 67025051, 67025029, 67024987, 67024957, 67024901, 67024891, 67024733,
67024637, 67024621, 67024613, 67024499, 67024483, 67024429, 67024411, 67024339,
67024157, 67024141, 67024003, 67023989, 67023899, 67023893, 67023779, 67023763,
67023667, 67023653, 67023493, 67023443, 67023421, 67023419, 67023371, 67023349,
67023347, 67023331, 67023293, 67023259, 67023227, 67023211, 67023179, 67023157,
67023139, 67023133, 67023091, 67023059, 67023053, 67023043, 67023037, 67023029,
67022869, 67022819, 67022797, 67022723, 67022707, 67022701, 67022699, 67022693,
67022539, 67022507, 67022477, 67022467, 67022387, 67022261, 67022243, 67022237,
67022213, 67022147, 67022077, 67022027, 67021979, 67021963, 67021901, 67021861,
67021741, 67021739, 67021723, 67021637, 67021621, 67021613, 67021499, 67021469,
67021459, 67021363, 67021301, 67021237, 67021147, 67021139, 67021099, 67021067,
67021043, 67020979, 67020973, 67020917, 67020893, 67020869, 67020797, 67020763,
67020683, 67020589, 67020587, 67020557, 67020491, 67020397, 67020323, 67020299,
67020251, 67020179, 67020077, 67020053, 67020013, 67019963, 67019867, 67019837,
67019819, 67019747, 67019741, 67019653, 67019587, 67019549, 67019483, 67019437,
67019371, 67019299, 67019123, 67019077, 67019027, 67019003, 67018997, 67018843,
67018837, 67018771, 67018733, 67018717, 67018667, 67018613, 67018499, 67018493,
67018429, 67018397, 67018387, 67018309, 67018181, 67018163, 67018141, 67018139,
67018069, 67018051, 67017971, 67017931, 67017803, 67017763, 67017733, 67017707,
67017677, 67017661, 67017659, 67017571, 67017563, 67017547, 67017413, 67017371,
67017299, 67017277, 67017227, 67017211, 67017163, 67017157, 67017107, 67017059,
67016869, 67016821, 67016813, 67016723, 67016717, 67016707, 67016693, 67016627,
67016611, 67016483, 67016437, 67016387, 67016269, 67016197, 67016189, 67016179,
};
static inline
int get_next_lower_prime(int current_prime){
@ -63,8 +329,4 @@ int get_next_lower_prime(int current_prime){
}
}
#ifdef CGAL_HEADER_ONLY
#include <CGAL/primes_impl.h>
#endif // CGAL_HEADER_ONLY
#endif // CGAL_PRIMES_H

View File

@ -1,293 +0,0 @@
// Copyright (c) Max-Planck-Institute Saarbruecken (Germany).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 3 of the License,
// or (at your option) any later version.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL$
// $Id$
//
// Author(s) : Michael Hemmer, Alexander Kobel
#include <CGAL/basic.h>
namespace CGAL {
namespace internal {
const int primes [2000] = {
/*
* Generated in SAGE with:
*
* N = 2000
* p = 2^26
* L = []
* while len(L) < N:
* p = previous_prime(p)
* if GF(p)(2).is_primitive_root():
* L.append(p)
* k = 8
* for i in range(N/k):
* print ' ' + ', '.join (str(p) for p in L[k*i:k*(i+1)]) + ','
*/
67108859, 67108819, 67108763, 67108757, 67108747, 67108739, 67108709, 67108693,
67108669, 67108667, 67108661, 67108597, 67108579, 67108507, 67108493, 67108453,
67108387, 67108373, 67108331, 67108219, 67108187, 67108109, 67108037, 67108003,
67107941, 67107797, 67107787, 67107773, 67107757, 67107749, 67107707, 67107643,
67107541, 67107539, 67107533, 67107461, 67107427, 67107389, 67107323, 67107317,
67107301, 67107253, 67107203, 67107149, 67107043, 67106987, 67106821, 67106813,
67106797, 67106749, 67106717, 67106693, 67106483, 67106477, 67106357, 67106339,
67106323, 67106243, 67106213, 67106189, 67106107, 67106099, 67106093, 67106059,
67105963, 67105933, 67105877, 67105867, 67105811, 67105771, 67105763, 67105699,
67105691, 67105517, 67105459, 67105453, 67105373, 67105349, 67105267, 67105187,
67105141, 67105133, 67105061, 67104997, 67104931, 67104923, 67104893, 67104883,
67104859, 67104803, 67104757, 67104707, 67104691, 67104589, 67104581, 67104571,
67104563, 67104539, 67104517, 67104437, 67104419, 67104379, 67104341, 67104293,
67104277, 67104251, 67104227, 67104139, 67104061, 67104053, 67103963, 67103909,
67103867, 67103851, 67103837, 67103821, 67103731, 67103669, 67103653, 67103587,
67103579, 67103549, 67103507, 67103483, 67103219, 67103173, 67103149, 67103147,
67103107, 67103083, 67103051, 67103027, 67103021, 67102963, 67102949, 67102901,
67102843, 67102733, 67102627, 67102613, 67102531, 67102499, 67102459, 67102397,
67102333, 67102331, 67102283, 67102237, 67102181, 67102163, 67102099, 67102093,
67102069, 67102067, 67102019, 67101997, 67101989, 67101899, 67101883, 67101877,
67101779, 67101739, 67101691, 67101637, 67101613, 67101509, 67101493, 67101491,
67101469, 67101443, 67101413, 67101341, 67101323, 67101299, 67101187, 67101173,
67101053, 67100987, 67100981, 67100963, 67100947, 67100939, 67100909, 67100899,
67100861, 67100851, 67100827, 67100773, 67100731, 67100699, 67100669, 67100659,
67100653, 67100587, 67100459, 67100357, 67100347, 67100179, 67100141, 67100123,
67100101, 67099987, 67099957, 67099931, 67099861, 67099853, 67099829, 67099819,
67099699, 67099589, 67099547, 67099541, 67099517, 67099499, 67099397, 67099387,
67099363, 67099339, 67099267, 67099213, 67099141, 67099133, 67099037, 67098931,
67098923, 67098917, 67098907, 67098827, 67098821, 67098739, 67098653, 67098589,
67098419, 67098389, 67098347, 67098341, 67098323, 67098299, 67098277, 67098259,
67098203, 67098197, 67098179, 67098149, 67098067, 67098029, 67097917, 67097819,
67097813, 67097803, 67097747, 67097699, 67097669, 67097659, 67097579, 67097413,
67097363, 67097339, 67097333, 67097291, 67097269, 67097123, 67097053, 67096987,
67096979, 67096973, 67096907, 67096867, 67096837, 67096693, 67096669, 67096507,
67096499, 67096483, 67096411, 67096387, 67096373, 67096301, 67096109, 67096067,
67096021, 67096013, 67095989, 67095971, 67095893, 67095869, 67095797, 67095731,
67095701, 67095683, 67095667, 67095659, 67095629, 67095499, 67095421, 67095419,
67095349, 67095317, 67095173, 67095139, 67095131, 67095101, 67095037, 67095011,
67094987, 67094981, 67094917, 67094899, 67094891, 67094837, 67094827, 67094723,
67094717, 67094707, 67094701, 67094581, 67094557, 67094507, 67094501, 67094459,
67094437, 67094411, 67094389, 67094309, 67094299, 67094267, 67094141, 67094123,
67094099, 67093979, 67093933, 67093931, 67093861, 67093853, 67093757, 67093723,
67093699, 67093627, 67093619, 67093613, 67093603, 67093597, 67093547, 67093349,
67093307, 67093181, 67093171, 67093163, 67093157, 67093109, 67093069, 67093043,
67093003, 67092997, 67092947, 67092869, 67092821, 67092787, 67092757, 67092749,
67092709, 67092691, 67092643, 67092611, 67092563, 67092539, 67092491, 67092461,
67092419, 67092331, 67092323, 67092301, 67092227, 67092203, 67092197, 67092107,
67091987, 67091939, 67091933, 67091923, 67091797, 67091779, 67091771, 67091669,
67091611, 67091491, 67091477, 67091443, 67091357, 67091341, 67091243, 67091203,
67091149, 67091107, 67091029, 67090979, 67090973, 67090939, 67090861, 67090763,
67090627, 67090613, 67090589, 67090579, 67090549, 67090547, 67090523, 67090459,
67090451, 67090411, 67090403, 67090307, 67090259, 67090229, 67090189, 67090117,
67090099, 67090091, 67090043, 67090027, 67090013, 67089949, 67089829, 67089739,
67089733, 67089707, 67089683, 67089587, 67089541, 67089461, 67089299, 67089283,
67089277, 67089221, 67089059, 67088963, 67088821, 67088797, 67088779, 67088717,
67088683, 67088653, 67088627, 67088621, 67088603, 67088597, 67088573, 67088509,
67088501, 67088453, 67088429, 67088381, 67088347, 67088267, 67088117, 67088093,
67088059, 67087973, 67087957, 67087901, 67087883, 67087859, 67087723, 67087717,
67087637, 67087571, 67087547, 67087459, 67087451, 67087421, 67087277, 67087259,
67087243, 67087187, 67087123, 67087019, 67086949, 67086931, 67086917, 67086893,
67086869, 67086827, 67086757, 67086667, 67086637, 67086629, 67086611, 67086589,
67086421, 67086347, 67086323, 67086317, 67086307, 67086293, 67086259, 67086109,
67086067, 67086053, 67086043, 67086013, 67085939, 67085933, 67085899, 67085869,
67085867, 67085861, 67085819, 67085813, 67085803, 67085771, 67085741, 67085677,
67085531, 67085443, 67085437, 67085429, 67085357, 67085341, 67085267, 67085189,
67085173, 67085171, 67085099, 67085093, 67085003, 67084981, 67084973, 67084931,
67084861, 67084789, 67084757, 67084709, 67084643, 67084637, 67084603, 67084547,
67084517, 67084483, 67084427, 67084349, 67084333, 67084331, 67084309, 67084189,
67084187, 67084139, 67084013, 67083883, 67083859, 67083811, 67083803, 67083787,
67083739, 67083707, 67083629, 67083619, 67083613, 67083539, 67083517, 67083461,
67083437, 67083371, 67083323, 67083221, 67083197, 67083067, 67082989, 67082987,
67082963, 67082933, 67082909, 67082891, 67082861, 67082843, 67082779, 67082707,
67082699, 67082579, 67082549, 67082531, 67082453, 67082363, 67082339, 67082227,
67082189, 67082131, 67082123, 67082101, 67082003, 67081957, 67081829, 67081811,
67081787, 67081741, 67081733, 67081709, 67081691, 67081661, 67081579, 67081499,
67081477, 67081429, 67081283, 67081237, 67081213, 67081211, 67081139, 67081123,
67081051, 67080971, 67080947, 67080917, 67080859, 67080821, 67080803, 67080763,
67080701, 67080653, 67080557, 67080491, 67080437, 67080413, 67080323, 67080179,
67080173, 67080131, 67080107, 67080061, 67079981, 67079963, 67079941, 67079933,
67079917, 67079693, 67079587, 67079491, 67079459, 67079429, 67079347, 67079333,
67079323, 67079317, 67079267, 67079237, 67079219, 67079213, 67079203, 67079149,
67079141, 67079123, 67079083, 67079027, 67078981, 67078931, 67078877, 67078819,
67078813, 67078789, 67078763, 67078643, 67078573, 67078469, 67078387, 67078331,
67078309, 67078301, 67078283, 67078213, 67078181, 67078139, 67078133, 67078069,
67078061, 67078013, 67077947, 67077917, 67077851, 67077827, 67077797, 67077757,
67077643, 67077611, 67077541, 67077539, 67077419, 67077403, 67077379, 67077349,
67077341, 67077299, 67077293, 67077259, 67077181, 67077173, 67077133, 67076899,
67076869, 67076851, 67076843, 67076803, 67076773, 67076741, 67076693, 67076683,
67076677, 67076651, 67076629, 67076627, 67076573, 67076539, 67076413, 67076411,
67076357, 67076341, 67076291, 67076189, 67076147, 67076117, 67076077, 67076069,
67076029, 67075973, 67075949, 67075933, 67075907, 67075867, 67075787, 67075691,
67075669, 67075573, 67075493, 67075373, 67075363, 67075277, 67075243, 67075147,
67075109, 67075091, 67075069, 67075067, 67075037, 67074947, 67074901, 67074859,
67074853, 67074851, 67074829, 67074691, 67074619, 67074613, 67074611, 67074587,
67074523, 67074467, 67074317, 67074307, 67074277, 67074269, 67074179, 67073947,
67073917, 67073899, 67073803, 67073731, 67073707, 67073701, 67073683, 67073651,
67073603, 67073597, 67073579, 67073533, 67073459, 67073387, 67073339, 67073333,
67073323, 67073309, 67073261, 67073197, 67073189, 67073107, 67073051, 67073003,
67072997, 67072979, 67072909, 67072877, 67072781, 67072757, 67072739, 67072693,
67072541, 67072373, 67072363, 67072339, 67072309, 67072283, 67072277, 67072253,
67072139, 67072037, 67071997, 67071989, 67071947, 67071923, 67071899, 67071883,
67071877, 67071821, 67071707, 67071637, 67071547, 67071419, 67071413, 67071317,
67071299, 67071293, 67071157, 67071149, 67071139, 67071061, 67070989, 67070981,
67070909, 67070869, 67070837, 67070827, 67070813, 67070803, 67070749, 67070699,
67070621, 67070573, 67070539, 67070459, 67070357, 67070317, 67070291, 67070261,
67070251, 67070203, 67070053, 67070027, 67069979, 67069819, 67069813, 67069787,
67069781, 67069763, 67069669, 67069661, 67069549, 67069531, 67069469, 67069427,
67069397, 67069339, 67069157, 67069133, 67069109, 67069099, 67069043, 67069021,
67068971, 67068931, 67068787, 67068653, 67068643, 67068629, 67068571, 67068557,
67068539, 67068509, 67068493, 67068371, 67068301, 67068269, 67068259, 67068227,
67068203, 67068187, 67068181, 67068173, 67068163, 67068101, 67067971, 67067933,
67067909, 67067789, 67067779, 67067773, 67067723, 67067629, 67067597, 67067501,
67067453, 67067437, 67067389, 67067387, 67067339, 67067293, 67067269, 67067213,
67067173, 67067171, 67067069, 67067059, 67067029, 67066907, 67066861, 67066859,
67066771, 67066757, 67066723, 67066709, 67066667, 67066619, 67066613, 67066379,
67066277, 67066243, 67066211, 67066157, 67066093, 67066061, 67066019, 67065979,
67065931, 67065917, 67065883, 67065827, 67065787, 67065667, 67065659, 67065653,
67065643, 67065619, 67065563, 67065461, 67065437, 67065389, 67065373, 67065293,
67065283, 67065227, 67065211, 67065157, 67065091, 67064843, 67064827, 67064819,
67064773, 67064771, 67064741, 67064717, 67064693, 67064611, 67064597, 67064587,
67064579, 67064549, 67064467, 67064299, 67064267, 67064237, 67064213, 67064197,
67064171, 67064147, 67064131, 67064093, 67064059, 67063853, 67063813, 67063723,
67063643, 67063637, 67063523, 67063517, 67063397, 67063349, 67063307, 67063189,
67063163, 67063133, 67063123, 67063099, 67063093, 67063069, 67063043, 67063037,
67063019, 67062923, 67062893, 67062883, 67062859, 67062659, 67062629, 67062613,
67062539, 67062509, 67062469, 67062461, 67062379, 67062349, 67062299, 67062221,
67062179, 67062157, 67062067, 67062029, 67062011, 67061987, 67061947, 67061933,
67061909, 67061867, 67061861, 67061789, 67061747, 67061693, 67061627, 67061597,
67061563, 67061531, 67061333, 67061299, 67061227, 67061219, 67061179, 67061173,
67061147, 67061003, 67060997, 67060957, 67060949, 67060933, 67060837, 67060813,
67060627, 67060549, 67060523, 67060517, 67060507, 67060451, 67060421, 67060373,
67060333, 67060307, 67060277, 67060261, 67060229, 67060187, 67060171, 67060141,
67060109, 67060067, 67060043, 67060027, 67060013, 67059989, 67059907, 67059899,
67059869, 67059779, 67059757, 67059749, 67059731, 67059709, 67059701, 67059637,
67059613, 67059581, 67059547, 67059533, 67059523, 67059437, 67059427, 67059259,
67059173, 67059061, 67058963, 67058941, 67058909, 67058899, 67058891, 67058867,
67058843, 67058723, 67058699, 67058669, 67058627, 67058531, 67058389, 67058347,
67058339, 67058323, 67058309, 67058269, 67058227, 67058213, 67058141, 67058003,
67057883, 67057853, 67057819, 67057813, 67057763, 67057733, 67057723, 67057717,
67057709, 67057643, 67057499, 67057493, 67057387, 67057381, 67057379, 67057363,
67057307, 67057147, 67057141, 67056989, 67056971, 67056917, 67056877, 67056763,
67056677, 67056667, 67056659, 67056637, 67056611, 67056581, 67056461, 67056419,
67056371, 67056259, 67056251, 67056179, 67056107, 67056083, 67056053, 67056043,
67056013, 67055957, 67055909, 67055843, 67055789, 67055771, 67055629, 67055539,
67055491, 67055477, 67055467, 67055347, 67055309, 67055299, 67055291, 67055267,
67055243, 67055203, 67055179, 67055147, 67054997, 67054979, 67054907, 67054877,
67054859, 67054763, 67054733, 67054717, 67054541, 67054523, 67054483, 67054411,
67054387, 67054301, 67054213, 67054051, 67054037, 67053997, 67053971, 67053941,
67053893, 67053787, 67053733, 67053659, 67053653, 67053643, 67053629, 67053619,
67053563, 67053557, 67053523, 67053517, 67053419, 67053397, 67053373, 67053317,
67053251, 67053229, 67053197, 67053179, 67053149, 67053037, 67053029, 67052963,
67052939, 67052933, 67052819, 67052813, 67052779, 67052723, 67052677, 67052509,
67052477, 67052467, 67052243, 67052021, 67051979, 67051949, 67051909, 67051883,
67051861, 67051813, 67051811, 67051781, 67051709, 67051651, 67051643, 67051573,
67051571, 67051547, 67051493, 67051379, 67051373, 67051331, 67051253, 67051189,
67051181, 67051099, 67051069, 67051021, 67050979, 67050931, 67050917, 67050869,
67050827, 67050749, 67050707, 67050701, 67050619, 67050611, 67050541, 67050509,
67050443, 67050421, 67050419, 67050371, 67050301, 67050299, 67050251, 67050187,
67050101, 67050077, 67049987, 67049981, 67049963, 67049909, 67049891, 67049867,
67049837, 67049813, 67049747, 67049707, 67049693, 67049629, 67049627, 67049603,
67049573, 67049539, 67049453, 67049413, 67049267, 67049261, 67049251, 67049179,
67049149, 67049141, 67049093, 67049027, 67048963, 67048859, 67048819, 67048757,
67048733, 67048693, 67048627, 67048621, 67048523, 67048469, 67048411, 67048349,
67048277, 67048259, 67048141, 67048123, 67048109, 67047989, 67047859, 67047787,
67047763, 67047749, 67047733, 67047731, 67047683, 67047619, 67047613, 67047611,
67047581, 67047517, 67047509, 67047413, 67047397, 67047283, 67047131, 67047077,
67047061, 67047059, 67047053, 67047037, 67047011, 67046989, 67046939, 67046899,
67046797, 67046779, 67046731, 67046549, 67046531, 67046477, 67046467, 67046437,
67046429, 67046411, 67046387, 67046363, 67046341, 67046333, 67046261, 67046197,
67046107, 67046069, 67046059, 67046051, 67045973, 67045949, 67045907, 67045877,
67045723, 67045613, 67045579, 67045571, 67045549, 67045541, 67045507, 67045403,
67045339, 67045301, 67045267, 67045261, 67045211, 67045189, 67045133, 67045117,
67045109, 67045061, 67045037, 67045019, 67044973, 67044907, 67044829, 67044797,
67044779, 67044773, 67044763, 67044739, 67044541, 67044427, 67044371, 67044347,
67044301, 67044283, 67044203, 67044157, 67044083, 67044077, 67044067, 67044053,
67043981, 67043939, 67043909, 67043813, 67043797, 67043707, 67043507, 67043477,
67043443, 67043243, 67043147, 67043107, 67043083, 67043069, 67043059, 67043051,
67043027, 67042979, 67042973, 67042949, 67042931, 67042709, 67042643, 67042637,
67042589, 67042571, 67042541, 67042523, 67042501, 67042453, 67042427, 67042363,
67042307, 67042301, 67042259, 67042211, 67042091, 67042043, 67041907, 67041893,
67041869, 67041797, 67041749, 67041731, 67041701, 67041613, 67041581, 67041563,
67041547, 67041539, 67041509, 67041467, 67041461, 67041419, 67041371, 67041307,
67041283, 67041269, 67041203, 67041187, 67041179, 67041043, 67040917, 67040893,
67040789, 67040773, 67040723, 67040629, 67040627, 67040621, 67040587, 67040549,
67040509, 67040443, 67040387, 67040381, 67040317, 67040291, 67040261, 67040243,
67040219, 67040203, 67040069, 67040021, 67039997, 67039957, 67039883, 67039877,
67039867, 67039853, 67039811, 67039757, 67039723, 67039699, 67039669, 67039627,
67039613, 67039571, 67039547, 67039501, 67039499, 67039309, 67039307, 67039253,
67039187, 67039139, 67039051, 67039003, 67038947, 67038941, 67038877, 67038869,
67038827, 67038787, 67038739, 67038637, 67038589, 67038557, 67038539, 67038533,
67038427, 67038371, 67038341, 67038299, 67038277, 67038221, 67038197, 67038173,
67038149, 67038133, 67038131, 67038067, 67038029, 67038011, 67037843, 67037837,
67037819, 67037797, 67037771, 67037723, 67037683, 67037627, 67037603, 67037563,
67037483, 67037459, 67037429, 67037389, 67037261, 67037227, 67037213, 67037107,
67037101, 67037053, 67036979, 67036909, 67036901, 67036877, 67036867, 67036843,
67036819, 67036811, 67036747, 67036643, 67036589, 67036547, 67036507, 67036469,
67036397, 67036379, 67036357, 67036259, 67036243, 67036187, 67036181, 67036157,
67036093, 67036027, 67036019, 67035989, 67035949, 67035931, 67035901, 67035803,
67035707, 67035659, 67035653, 67035643, 67035589, 67035499, 67035491, 67035469,
67035413, 67035349, 67035347, 67035307, 67035277, 67035149, 67035107, 67035077,
67034987, 67034819, 67034699, 67034683, 67034677, 67034477, 67034419, 67034381,
67034339, 67034309, 67034293, 67034171, 67034117, 67034069, 67034021, 67033859,
67033763, 67033741, 67033709, 67033699, 67033667, 67033619, 67033613, 67033597,
67033541, 67033507, 67033469, 67033429, 67033403, 67033357, 67033331, 67033283,
67033277, 67033229, 67033157, 67033117, 67033061, 67032997, 67032941, 67032811,
67032803, 67032701, 67032661, 67032653, 67032613, 67032587, 67032541, 67032523,
67032517, 67032491, 67032461, 67032451, 67032443, 67032421, 67032389, 67032349,
67032347, 67032299, 67032221, 67032179, 67032101, 67031941, 67031933, 67031893,
67031851, 67031819, 67031813, 67031749, 67031693, 67031509, 67031483, 67031443,
67031429, 67031387, 67031243, 67031219, 67031203, 67031189, 67031149, 67031147,
67031123, 67031101, 67031059, 67030963, 67030933, 67030907, 67030867, 67030853,
67030757, 67030741, 67030739, 67030693, 67030669, 67030597, 67030517, 67030451,
67030427, 67030333, 67030331, 67030181, 67030069, 67030013, 67029947, 67029931,
67029923, 67029917, 67029901, 67029811, 67029779, 67029763, 67029749, 67029709,
67029707, 67029581, 67029541, 67029509, 67029491, 67029451, 67029437, 67029427,
67029421, 67029373, 67029341, 67029323, 67029293, 67029269, 67029253, 67029229,
67029077, 67029059, 67029043, 67029013, 67028981, 67028917, 67028771, 67028669,
67028653, 67028651, 67028597, 67028557, 67028539, 67028477, 67028413, 67028387,
67028243, 67028197, 67028083, 67028069, 67028021, 67027997, 67027963, 67027949,
67027931, 67027867, 67027861, 67027811, 67027693, 67027627, 67027619, 67027547,
67027507, 67027453, 67027427, 67027339, 67027283, 67027237, 67027189, 67027187,
67027069, 67027027, 67027019, 67027013, 67026979, 67026907, 67026829, 67026811,
67026803, 67026787, 67026643, 67026613, 67026539, 67026469, 67026467, 67026451,
67026437, 67026403, 67026307, 67026299, 67026227, 67026187, 67026139, 67026131,
67026109, 67026107, 67026083, 67026067, 67025971, 67025963, 67025957, 67025843,
67025779, 67025773, 67025723, 67025701, 67025683, 67025669, 67025579, 67025573,
67025531, 67025501, 67025459, 67025411, 67025363, 67025219, 67025213, 67025173,
67025107, 67025051, 67025029, 67024987, 67024957, 67024901, 67024891, 67024733,
67024637, 67024621, 67024613, 67024499, 67024483, 67024429, 67024411, 67024339,
67024157, 67024141, 67024003, 67023989, 67023899, 67023893, 67023779, 67023763,
67023667, 67023653, 67023493, 67023443, 67023421, 67023419, 67023371, 67023349,
67023347, 67023331, 67023293, 67023259, 67023227, 67023211, 67023179, 67023157,
67023139, 67023133, 67023091, 67023059, 67023053, 67023043, 67023037, 67023029,
67022869, 67022819, 67022797, 67022723, 67022707, 67022701, 67022699, 67022693,
67022539, 67022507, 67022477, 67022467, 67022387, 67022261, 67022243, 67022237,
67022213, 67022147, 67022077, 67022027, 67021979, 67021963, 67021901, 67021861,
67021741, 67021739, 67021723, 67021637, 67021621, 67021613, 67021499, 67021469,
67021459, 67021363, 67021301, 67021237, 67021147, 67021139, 67021099, 67021067,
67021043, 67020979, 67020973, 67020917, 67020893, 67020869, 67020797, 67020763,
67020683, 67020589, 67020587, 67020557, 67020491, 67020397, 67020323, 67020299,
67020251, 67020179, 67020077, 67020053, 67020013, 67019963, 67019867, 67019837,
67019819, 67019747, 67019741, 67019653, 67019587, 67019549, 67019483, 67019437,
67019371, 67019299, 67019123, 67019077, 67019027, 67019003, 67018997, 67018843,
67018837, 67018771, 67018733, 67018717, 67018667, 67018613, 67018499, 67018493,
67018429, 67018397, 67018387, 67018309, 67018181, 67018163, 67018141, 67018139,
67018069, 67018051, 67017971, 67017931, 67017803, 67017763, 67017733, 67017707,
67017677, 67017661, 67017659, 67017571, 67017563, 67017547, 67017413, 67017371,
67017299, 67017277, 67017227, 67017211, 67017163, 67017157, 67017107, 67017059,
67016869, 67016821, 67016813, 67016723, 67016717, 67016707, 67016693, 67016627,
67016611, 67016483, 67016437, 67016387, 67016269, 67016197, 67016189, 67016179,
};
} // namespace internal
} // namespace CGAL

View File

@ -1,25 +0,0 @@
// Copyright (c) Max-Planck-Institute Saarbruecken (Germany).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 3 of the License,
// or (at your option) any later version.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL$
// $Id$
//
// Author(s) : Michael Hemmer
#ifndef CGAL_HEADER_ONLY
#include <CGAL/primes.h>
#include <CGAL/primes_impl.h>
#endif

View File

@ -143,7 +143,7 @@ inline double to_double(const SPolynomial<RT>& p)
template <class RT>
std::ostream& operator<<(std::ostream& os, const SPolynomial<RT>& p)
{
switch( os.iword(CGAL::IO::mode) ) {
switch( get_mode(os) ) {
case CGAL::IO::ASCII :
os << p.m() << " " << p.n(); break;
case CGAL::IO::BINARY :
@ -157,7 +157,7 @@ std::ostream& operator<<(std::ostream& os, const SPolynomial<RT>& p)
template <class RT>
std::istream& operator>>(std::istream& is, SPolynomial<RT>& p)
{ RT m,n;
switch( is.iword(CGAL::IO::mode) ){
switch( get_mode(is) ){
case CGAL::IO::ASCII :
is >> m >> n; p = SPolynomial<RT>(m,n); break;
case CGAL::IO::BINARY :
@ -308,7 +308,7 @@ CheckPoint checkrep() const
template <class RT>
std::ostream& operator<<(std::ostream& os, const Extended_point<RT>& p)
{ switch( os.iword(CGAL::IO::mode) ) {
{ switch( get_mode(os) ) {
case CGAL::IO::ASCII :
os << p.hx() << " " << p.hy() << " " << p.hw(); break;
case CGAL::IO::BINARY :
@ -326,7 +326,7 @@ std::ostream& operator<<(std::ostream& os, const Extended_point<RT>& p)
template <class RT>
std::istream& operator>>(std::istream& is, Extended_point<RT>& p)
{ SPolynomial<RT> x,y; RT w;
switch( is.iword(CGAL::IO::mode) ){
switch( get_mode(is) ){
case CGAL::IO::ASCII :
is >> x >> y >> w; break;
case CGAL::IO::BINARY :

View File

@ -122,8 +122,8 @@ to output |H| to |os|.}*/
vn(Base::number_of_vertices()),
en(Base::number_of_halfedges()),
fn(Base::number_of_faces())
{ verbose = (out.iword(CGAL::IO::mode) != CGAL::IO::ASCII &&
out.iword(CGAL::IO::mode) != CGAL::IO::BINARY);
{ verbose = (get_mode(out) != CGAL::IO::ASCII &&
get_mode(out) != CGAL::IO::BINARY);
}
@ -135,8 +135,8 @@ PM_io_parser(std::ostream& os, const PMDEC& D)
vn(Base::number_of_vertices()),
en(Base::number_of_halfedges()),
fn(Base::number_of_faces())
{ verbose = (out.iword(CGAL::IO::mode) != CGAL::IO::ASCII &&
out.iword(CGAL::IO::mode) != CGAL::IO::BINARY);
{ verbose = (get_mode(out) != CGAL::IO::ASCII &&
get_mode(out) != CGAL::IO::BINARY);
}

Some files were not shown because too many files have changed in this diff Show More