mirror of https://github.com/CGAL/cgal
Merge branch 'CGAL_headers_only_step1-gdamiand_cjamin-old' into CGAL_headers_only_step1-gdamiand_cjamin
This commit is contained in:
commit
e21ef313c0
|
|
@ -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)
|
||||
|
|
@ -87,7 +89,7 @@ else (CGAL_FOUND AND CGAL_CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLV
|
|||
|
||||
if(NOT QGLVIEWER_FOUND)
|
||||
set(AABB_MISSING_DEPS "QGLViewer, ${AABB_MISSING_DEPS}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "NOTICE: This demo requires ${AABB_MISSING_DEPS}and will not be compiled.")
|
||||
|
||||
|
|
|
|||
|
|
@ -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_);
|
||||
|
|
|
|||
|
|
@ -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_);
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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} )
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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() );
|
||||
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -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() );
|
||||
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 ==================================================================
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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]) );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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()).
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
message("Configuring libCGAL_Core")
|
||||
|
||||
|
||||
use_essential_libs()
|
||||
|
||||
include_directories (SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS})
|
||||
|
|
@ -9,12 +9,14 @@ add_definitions(${CGAL_3RD_PARTY_DEFINITIONS})
|
|||
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} )
|
||||
|
||||
add_dependencies( CGAL_Core CGAL )
|
||||
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 )
|
||||
endif()
|
||||
|
||||
message("libCGAL_Core is configured")
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
message("libCGAL_ImageIO is configured")
|
||||
|
||||
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()
|
||||
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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 ) ;
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 ##
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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} )
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
||||
|
|
|
|||
|
|
@ -4,12 +4,14 @@
|
|||
# This file is loaded by cmake via the command "find_package(CGAL)"
|
||||
#
|
||||
# This file correspond to a possibly out-of-sources CGAL configuration, thus the actual location
|
||||
# must be given by the cmake variable or enviroment variable CGAL_DIR.
|
||||
# must be given by the cmake variable or enviroment variable CGAL_DIR.
|
||||
|
||||
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@" )
|
||||
|
|
@ -109,7 +112,7 @@ else()
|
|||
set( CHECK_CGAL_COMPONENT_MSG_ON_ERROR TRUE )
|
||||
set( CHECK_CGAL_COMPONENT_ERROR_TYPE STATUS )
|
||||
set( CHECK_CGAL_COMPONENT_ERROR_TITLE "NOTICE:" )
|
||||
else()
|
||||
else()
|
||||
set( CHECK_CGAL_COMPONENT_MSG_ON_ERROR FALSE )
|
||||
endif()
|
||||
endif()
|
||||
|
|
@ -124,10 +127,53 @@ macro(check_cgal_component COMPONENT)
|
|||
if ( "${CGAL_LIB}" STREQUAL "CGAL" )
|
||||
set( CGAL_FOUND TRUE )
|
||||
set( CHECK_CGAL_ERROR_TAIL "" )
|
||||
else()
|
||||
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." )
|
||||
|
|
@ -136,12 +182,12 @@ macro(check_cgal_component COMPONENT)
|
|||
set( ${CGAL_LIB}_FOUND FALSE )
|
||||
set( CHECK_${CGAL_LIB}_ERROR_TAIL " Please configure CGAL using WITH_${CGAL_LIB}=ON." )
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if ( NOT ${CGAL_LIB}_FOUND AND CHECK_CGAL_COMPONENT_MSG_ON_ERROR )
|
||||
message( ${CHECK_CGAL_COMPONENT_ERROR_TYPE} "${CHECK_CGAL_COMPONENT_ERROR_TITLE} The ${CGAL_LIB} library was not configured.${CHECK_${CGAL_LIB}_ERROR_TAIL}" )
|
||||
endif()
|
||||
|
||||
|
||||
endmacro()
|
||||
|
||||
check_cgal_component("CGAL")
|
||||
|
|
|
|||
|
|
@ -4,12 +4,14 @@
|
|||
# This file is loaded by cmake via the command "find_package(CGAL)"
|
||||
#
|
||||
# This file correspond to a CGAL installation with "make install", thus the actual location
|
||||
# must be given by the cmake variable or enviroment variable CGAL_DIR.
|
||||
# must be given by the cmake variable or enviroment variable CGAL_DIR.
|
||||
|
||||
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 )
|
||||
|
|
@ -53,7 +56,7 @@ else()
|
|||
set( CHECK_CGAL_COMPONENT_MSG_ON_ERROR TRUE )
|
||||
set( CHECK_CGAL_COMPONENT_ERROR_TYPE STATUS )
|
||||
set( CHECK_CGAL_COMPONENT_ERROR_TITLE "NOTICE:" )
|
||||
else()
|
||||
else()
|
||||
set( CHECK_CGAL_COMPONENT_MSG_ON_ERROR FALSE )
|
||||
endif()
|
||||
endif()
|
||||
|
|
@ -72,16 +75,63 @@ macro(check_cgal_component COMPONENT)
|
|||
# include config file
|
||||
include(${CGAL_CONFIG_DIR}/CGALLibConfig.cmake)
|
||||
set( CHECK_CGAL_ERROR_TAIL "" )
|
||||
else()
|
||||
if (EXISTS ${CGAL_CONFIG_DIR}/${CGAL_LIB}LibConfig.cmake)
|
||||
else()
|
||||
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." )
|
||||
|
|
@ -90,12 +140,12 @@ macro(check_cgal_component COMPONENT)
|
|||
set( ${CGAL_LIB}_FOUND FALSE )
|
||||
set( CHECK_${CGAL_LIB}_ERROR_TAIL " Please configure CGAL using WITH_${CGAL_LIB}=ON." )
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if ( NOT ${CGAL_LIB}_FOUND AND CHECK_CGAL_COMPONENT_MSG_ON_ERROR )
|
||||
message( ${CHECK_CGAL_COMPONENT_ERROR_TYPE} "${CHECK_CGAL_COMPONENT_ERROR_TITLE} The ${CGAL_LIB} library was not configured.${CHECK_${CGAL_LIB}_ERROR_TAIL}" )
|
||||
endif()
|
||||
|
||||
|
||||
endmacro()
|
||||
|
||||
check_cgal_component("CGAL")
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,10 @@ add_definitions(${CGAL_3RD_PARTY_DEFINITIONS})
|
|||
|
||||
link_directories(${CGAL_3RD_PARTY_LIBRARIES_DIRS})
|
||||
|
||||
collect_cgal_library(CGAL "")
|
||||
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")
|
||||
|
|
|
|||
|
|
@ -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 "")
|
||||
|
|
@ -31,8 +34,8 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES)
|
|||
set(CGAL_LIB_PREFIX "lib")
|
||||
endif()
|
||||
|
||||
set(RELEASE_MANGLED_NAME "${CGAL_LIB_PREFIX}${LIBRARY_NAME}-${CGAL_TOOLSET}-mt-${CGAL_FULL_VERSION}" )
|
||||
set(DEBUG_MANGLED_NAME "${CGAL_LIB_PREFIX}${LIBRARY_NAME}-${CGAL_TOOLSET}-mt-gd-${CGAL_FULL_VERSION}" )
|
||||
set(RELEASE_MANGLED_NAME "${CGAL_LIB_PREFIX}${LIBRARY_NAME}-${CGAL_TOOLSET}-mt-${CGAL_FULL_VERSION}" )
|
||||
set(DEBUG_MANGLED_NAME "${CGAL_LIB_PREFIX}${LIBRARY_NAME}-${CGAL_TOOLSET}-mt-gd-${CGAL_FULL_VERSION}" )
|
||||
|
||||
if(CGAL_BUILD_SHARED_LIBS AND WIN32)
|
||||
configure_file(${CGAL_INSTALLATION_PACKAGE_DIR}/src/CGAL_libs_verinfo.rc.in ${LIBRARY_NAME}_verinfo.rc @ONLY)
|
||||
|
|
@ -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 ( 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 (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\" )
|
||||
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 )
|
||||
|
|
@ -121,8 +134,8 @@ add_subdirectory(CGAL)
|
|||
|
||||
# search libs
|
||||
set(CGAL_CONFIGURED_LIBRARIES "")
|
||||
|
||||
foreach(package ${CGAL_CONFIGURED_PACKAGES})
|
||||
|
||||
foreach(package ${CGAL_CONFIGURED_PACKAGES})
|
||||
file(GLOB CONFIGURED_LIBS_IN_PACKAGE ${package}/src/CGAL_*/CMakeLists.txt)
|
||||
list(SORT CONFIGURED_LIBS_IN_PACKAGE)
|
||||
foreach (libconfigfile ${CONFIGURED_LIBS_IN_PACKAGE})
|
||||
|
|
@ -139,8 +152,8 @@ foreach(package ${CGAL_CONFIGURED_PACKAGES})
|
|||
cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_DEFINITIONS "" )
|
||||
cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_INCLUDE_DIRS "" )
|
||||
cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES "" )
|
||||
cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES_DIRS "" )
|
||||
if (${CGAL_CONFIGURED_LIBRARY_NAME} STREQUAL "CGAL_Core")
|
||||
cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES_DIRS "" )
|
||||
if (${CGAL_CONFIGURED_LIBRARY_NAME} STREQUAL "CGAL_Core")
|
||||
if (NOT CGAL_NO_CORE)
|
||||
configure_component( ${package}/src/${CGAL_CONFIGURED_LIBRARY_NAME} ${CGAL_CONFIGURED_LIBRARY_NAME})
|
||||
else(NOT CGAL_NO_CORE)
|
||||
|
|
@ -155,17 +168,17 @@ foreach(package ${CGAL_CONFIGURED_PACKAGES})
|
|||
cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_DEFINITIONS )
|
||||
cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_INCLUDE_DIRS )
|
||||
cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES )
|
||||
cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES_DIRS)
|
||||
cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES_DIRS)
|
||||
|
||||
else()
|
||||
|
||||
else()
|
||||
|
||||
list(APPEND CGAL_CONFIGURED_LIBRARIES CGAL)
|
||||
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
if (NOT CGAL_CONFIGURED_LIBRARIES)
|
||||
if (NOT CGAL_CONFIGURED_LIBRARIES)
|
||||
message(FATAL_ERROR "No component library in configured packages found. Please fix package-file.")
|
||||
endif()
|
||||
|
||||
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 :
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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," "));
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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." )
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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 ?
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
//
|
||||
// Author(s) : Michael Seel <seel@mpi-sb.mpg.de>
|
||||
#ifndef CGAL_FILTERED_EXTENDED_HOMOGENEOUS_H
|
||||
|
|
@ -81,14 +81,14 @@ public:
|
|||
{ return SPolynomial<RT>(_m-p._m,_n-p._n); }
|
||||
SPolynomial<RT> operator-() const
|
||||
{ return SPolynomial<RT>(-_m,-_n); }
|
||||
void operator /= (const RT& c)
|
||||
{ _m /= c; _n /= c; }
|
||||
void operator /= (const RT& c)
|
||||
{ _m /= c; _n /= c; }
|
||||
const RT& operator[](int i) { return (i%2 ? _n : _m); }
|
||||
const RT& operator[](int i) const { return (i%2 ? _n : _m); }
|
||||
bool is_zero() const { return (_m==0 && _n==0); }
|
||||
int sign() const
|
||||
{ if ( _m != 0 ) return CGAL_NTS sign(_m);
|
||||
return CGAL_NTS sign(_n);
|
||||
{ if ( _m != 0 ) return CGAL_NTS sign(_m);
|
||||
return CGAL_NTS sign(_n);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -104,8 +104,8 @@ template <class RT> RT SPolynomial<RT>::R_;
|
|||
|
||||
template <typename RT>
|
||||
int sign(const SPolynomial<RT>& p)
|
||||
{
|
||||
return p.sign();
|
||||
{
|
||||
return p.sign();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -123,54 +123,54 @@ bool operator<(const SPolynomial<RT>& p1, const SPolynomial<RT>& p2)
|
|||
|
||||
template <typename RT>
|
||||
bool operator<(int i, const SPolynomial<RT>& p2)
|
||||
{
|
||||
{
|
||||
SPolynomial<RT> p1(i);
|
||||
return (p1-p2).sign()<0;
|
||||
return (p1-p2).sign()<0;
|
||||
}
|
||||
|
||||
|
||||
template <typename RT>
|
||||
bool operator<(const SPolynomial<RT>& p1, int i)
|
||||
{
|
||||
{
|
||||
SPolynomial<RT> p2(i);
|
||||
return (p1-p2).sign()<0;
|
||||
return (p1-p2).sign()<0;
|
||||
}
|
||||
|
||||
template <class RT>
|
||||
inline double to_double(const SPolynomial<RT>& p)
|
||||
template <class RT>
|
||||
inline double to_double(const SPolynomial<RT>& p)
|
||||
{ return (CGAL::to_double(p.eval_at(SPolynomial<RT>::R_))); }
|
||||
|
||||
template <class RT>
|
||||
template <class RT>
|
||||
std::ostream& operator<<(std::ostream& os, const SPolynomial<RT>& p)
|
||||
{
|
||||
switch( os.iword(CGAL::IO::mode) ) {
|
||||
case CGAL::IO::ASCII :
|
||||
{
|
||||
switch( get_mode(os) ) {
|
||||
case CGAL::IO::ASCII :
|
||||
os << p.m() << " " << p.n(); break;
|
||||
case CGAL::IO::BINARY :
|
||||
CGAL::write(os,p.m());CGAL::write(os,p.n()); break;
|
||||
default:
|
||||
if ( p.m() == 0 ) os<<"["<<p.n()<<"]";
|
||||
else os<<"["<<p.m()<<" R + "<<p.n()<<"]";
|
||||
}
|
||||
return os;
|
||||
else os<<"["<<p.m()<<" R + "<<p.n()<<"]";
|
||||
}
|
||||
return os;
|
||||
}
|
||||
template <class RT>
|
||||
template <class RT>
|
||||
std::istream& operator>>(std::istream& is, SPolynomial<RT>& p)
|
||||
{ RT m,n;
|
||||
switch( is.iword(CGAL::IO::mode) ){
|
||||
case CGAL::IO::ASCII :
|
||||
{ RT m,n;
|
||||
switch( get_mode(is) ){
|
||||
case CGAL::IO::ASCII :
|
||||
is >> m >> n; p = SPolynomial<RT>(m,n); break;
|
||||
case CGAL::IO::BINARY :
|
||||
CGAL::read(is,m);CGAL::read(is,n);break;
|
||||
default:
|
||||
CGAL_error_msg("\nStream must be in ascii or binary mode\n");
|
||||
break;
|
||||
break;
|
||||
}
|
||||
return is;
|
||||
return is;
|
||||
}
|
||||
|
||||
template <class RT> /*CGAL_KERNEL_INLINE*/
|
||||
CGAL::io_Operator io_tag(const SPolynomial<RT>&)
|
||||
template <class RT> /*CGAL_KERNEL_INLINE*/
|
||||
CGAL::io_Operator io_tag(const SPolynomial<RT>&)
|
||||
{ return CGAL::io_Operator(); }
|
||||
|
||||
|
||||
|
|
@ -188,8 +188,8 @@ public:
|
|||
const RT& denominator() const { return _n; }
|
||||
};
|
||||
|
||||
template <class RT>
|
||||
inline double to_double(const SQuotient<RT>& q)
|
||||
template <class RT>
|
||||
inline double to_double(const SQuotient<RT>& q)
|
||||
{ return (CGAL::to_double(q.numerator().eval_at_R())/
|
||||
CGAL::to_double(q.denominator())); }
|
||||
|
||||
|
|
@ -213,8 +213,8 @@ public:
|
|||
mxd=myd=0;
|
||||
}
|
||||
|
||||
Extended_point_rep(const SPolynomial<RT>& x,
|
||||
const SPolynomial<RT>& y,
|
||||
Extended_point_rep(const SPolynomial<RT>& x,
|
||||
const SPolynomial<RT>& y,
|
||||
const RT& w) : x_(x),y_(y),w_(w)
|
||||
{ CGAL_assertion_msg(w!=0,"denominator is zero.");
|
||||
mxd=CGAL::to_interval(x.m());
|
||||
|
|
@ -226,8 +226,8 @@ public:
|
|||
|
||||
Extended_point_rep() : x_(),y_(),w_() {}
|
||||
~Extended_point_rep() {}
|
||||
void negate()
|
||||
{ x_ = -x_; y_ = -y_; w_ = -w_;
|
||||
void negate()
|
||||
{ x_ = -x_; y_ = -y_; w_ = -w_;
|
||||
mxd = -mxd; myd = -myd; nxd = -nxd; nyd = -nyd; wd = -wd; }
|
||||
|
||||
};
|
||||
|
|
@ -249,9 +249,9 @@ public:
|
|||
Extended_point(const RT& x, const RT& y, const RT& w) :
|
||||
Base( Rep(x,y,w) )
|
||||
{ if (w < 0) this->ptr()->negate(); }
|
||||
|
||||
Extended_point(const SPolynomial<RT>& x,
|
||||
const SPolynomial<RT>& y,
|
||||
|
||||
Extended_point(const SPolynomial<RT>& x,
|
||||
const SPolynomial<RT>& y,
|
||||
const RT& w) : Base( Rep(x,y,w) )
|
||||
{ if (w < 0) this->ptr()->negate(); }
|
||||
|
||||
|
|
@ -259,11 +259,11 @@ public:
|
|||
const RT& my, const RT& ny, const RT& w) :
|
||||
Base( Rep(SP(mx,nx), SP(my,ny), w) )
|
||||
{ if (w < 0) this->ptr()->negate(); }
|
||||
|
||||
|
||||
Extended_point(const Extended_point<RT>& p) : Base(p) {}
|
||||
~Extended_point() {}
|
||||
|
||||
Extended_point& operator=(const Extended_point<RT>& p)
|
||||
Extended_point& operator=(const Extended_point<RT>& p)
|
||||
{ Base::operator=(p); return *this; }
|
||||
|
||||
const RT& mx() const { return this->ptr()->x_.m(); }
|
||||
|
|
@ -277,16 +277,16 @@ public:
|
|||
const DT& nyD() const { return this->ptr()->nyd; }
|
||||
const DT& hwD() const { return this->ptr()->wd; }
|
||||
|
||||
SQuotient<RT> x() const
|
||||
SQuotient<RT> x() const
|
||||
{ return SQuotient<RT>(this->ptr()->x_, this->ptr()->w_); }
|
||||
SQuotient<RT> y() const
|
||||
SQuotient<RT> y() const
|
||||
{ return SQuotient<RT>(this->ptr()->y_, this->ptr()->w_); }
|
||||
|
||||
const SPolynomial<RT> hx() const { return this->ptr()->x_; }
|
||||
const SPolynomial<RT> hy() const { return this->ptr()->y_; }
|
||||
|
||||
bool is_standard() const { return (mx()==0)&&(my()==0); }
|
||||
Extended_point<RT> opposite() const
|
||||
Extended_point<RT> opposite() const
|
||||
{ return Extended_point<RT>(-mx(),nx(),-my(),ny(),this->w()); }
|
||||
|
||||
#ifdef KERNEL_CHECK
|
||||
|
|
@ -306,60 +306,60 @@ CheckPoint checkrep() const
|
|||
|
||||
};
|
||||
|
||||
template <class RT>
|
||||
template <class RT>
|
||||
std::ostream& operator<<(std::ostream& os, const Extended_point<RT>& p)
|
||||
{ switch( os.iword(CGAL::IO::mode) ) {
|
||||
case CGAL::IO::ASCII :
|
||||
{ switch( get_mode(os) ) {
|
||||
case CGAL::IO::ASCII :
|
||||
os << p.hx() << " " << p.hy() << " " << p.hw(); break;
|
||||
case CGAL::IO::BINARY :
|
||||
CGAL::write(os,p.hx());CGAL::write(os,p.hy());
|
||||
CGAL::write(os,p.hx());CGAL::write(os,p.hy());
|
||||
CGAL::write(os,p.hw()); break;
|
||||
default:
|
||||
os << "(" << p.hx() << "," << p.hy() << "," << p.hw() << ")";
|
||||
os << "(" << p.hx() << "," << p.hy() << "," << p.hw() << ")";
|
||||
#if 0
|
||||
os << "((" << CGAL::to_double(p.nx())/CGAL::to_double(p.hw()) << ","
|
||||
<< CGAL::to_double(p.ny())/CGAL::to_double(p.hw()) << "))";
|
||||
os << "((" << CGAL::to_double(p.nx())/CGAL::to_double(p.hw()) << ","
|
||||
<< CGAL::to_double(p.ny())/CGAL::to_double(p.hw()) << "))";
|
||||
#endif
|
||||
}
|
||||
return os;
|
||||
}
|
||||
return os;
|
||||
}
|
||||
template <class RT>
|
||||
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) ){
|
||||
case CGAL::IO::ASCII :
|
||||
switch( get_mode(is) ){
|
||||
case CGAL::IO::ASCII :
|
||||
is >> x >> y >> w; break;
|
||||
case CGAL::IO::BINARY :
|
||||
CGAL::read(is,x);CGAL::read(is,y);CGAL::read(is,w); break;
|
||||
default:
|
||||
CGAL_error_msg("\nStream must be in ascii or binary mode\n");
|
||||
break;
|
||||
break;
|
||||
}
|
||||
p = Extended_point<RT>(x,y,w);
|
||||
return is;
|
||||
p = Extended_point<RT>(x,y,w);
|
||||
return is;
|
||||
}
|
||||
|
||||
|
||||
template <typename NT> inline
|
||||
int orientation_coeff2(const NT& mx1, const NT& /*nx1*/,
|
||||
int orientation_coeff2(const NT& mx1, const NT& /*nx1*/,
|
||||
const NT& my1, const NT& /*ny1*/, const NT& w1,
|
||||
const NT& mx2, const NT& /*nx2*/,
|
||||
const NT& mx2, const NT& /*nx2*/,
|
||||
const NT& my2, const NT& /*ny2*/, const NT& w2,
|
||||
const NT& mx3, const NT& /*nx3*/,
|
||||
const NT& my3, const NT& /*ny3*/, const NT& w3)
|
||||
const NT& mx3, const NT& /*nx3*/,
|
||||
const NT& my3, const NT& /*ny3*/, const NT& w3)
|
||||
{
|
||||
NT coeff2 = mx1*w3*my2-mx1*w2*my3+mx3*w2*my1-
|
||||
mx2*w3*my1-mx3*w1*my2+mx2*w1*my3;
|
||||
return CGAL_NTS sign(coeff2);
|
||||
}
|
||||
|
||||
template <typename NT> inline
|
||||
int orientation_coeff1(const NT& mx1, const NT& nx1,
|
||||
template <typename NT> inline
|
||||
int orientation_coeff1(const NT& mx1, const NT& nx1,
|
||||
const NT& my1, const NT& ny1, const NT& w1,
|
||||
const NT& mx2, const NT& nx2,
|
||||
const NT& mx2, const NT& nx2,
|
||||
const NT& my2, const NT& ny2, const NT& w2,
|
||||
const NT& mx3, const NT& nx3,
|
||||
const NT& my3, const NT& ny3, const NT& w3)
|
||||
const NT& mx3, const NT& nx3,
|
||||
const NT& my3, const NT& ny3, const NT& w3)
|
||||
{
|
||||
NT coeff1 = mx1*w3*ny2-mx1*w2*ny3+nx1*w3*my2-mx2*w3*ny1-
|
||||
nx1*w2*my3+mx2*w1*ny3-nx2*w3*my1+mx3*w2*ny1+
|
||||
|
|
@ -368,12 +368,12 @@ int orientation_coeff1(const NT& mx1, const NT& nx1,
|
|||
}
|
||||
|
||||
template <typename NT> inline
|
||||
int orientation_coeff0(const NT& /*mx1*/, const NT& nx1,
|
||||
int orientation_coeff0(const NT& /*mx1*/, const NT& nx1,
|
||||
const NT& /*my1*/, const NT& ny1, const NT& w1,
|
||||
const NT& /*mx2*/, const NT& nx2,
|
||||
const NT& /*mx2*/, const NT& nx2,
|
||||
const NT& /*my2*/, const NT& ny2, const NT& w2,
|
||||
const NT& /*mx3*/, const NT& nx3,
|
||||
const NT& /*my3*/, const NT& ny3, const NT& w3)
|
||||
const NT& /*mx3*/, const NT& nx3,
|
||||
const NT& /*my3*/, const NT& ny3, const NT& w3)
|
||||
{
|
||||
NT coeff0 = -nx2*w3*ny1+nx1*w3*ny2+nx2*w1*ny3-
|
||||
nx1*w2*ny3+nx3*w2*ny1-nx3*w1*ny2;
|
||||
|
|
@ -384,9 +384,9 @@ DEFCOUNTER(or0)
|
|||
DEFCOUNTER(or1)
|
||||
DEFCOUNTER(or2)
|
||||
template <typename RT>
|
||||
int orientation(const Extended_point<RT>& p1,
|
||||
const Extended_point<RT>& p2,
|
||||
const Extended_point<RT>& p3)
|
||||
int orientation(const Extended_point<RT>& p1,
|
||||
const Extended_point<RT>& p2,
|
||||
const Extended_point<RT>& p3)
|
||||
{ CGAL_NEF_TRACEN("orientation "<<p1<<p2<<p3);
|
||||
int res;
|
||||
try { INCTOTAL(or2); Protect_FPU_rounding<true> Protection;
|
||||
|
|
@ -399,7 +399,7 @@ int orientation(const Extended_point<RT>& p1,
|
|||
p2.mx(),p2.nx(),p2.my(),p2.ny(),p2.hw(),
|
||||
p3.mx(),p3.nx(),p3.my(),p3.ny(),p3.hw());
|
||||
}
|
||||
if ( res != 0 ) return res;
|
||||
if ( res != 0 ) return res;
|
||||
|
||||
try { INCTOTAL(or1); Protect_FPU_rounding<true> Protection;
|
||||
res = orientation_coeff1(p1.mxD(),p1.nxD(),p1.myD(),p1.nyD(),p1.hwD(),
|
||||
|
|
@ -411,7 +411,7 @@ int orientation(const Extended_point<RT>& p1,
|
|||
p2.mx(),p2.nx(),p2.my(),p2.ny(),p2.hw(),
|
||||
p3.mx(),p3.nx(),p3.my(),p3.ny(),p3.hw());
|
||||
}
|
||||
if ( res != 0 ) return res;
|
||||
if ( res != 0 ) return res;
|
||||
|
||||
try { INCTOTAL(or0); Protect_FPU_rounding<true> Protection;
|
||||
res = orientation_coeff0(p1.mxD(),p1.nxD(),p1.myD(),p1.nyD(),p1.hwD(),
|
||||
|
|
@ -426,9 +426,9 @@ int orientation(const Extended_point<RT>& p1,
|
|||
return res;
|
||||
}
|
||||
|
||||
template <typename NT>
|
||||
template <typename NT>
|
||||
inline
|
||||
int compare_expr(const NT& n1, const NT& d1,
|
||||
int compare_expr(const NT& n1, const NT& d1,
|
||||
const NT& n2, const NT& d2)
|
||||
{ return CGAL_NTS sign( n1*d2 - n2*d1 ); }
|
||||
|
||||
|
|
@ -436,8 +436,8 @@ DEFCOUNTER(cmpx0)
|
|||
DEFCOUNTER(cmpx1)
|
||||
|
||||
template <typename RT>
|
||||
int compare_x(const Extended_point<RT>& p1,
|
||||
const Extended_point<RT>& p2)
|
||||
int compare_x(const Extended_point<RT>& p1,
|
||||
const Extended_point<RT>& p2)
|
||||
{
|
||||
int res;
|
||||
try { INCTOTAL(cmpx1); Protect_FPU_rounding<true> Protection;
|
||||
|
|
@ -446,7 +446,7 @@ int compare_x(const Extended_point<RT>& p1,
|
|||
catch (Uncertain_conversion_exception) { INCEXCEPTION(cmpx1);
|
||||
res = compare_expr(p1.mx(),p1.hw(),p2.mx(),p2.hw());
|
||||
}
|
||||
if ( res != 0 ) return res;
|
||||
if ( res != 0 ) return res;
|
||||
|
||||
try { INCTOTAL(cmpx0); Protect_FPU_rounding<true> Protection;
|
||||
res = compare_expr(p1.nxD(),p1.hwD(),p2.nxD(),p2.hwD());
|
||||
|
|
@ -454,15 +454,15 @@ int compare_x(const Extended_point<RT>& p1,
|
|||
catch (Uncertain_conversion_exception) { INCEXCEPTION(cmpx0);
|
||||
res = compare_expr(p1.nx(),p1.hw(),p2.nx(),p2.hw());
|
||||
}
|
||||
return res;
|
||||
return res;
|
||||
}
|
||||
|
||||
DEFCOUNTER(cmpy0)
|
||||
DEFCOUNTER(cmpy1)
|
||||
|
||||
template <typename RT>
|
||||
int compare_y(const Extended_point<RT>& p1,
|
||||
const Extended_point<RT>& p2)
|
||||
int compare_y(const Extended_point<RT>& p1,
|
||||
const Extended_point<RT>& p2)
|
||||
{
|
||||
int res;
|
||||
try { INCTOTAL(cmpy1); Protect_FPU_rounding<true> Protection;
|
||||
|
|
@ -471,7 +471,7 @@ int compare_y(const Extended_point<RT>& p1,
|
|||
catch (Uncertain_conversion_exception) { INCEXCEPTION(cmpy1);
|
||||
res = compare_expr(p1.my(),p1.hw(),p2.my(),p2.hw());
|
||||
}
|
||||
if ( res != 0 ) return res;
|
||||
if ( res != 0 ) return res;
|
||||
|
||||
try { INCTOTAL(cmpy0); Protect_FPU_rounding<true> Protection;
|
||||
res = compare_expr(p1.nyD(),p1.hwD(),p2.nyD(),p2.hwD());
|
||||
|
|
@ -479,14 +479,14 @@ int compare_y(const Extended_point<RT>& p1,
|
|||
catch (Uncertain_conversion_exception) { INCEXCEPTION(cmpy0);
|
||||
res = compare_expr(p1.ny(),p1.hw(),p2.ny(),p2.hw());
|
||||
}
|
||||
return res;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
template <typename RT>
|
||||
inline
|
||||
int compare_xy(const Extended_point<RT>& p1,
|
||||
const Extended_point<RT>& p2)
|
||||
int compare_xy(const Extended_point<RT>& p1,
|
||||
const Extended_point<RT>& p2)
|
||||
{ int c1 = compare_x(p1,p2);
|
||||
if ( c1 != 0 ) return c1;
|
||||
else return compare_y(p1,p2);
|
||||
|
|
@ -494,36 +494,36 @@ int compare_xy(const Extended_point<RT>& p1,
|
|||
|
||||
template <typename RT>
|
||||
inline
|
||||
bool strictly_ordered_along_line(const Extended_point<RT>& p1,
|
||||
const Extended_point<RT>& p2,
|
||||
const Extended_point<RT>& p3)
|
||||
bool strictly_ordered_along_line(const Extended_point<RT>& p1,
|
||||
const Extended_point<RT>& p2,
|
||||
const Extended_point<RT>& p3)
|
||||
{ return ( orientation(p1,p2,p3) == 0 ) &&
|
||||
( compare_xy(p1,p2) * compare_xy(p2,p3) == 1 );
|
||||
}
|
||||
|
||||
template <typename RT>
|
||||
inline bool operator==(const Extended_point<RT>& p1,
|
||||
const Extended_point<RT>& p2)
|
||||
inline bool operator==(const Extended_point<RT>& p1,
|
||||
const Extended_point<RT>& p2)
|
||||
{ CHECK(bool(compare_xy(p1,p2) == 0),p1.checkrep()==p2.checkrep())
|
||||
return (p1.identical(p2) || compare_xy(p1,p2) == 0); }
|
||||
|
||||
template <typename RT>
|
||||
inline bool operator!=(const Extended_point<RT>& p1,
|
||||
const Extended_point<RT>& p2)
|
||||
inline bool operator!=(const Extended_point<RT>& p1,
|
||||
const Extended_point<RT>& p2)
|
||||
{ return !(p1==p2); }
|
||||
|
||||
|
||||
template <typename NT>
|
||||
template <typename NT>
|
||||
inline
|
||||
int cmppd_coeff2(const NT& mx1, const NT& /*nx1*/,
|
||||
int cmppd_coeff2(const NT& mx1, const NT& /*nx1*/,
|
||||
const NT& my1, const NT& /*ny1*/, const NT& w1,
|
||||
const NT& mx2, const NT& /*nx2*/,
|
||||
const NT& mx2, const NT& /*nx2*/,
|
||||
const NT& my2, const NT& /*ny2*/, const NT& w2,
|
||||
const NT& mx3, const NT& /*nx3*/,
|
||||
const NT& my3, const NT& /*ny3*/, const NT& w3,
|
||||
const NT& mx4, const NT& /*nx4*/,
|
||||
const NT& my4, const NT& /*ny4*/, const NT& w4)
|
||||
{
|
||||
const NT& mx3, const NT& /*nx3*/,
|
||||
const NT& my3, const NT& /*ny3*/, const NT& w3,
|
||||
const NT& mx4, const NT& /*nx4*/,
|
||||
const NT& my4, const NT& /*ny4*/, const NT& w4)
|
||||
{
|
||||
NT w1Q(w1*w1), w2Q(w2*w2), w3Q(w3*w3), w4Q(w4*w4);
|
||||
NT w1w2Q(w1Q*w2Q), w3w4Q(w3Q*w4Q), two(2);
|
||||
NT coeff2 = w3w4Q * w2Q *mx1*mx1-
|
||||
|
|
@ -538,21 +538,21 @@ int cmppd_coeff2(const NT& mx1, const NT& /*nx1*/,
|
|||
w1w2Q * w4Q *my3*my3+
|
||||
two* w1w2Q *w4*my3*w3*my4-
|
||||
w1w2Q * w3Q *my4*my4;
|
||||
return CGAL_NTS sign(coeff2);
|
||||
return CGAL_NTS sign(coeff2);
|
||||
}
|
||||
|
||||
|
||||
template <typename NT>
|
||||
template <typename NT>
|
||||
inline
|
||||
int cmppd_coeff1(const NT& mx1, const NT& nx1,
|
||||
int cmppd_coeff1(const NT& mx1, const NT& nx1,
|
||||
const NT& my1, const NT& ny1, const NT& w1,
|
||||
const NT& mx2, const NT& nx2,
|
||||
const NT& mx2, const NT& nx2,
|
||||
const NT& my2, const NT& ny2, const NT& w2,
|
||||
const NT& mx3, const NT& nx3,
|
||||
const NT& my3, const NT& ny3, const NT& w3,
|
||||
const NT& mx4, const NT& nx4,
|
||||
const NT& my4, const NT& ny4, const NT& w4)
|
||||
{
|
||||
const NT& mx3, const NT& nx3,
|
||||
const NT& my3, const NT& ny3, const NT& w3,
|
||||
const NT& mx4, const NT& nx4,
|
||||
const NT& my4, const NT& ny4, const NT& w4)
|
||||
{
|
||||
NT w1Q(w1*w1), w2Q(w2*w2), w3Q(w3*w3), w4Q(w4*w4);
|
||||
NT w1w2Q(w1Q*w2Q), w3w4Q(w3Q*w4Q), two(2);
|
||||
NT coeff1 = two * (w3w4Q * w1Q * mx2*nx2-
|
||||
|
|
@ -574,24 +574,24 @@ int cmppd_coeff1(const NT& mx1, const NT& nx1,
|
|||
return CGAL_NTS sign(coeff1);
|
||||
}
|
||||
|
||||
template <typename NT>
|
||||
template <typename NT>
|
||||
inline
|
||||
int cmppd_coeff0(const NT& /*mx1*/, const NT& nx1,
|
||||
int cmppd_coeff0(const NT& /*mx1*/, const NT& nx1,
|
||||
const NT& /*my1*/, const NT& ny1, const NT& w1,
|
||||
const NT& /*mx2*/, const NT& nx2,
|
||||
const NT& /*mx2*/, const NT& nx2,
|
||||
const NT& /*my2*/, const NT& ny2, const NT& w2,
|
||||
const NT& /*mx3*/, const NT& nx3,
|
||||
const NT& /*my3*/, const NT& ny3, const NT& w3,
|
||||
const NT& /*mx4*/, const NT& nx4,
|
||||
const NT& /*my4*/, const NT& ny4, const NT& w4)
|
||||
{
|
||||
const NT& /*mx3*/, const NT& nx3,
|
||||
const NT& /*my3*/, const NT& ny3, const NT& w3,
|
||||
const NT& /*mx4*/, const NT& nx4,
|
||||
const NT& /*my4*/, const NT& ny4, const NT& w4)
|
||||
{
|
||||
NT w1Q(w1*w1), w2Q(w2*w2), w3Q(w3*w3), w4Q(w4*w4);
|
||||
NT w1w2Q(w1Q*w2Q), w3w4Q(w3Q*w4Q), two(2);
|
||||
NT coeff0 = w3w4Q * (w1Q * ( nx2*nx2 + ny2*ny2 ) +
|
||||
w2Q * ( ny1*ny1 + nx1*nx1 )) -
|
||||
w1w2Q * (w4Q * ( nx3*nx3 + ny3*ny3 ) +
|
||||
w3Q * ( nx4*nx4 + ny4*ny4 )) +
|
||||
two* (- w3w4Q * (w2*nx1*w1*nx2 + w2*ny1*w1*ny2)
|
||||
two* (- w3w4Q * (w2*nx1*w1*nx2 + w2*ny1*w1*ny2)
|
||||
+ w1w2Q * (w4*ny3*w3*ny4 + w4*nx3*w3*nx4));
|
||||
return CGAL_NTS sign(coeff0);
|
||||
}
|
||||
|
|
@ -603,9 +603,9 @@ DEFCOUNTER(cmppd0)
|
|||
// leghth.mws
|
||||
template <typename RT>
|
||||
int compare_pair_dist(
|
||||
const Extended_point<RT>& p1, const Extended_point<RT>& p2,
|
||||
const Extended_point<RT>& p3, const Extended_point<RT>& p4)
|
||||
{
|
||||
const Extended_point<RT>& p1, const Extended_point<RT>& p2,
|
||||
const Extended_point<RT>& p3, const Extended_point<RT>& p4)
|
||||
{
|
||||
int res;
|
||||
try { INCTOTAL(cmppd2); Protect_FPU_rounding<true> Protection;
|
||||
res = cmppd_coeff2(p1.mxD(),p1.nxD(),p1.myD(),p1.nyD(),p1.hwD(),
|
||||
|
|
@ -619,7 +619,7 @@ int compare_pair_dist(
|
|||
p3.mx(),p3.nx(),p3.my(),p3.ny(),p3.hw(),
|
||||
p4.mx(),p4.nx(),p4.my(),p4.ny(),p4.hw());
|
||||
}
|
||||
if ( res != 0 ) return res;
|
||||
if ( res != 0 ) return res;
|
||||
|
||||
try { INCTOTAL(cmppd1); Protect_FPU_rounding<true> Protection;
|
||||
res = cmppd_coeff1(p1.mxD(),p1.nxD(),p1.myD(),p1.nyD(),p1.hwD(),
|
||||
|
|
@ -633,7 +633,7 @@ int compare_pair_dist(
|
|||
p3.mx(),p3.nx(),p3.my(),p3.ny(),p3.hw(),
|
||||
p4.mx(),p4.nx(),p4.my(),p4.ny(),p4.hw());
|
||||
}
|
||||
if ( res != 0 ) return res;
|
||||
if ( res != 0 ) return res;
|
||||
|
||||
try { INCTOTAL(cmppd0); Protect_FPU_rounding<true> Protection;
|
||||
res = cmppd_coeff0(p1.mxD(),p1.nxD(),p1.myD(),p1.nyD(),p1.hwD(),
|
||||
|
|
@ -657,7 +657,7 @@ class Extended_segment {
|
|||
public:
|
||||
Extended_segment() : _p1(),_p2() {}
|
||||
Extended_segment(const Extended_point<RT>& p1,
|
||||
const Extended_point<RT>& p2) :
|
||||
const Extended_point<RT>& p2) :
|
||||
_p1(p1), _p2(p2) {}
|
||||
Extended_segment(const Extended_segment<RT>& s) :
|
||||
_p1(s._p1), _p2(s._p2) {}
|
||||
|
|
@ -670,10 +670,10 @@ public:
|
|||
void line_equation(RT& a, RT& b, SPolynomial<RT>& c) const;
|
||||
};
|
||||
|
||||
template <class RT>
|
||||
template <class RT>
|
||||
std::ostream& operator<<(std::ostream& os, const Extended_segment<RT>& s)
|
||||
{ os << s.source() << s.target(); return os; }
|
||||
template <class RT>
|
||||
template <class RT>
|
||||
std::istream& operator>>(std::istream& is, Extended_segment<RT>& s)
|
||||
{ Extended_point<RT> p1,p2;
|
||||
is >> p1 >> p2; s=Extended_segment<RT>(p1,p2); return is; }
|
||||
|
|
@ -696,18 +696,18 @@ line_equation(RT& a, RT& b, SPolynomial<RT>& c) const
|
|||
if (!sstandard && !tstandard) {
|
||||
bool x_equal = (_p1.hx()*_p2.hw() - _p2.hx()*_p1.hw()).is_zero();
|
||||
bool y_equal = (_p1.hy()*_p2.hw() - _p2.hy()*_p1.hw()).is_zero();
|
||||
if (x_equal && CGAL_NTS abs(_p1.mx())==_p1.hw() && _p1.nx()==0 )
|
||||
{ int dy = (_p2.hy()-_p1.hy()).sign();
|
||||
if (x_equal && CGAL_NTS abs(_p1.mx())==_p1.hw() && _p1.nx()==0 )
|
||||
{ int dy = (_p2.hy()-_p1.hy()).sign();
|
||||
a=-dy; b=0; c = SPolynomial<RT>(dy*_p1.hx().sign(),0); return; }
|
||||
if (y_equal && CGAL_NTS abs(_p1.my())==_p1.hw() && _p1.ny()==0 )
|
||||
{ int dx = (_p2.hx()-_p1.hx()).sign();
|
||||
if (y_equal && CGAL_NTS abs(_p1.my())==_p1.hw() && _p1.ny()==0 )
|
||||
{ int dx = (_p2.hx()-_p1.hx()).sign();
|
||||
a=0; b=dx; c = SPolynomial<RT>(-dx*_p1.hy().sign(),0); return; }
|
||||
p = _p2; // evaluation according to mixed case
|
||||
|
||||
}
|
||||
else if (sstandard && !tstandard)
|
||||
}
|
||||
else if (sstandard && !tstandard)
|
||||
{ p = _p2; }
|
||||
else if (!sstandard && tstandard)
|
||||
else if (!sstandard && tstandard)
|
||||
{ p = _p1; correct_orientation=false; }
|
||||
RT w = p.hw();
|
||||
RT ci;
|
||||
|
|
@ -729,7 +729,7 @@ line_equation(RT& a, RT& b, SPolynomial<RT>& c) const
|
|||
template <typename RT>
|
||||
Extended_point<RT> intersection(
|
||||
const Extended_segment<RT>& s1, const Extended_segment<RT>& s2)
|
||||
{
|
||||
{
|
||||
RT a1,b1,a2,b2;
|
||||
SPolynomial<RT> c1,c2;
|
||||
s1.line_equation(a1,b1,c1);
|
||||
|
|
@ -739,9 +739,9 @@ Extended_point<RT> intersection(
|
|||
RT w = a1*b2 - a2*b1; CGAL_assertion(w!=0);
|
||||
#ifdef REDUCE_INTERSECTION_POINTS
|
||||
RT xgcd,ygcd;
|
||||
if ( x.m() == RT(0) ) xgcd = ( x.n() == 0 ? RT(1) : x.n() );
|
||||
if ( x.m() == RT(0) ) xgcd = ( x.n() == 0 ? RT(1) : x.n() );
|
||||
else /* != 0 */ xgcd = ( x.n() == 0 ? x.m() : CGAL_NTS gcd(x.m(),x.n()) );
|
||||
if ( y.m() == RT(0) ) ygcd = ( y.n() == 0 ? RT(1) : y.n() );
|
||||
if ( y.m() == RT(0) ) ygcd = ( y.n() == 0 ? RT(1) : y.n() );
|
||||
else /* != 0 */ ygcd = ( y.n() == 0 ? y.m() : CGAL_NTS gcd(y.m(),y.n()) );
|
||||
RT d = CGAL_NTS gcd(w,CGAL_NTS gcd(xgcd,ygcd));
|
||||
x /= d;
|
||||
|
|
@ -753,7 +753,7 @@ Extended_point<RT> intersection(
|
|||
|
||||
template <typename RT>
|
||||
inline
|
||||
int orientation(const Extended_segment<RT>& s, const Extended_point<RT>& p)
|
||||
int orientation(const Extended_segment<RT>& s, const Extended_point<RT>& p)
|
||||
{ return orientation(s.source(),s.target(),p); }
|
||||
|
||||
template <typename RT>
|
||||
|
|
@ -763,8 +763,8 @@ bool is_degenerate(const Extended_segment<RT>& s)
|
|||
|
||||
template <typename RT>
|
||||
inline
|
||||
bool contains(const Extended_segment<RT>& s,
|
||||
const Extended_point<RT>& p)
|
||||
bool contains(const Extended_segment<RT>& s,
|
||||
const Extended_point<RT>& p)
|
||||
{ int p_rel_source = compare_xy(p,s.source());
|
||||
int p_rel_target = compare_xy(p,s.target());
|
||||
return ( orientation(s,p) == 0 ) &&
|
||||
|
|
@ -780,7 +780,7 @@ public:
|
|||
Extended_direction() : _p1(),_p2() {}
|
||||
Extended_direction(const Extended_direction<RT>& d) :
|
||||
_p1(d._p1),_p2(d._p2) {}
|
||||
Extended_direction<RT>& operator=(const Extended_direction<RT>& d)
|
||||
Extended_direction<RT>& operator=(const Extended_direction<RT>& d)
|
||||
{ _p1 = d._p1; _p2 = d._p2; return *this; }
|
||||
|
||||
Extended_direction(const Extended_point<RT>& p1,
|
||||
|
|
@ -789,36 +789,36 @@ public:
|
|||
|
||||
Extended_direction(const RT& x, const RT& y) :
|
||||
_p1(0,0,1),_p2(x,y,1) {}
|
||||
|
||||
|
||||
const Extended_point<RT>& p1() const { return _p1; }
|
||||
const Extended_point<RT>& p2() const { return _p2; }
|
||||
int dx_sign() const
|
||||
int dx_sign() const
|
||||
{ return (_p2.hx()*_p1.hw()-_p1.hx()*_p2.hw()).sign(); }
|
||||
int dy_sign() const
|
||||
int dy_sign() const
|
||||
{ return (_p2.hy()*_p1.hw()-_p1.hy()*_p2.hw()).sign(); }
|
||||
};
|
||||
|
||||
template <class RT>
|
||||
template <class RT>
|
||||
std::ostream& operator<<(std::ostream& os, const Extended_direction<RT>& d)
|
||||
{ os << d.p1() << "," << d.p2();
|
||||
{ os << d.p1() << "," << d.p2();
|
||||
return os; }
|
||||
template <class RT>
|
||||
template <class RT>
|
||||
std::istream& operator>>(std::istream& is, Extended_direction<RT>& d)
|
||||
{ Extended_point<RT> x,y;
|
||||
is >> x >> y; d = Extended_direction<RT>(x,y);
|
||||
is >> x >> y; d = Extended_direction<RT>(x,y);
|
||||
return is; }
|
||||
|
||||
|
||||
template <typename NT>
|
||||
inline
|
||||
int coeff2_dor(const NT& mx1, const NT& /*nx1*/,
|
||||
int coeff2_dor(const NT& mx1, const NT& /*nx1*/,
|
||||
const NT& my1, const NT& /*ny1*/, const NT& w1,
|
||||
const NT& mx2, const NT& /*nx2*/,
|
||||
const NT& mx2, const NT& /*nx2*/,
|
||||
const NT& my2, const NT& /*ny2*/, const NT& w2,
|
||||
const NT& mx3, const NT& /*nx3*/,
|
||||
const NT& my3, const NT& /*ny3*/, const NT& w3,
|
||||
const NT& mx4, const NT& /*nx4*/,
|
||||
const NT& my4, const NT& /*ny4*/, const NT& w4)
|
||||
const NT& mx3, const NT& /*nx3*/,
|
||||
const NT& my3, const NT& /*ny3*/, const NT& w3,
|
||||
const NT& mx4, const NT& /*nx4*/,
|
||||
const NT& my4, const NT& /*ny4*/, const NT& w4)
|
||||
{
|
||||
NT coeff2 = w1*mx2*w3*my4-w1*mx2*w4*my3-w2*mx1*w3*my4+w2*mx1*w4*my3-
|
||||
w1*my2*w3*mx4+w1*my2*w4*mx3+w2*my1*w3*mx4-w2*my1*w4*mx3;
|
||||
|
|
@ -827,13 +827,13 @@ int coeff2_dor(const NT& mx1, const NT& /*nx1*/,
|
|||
|
||||
template <typename NT>
|
||||
inline
|
||||
int coeff1_dor(const NT& mx1, const NT& nx1,
|
||||
int coeff1_dor(const NT& mx1, const NT& nx1,
|
||||
const NT& my1, const NT& ny1, const NT& w1,
|
||||
const NT& mx2, const NT& nx2,
|
||||
const NT& mx2, const NT& nx2,
|
||||
const NT& my2, const NT& ny2, const NT& w2,
|
||||
const NT& mx3, const NT& nx3,
|
||||
const NT& my3, const NT& ny3, const NT& w3,
|
||||
const NT& mx4, const NT& nx4,
|
||||
const NT& mx3, const NT& nx3,
|
||||
const NT& my3, const NT& ny3, const NT& w3,
|
||||
const NT& mx4, const NT& nx4,
|
||||
const NT& my4, const NT& ny4, const NT& w4)
|
||||
{
|
||||
NT coeff1 = -w1*my2*w3*nx4+w1*mx2*w3*ny4+w1*my2*w4*nx3-w1*mx2*w4*ny3+
|
||||
|
|
@ -845,13 +845,13 @@ int coeff1_dor(const NT& mx1, const NT& nx1,
|
|||
|
||||
template <typename NT>
|
||||
inline
|
||||
int coeff0_dor(const NT& /*mx1*/, const NT& nx1,
|
||||
int coeff0_dor(const NT& /*mx1*/, const NT& nx1,
|
||||
const NT& /*my1*/, const NT& ny1, const NT& w1,
|
||||
const NT& /*mx2*/, const NT& nx2,
|
||||
const NT& /*mx2*/, const NT& nx2,
|
||||
const NT& /*my2*/, const NT& ny2, const NT& w2,
|
||||
const NT& /*mx3*/, const NT& nx3,
|
||||
const NT& /*my3*/, const NT& ny3, const NT& w3,
|
||||
const NT& /*mx4*/, const NT& nx4,
|
||||
const NT& /*mx3*/, const NT& nx3,
|
||||
const NT& /*my3*/, const NT& ny3, const NT& w3,
|
||||
const NT& /*mx4*/, const NT& nx4,
|
||||
const NT& /*my4*/, const NT& ny4, const NT& w4)
|
||||
{
|
||||
NT coeff0 = w1*nx2*w3*ny4-w1*nx2*w4*ny3-w2*nx1*w3*ny4+w2*nx1*w4*ny3-
|
||||
|
|
@ -868,7 +868,7 @@ template <typename RT>
|
|||
inline
|
||||
int orientation(const Extended_direction<RT>& d1,
|
||||
const Extended_direction<RT>& d2)
|
||||
{
|
||||
{
|
||||
Extended_point<RT> p1(d1.p1()), p2(d1.p2()),
|
||||
p3(d2.p1()), p4(d2.p2());
|
||||
int res;
|
||||
|
|
@ -883,7 +883,7 @@ int orientation(const Extended_direction<RT>& d1,
|
|||
p3.mx(),p3.nx(),p3.my(),p3.ny(),p3.hw(),
|
||||
p4.mx(),p4.nx(),p4.my(),p4.ny(),p4.hw());
|
||||
}
|
||||
if ( res != 0 ) return res;
|
||||
if ( res != 0 ) return res;
|
||||
|
||||
try { INCTOTAL(ord1); Protect_FPU_rounding<true> Protection;
|
||||
res = coeff1_dor(p1.mxD(),p1.nxD(),p1.myD(),p1.nyD(),p1.hwD(),
|
||||
|
|
@ -896,7 +896,7 @@ int orientation(const Extended_direction<RT>& d1,
|
|||
p3.mx(),p3.nx(),p3.my(),p3.ny(),p3.hw(),
|
||||
p4.mx(),p4.nx(),p4.my(),p4.ny(),p4.hw());
|
||||
}
|
||||
if ( res != 0 ) return res;
|
||||
if ( res != 0 ) return res;
|
||||
try { INCTOTAL(ord0); Protect_FPU_rounding<true> Protection;
|
||||
res = coeff0_dor(p1.mxD(),p1.nxD(),p1.myD(),p1.nyD(),p1.hwD(),
|
||||
p2.mxD(),p2.nxD(),p2.myD(),p2.nyD(),p2.hwD(),
|
||||
|
|
@ -932,7 +932,7 @@ template <typename RT>
|
|||
bool strictly_ordered_ccw(const Extended_direction<RT>& d1,
|
||||
const Extended_direction<RT>& d2,
|
||||
const Extended_direction<RT>& d3)
|
||||
{
|
||||
{
|
||||
if (d1 == d3) return (d1 != d2);
|
||||
int or12 = orientation(d1,d2);
|
||||
int or13 = orientation(d1,d3);
|
||||
|
|
@ -980,7 +980,7 @@ typedef typename Standard_kernel::Segment_2 Standard_segment_2;
|
|||
typedef typename Standard_kernel::Line_2 Standard_line_2;
|
||||
typedef typename Standard_kernel::Direction_2 Standard_direction_2;
|
||||
typedef typename Standard_kernel::Ray_2 Standard_ray_2;
|
||||
typedef typename Standard_kernel::Aff_transformation_2
|
||||
typedef typename Standard_kernel::Aff_transformation_2
|
||||
Standard_aff_transformation_2;
|
||||
|
||||
typedef SPolynomial<RT_> RT;
|
||||
|
|
@ -1006,7 +1006,7 @@ CheckDirection convert(const Direction_2& d) const
|
|||
|
||||
|
||||
|
||||
enum Point_type { SWCORNER=1, LEFTFRAME, NWCORNER,
|
||||
enum Point_type { SWCORNER=1, LEFTFRAME, NWCORNER,
|
||||
BOTTOMFRAME, STANDARD, TOPFRAME,
|
||||
SECORNER, RIGHTFRAME, NECORNER };
|
||||
|
||||
|
|
@ -1025,18 +1025,18 @@ Point_type determine_type(const Standard_line_2& l) const
|
|||
int sdx = CGAL_NTS sign(dx(l)), sdy = CGAL_NTS sign(dy(l));
|
||||
int cmp_dx_dy = CGAL_NTS compare(adx,ady), s(1);
|
||||
// CGAL_NEF_TRACEN(" "<<cmp_dx_dy<<" "<<sdx<<" "<<sdy);
|
||||
if (sdx < 0 && ( cmp_dx_dy > 0 || ( cmp_dx_dy == 0 &&
|
||||
if (sdx < 0 && ( cmp_dx_dy > 0 || ( cmp_dx_dy == 0 &&
|
||||
sdy != (s=CGAL_NTS sign(abscissa_distance(l)))))) {
|
||||
if (0 == s) return ( sdy < 0 ? SWCORNER : NWCORNER );
|
||||
else return LEFTFRAME;
|
||||
} else if (sdx > 0 && ( cmp_dx_dy > 0 || ( cmp_dx_dy == 0 &&
|
||||
sdy != (s=CGAL_NTS sign(abscissa_distance(l)))))) {
|
||||
} else if (sdx > 0 && ( cmp_dx_dy > 0 || ( cmp_dx_dy == 0 &&
|
||||
sdy != (s=CGAL_NTS sign(abscissa_distance(l)))))) {
|
||||
if (0 == s) return ( sdy < 0 ? SECORNER : NECORNER );
|
||||
else return RIGHTFRAME;
|
||||
} else if (sdy < 0 && ( cmp_dx_dy < 0 || ( cmp_dx_dy == 0 &&
|
||||
} else if (sdy < 0 && ( cmp_dx_dy < 0 || ( cmp_dx_dy == 0 &&
|
||||
abscissa_distance(l) < Standard_FT(0)))) {
|
||||
return BOTTOMFRAME;
|
||||
} else if (sdy > 0 && ( cmp_dx_dy < 0 || ( cmp_dx_dy == 0 &&
|
||||
} else if (sdy > 0 && ( cmp_dx_dy < 0 || ( cmp_dx_dy == 0 &&
|
||||
abscissa_distance(l) > Standard_FT(0)))) {
|
||||
return TOPFRAME;
|
||||
}
|
||||
|
|
@ -1044,8 +1044,8 @@ Point_type determine_type(const Standard_line_2& l) const
|
|||
return (Point_type)-1; // never come here
|
||||
}
|
||||
|
||||
Point_2 epoint(const Standard_RT& m1, const Standard_RT& n1,
|
||||
const Standard_RT& m2, const Standard_RT& n2,
|
||||
Point_2 epoint(const Standard_RT& m1, const Standard_RT& n1,
|
||||
const Standard_RT& m2, const Standard_RT& n2,
|
||||
const Standard_RT& n3) const
|
||||
{ return Point_2(m1,n1,m2,n2,n3); }
|
||||
|
||||
|
|
@ -1062,31 +1062,31 @@ Point_2 construct_point(const Standard_line_2& l, Point_type& t) const
|
|||
switch (t) {
|
||||
case SWCORNER: res = epoint(-1, 0, -1, 0, 1); break;
|
||||
case NWCORNER: res = epoint(-1, 0, 1, 0, 1); break;
|
||||
case SECORNER: res = epoint( 1, 0, -1, 0, 1); break;
|
||||
case NECORNER: res = epoint( 1, 0, 1, 0, 1); break;
|
||||
case LEFTFRAME: res = epoint(-l.b(), 0, l.a(), -l.c(), l.b());
|
||||
break;
|
||||
case RIGHTFRAME: res = epoint( l.b(), 0, -l.a(), -l.c(), l.b());
|
||||
break;
|
||||
case BOTTOMFRAME: res = epoint( l.b(), -l.c(), -l.a(), 0, l.a());
|
||||
break;
|
||||
case TOPFRAME: res = epoint(-l.b(), -l.c(), l.a(), 0, l.a());
|
||||
break;
|
||||
case SECORNER: res = epoint( 1, 0, -1, 0, 1); break;
|
||||
case NECORNER: res = epoint( 1, 0, 1, 0, 1); break;
|
||||
case LEFTFRAME: res = epoint(-l.b(), 0, l.a(), -l.c(), l.b());
|
||||
break;
|
||||
case RIGHTFRAME: res = epoint( l.b(), 0, -l.a(), -l.c(), l.b());
|
||||
break;
|
||||
case BOTTOMFRAME: res = epoint( l.b(), -l.c(), -l.a(), 0, l.a());
|
||||
break;
|
||||
case TOPFRAME: res = epoint(-l.b(), -l.c(), l.a(), 0, l.a());
|
||||
break;
|
||||
default: CGAL_error_msg("EPoint type not correct!");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
Point_2 construct_point(const Standard_point_2& p1,
|
||||
const Standard_point_2& p2,
|
||||
Point_2 construct_point(const Standard_point_2& p1,
|
||||
const Standard_point_2& p2,
|
||||
Point_type& t) const
|
||||
{ return construct_point(Standard_line_2(p1,p2),t); }
|
||||
Point_2 construct_point(const Standard_line_2& l) const
|
||||
{ Point_type dummy; return construct_point(l,dummy); }
|
||||
Point_2 construct_point(const Standard_point_2& p1,
|
||||
Point_2 construct_point(const Standard_point_2& p1,
|
||||
const Standard_point_2& p2) const
|
||||
{ return construct_point(Standard_line_2(p1,p2)); }
|
||||
Point_2 construct_point(const Standard_point_2& p,
|
||||
Point_2 construct_point(const Standard_point_2& p,
|
||||
const Standard_direction_2& d) const
|
||||
{ return construct_point(Standard_line_2(p,d)); }
|
||||
Point_2 construct_opposite_point(const Standard_line_2& l) const
|
||||
|
|
@ -1110,7 +1110,7 @@ Point_type type(const Point_2& p) const
|
|||
if (sy > 0) return TOPFRAME;
|
||||
else return BOTTOMFRAME;
|
||||
}
|
||||
// now (rx == ry)
|
||||
// now (rx == ry)
|
||||
if (sx==sy) {
|
||||
if (sx < 0) return SWCORNER;
|
||||
else return NECORNER;
|
||||
|
|
@ -1149,18 +1149,18 @@ Point_2 SE() const { return construct_point(Standard_line_2( 1, 1,0)); }
|
|||
Point_2 NW() const { return construct_point(Standard_line_2(-1,-1,0)); }
|
||||
Point_2 SW() const { return construct_point(Standard_line_2( 1,-1,0)); }
|
||||
|
||||
int orientation(const Point_2& p1, const Point_2& p2, const Point_2& p3)
|
||||
int orientation(const Point_2& p1, const Point_2& p2, const Point_2& p3)
|
||||
const
|
||||
{ CHECK(K.orientation(p1.checkrep(),p2.checkrep(),p3.checkrep()),
|
||||
CGAL::orientation(p1,p2,p3))
|
||||
return CGAL::orientation(p1,p2,p3); }
|
||||
|
||||
bool left_turn(const Point_2& p1, const Point_2& p2, const Point_2& p3)
|
||||
bool left_turn(const Point_2& p1, const Point_2& p2, const Point_2& p3)
|
||||
const
|
||||
{ return orientation(p1,p2,p3) > 0; }
|
||||
|
||||
bool first_pair_closer_than_second(
|
||||
const Point_2& p1, const Point_2& p2,
|
||||
const Point_2& p1, const Point_2& p2,
|
||||
const Point_2& p3, const Point_2& p4) const
|
||||
{ CHECK(K.first_pair_closer_than_second(p1.checkrep(),p2.checkrep(),
|
||||
p3.checkrep(),p4.checkrep()),
|
||||
|
|
@ -1218,7 +1218,7 @@ Direction_2 construct_direction(
|
|||
const Point_2& p1, const Point_2& p2) const
|
||||
{ return Direction_2(p1,p2); }
|
||||
|
||||
bool strictly_ordered_ccw(const Direction_2& d1,
|
||||
bool strictly_ordered_ccw(const Direction_2& d1,
|
||||
const Direction_2& d2, const Direction_2& d3) const
|
||||
{ CHECK(K.strictly_ordered_ccw(convert(d1),convert(d2),convert(d3)),
|
||||
CGAL::strictly_ordered_ccw(d1,d2,d3));
|
||||
|
|
@ -1251,7 +1251,7 @@ void determine_frame_radius(Forward_iterator start, Forward_iterator end,
|
|||
while ( start != end ) {
|
||||
Point_2 p = *start;
|
||||
if ( is_standard(p) ) {
|
||||
R = (CGAL::max)(CGAL_NTS abs(p.mx())/p.hw(),
|
||||
R = (CGAL::max)(CGAL_NTS abs(p.mx())/p.hw(),
|
||||
CGAL_NTS abs(p.my())/p.hw());
|
||||
} else {
|
||||
RT rx = CGAL_NTS abs(p.hx()), ry = CGAL_NTS abs(p.hy());
|
||||
|
|
@ -1263,7 +1263,7 @@ void determine_frame_radius(Forward_iterator start, Forward_iterator end,
|
|||
}
|
||||
}
|
||||
|
||||
const char* output_identifier() const
|
||||
const char* output_identifier() const
|
||||
{ return "Filtered_extended_homogeneous"; }
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
Loading…
Reference in New Issue