mirror of https://github.com/CGAL/cgal
Merge branch 'master' into mt-glisse
This commit is contained in:
commit
8fa0f55ac7
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
Checks: '-clang-diagnostic*,-clang-analyzer*,modernize-use-nullptr'
|
||||
HeaderFilterRegex: 'CGAL/*'
|
||||
...
|
||||
|
||||
|
|
@ -65,6 +65,7 @@ jobs:
|
|||
mkdir -p build_doc && cd build_doc && cmake ../Documentation/doc
|
||||
|
||||
- name: Build and Upload Doc
|
||||
id: build_and_run
|
||||
if: steps.get_round.outputs.result != 'stop'
|
||||
run: |
|
||||
set -ex
|
||||
|
|
@ -73,11 +74,17 @@ jobs:
|
|||
wget --no-verbose cgal.github.io -O tmp.html
|
||||
if ! egrep -q "\/$PR_NUMBER\/$ROUND" tmp.html; then
|
||||
#list impacted packages
|
||||
LIST_OF_PKGS=$(git diff --name-only HEAD^1 HEAD |cut -s -d/ -f1 |sort -u | xargs -I {} ls -d {}/package_info 2>/dev/null |cut -d/ -f1 |egrep -v Installation||true)
|
||||
LIST_OF_PKGS=$(git diff --name-only HEAD^1 HEAD |cut -s -d/ -f1 |sort -u | xargs -I {} echo {} && ls -d {}/package_info 2>/dev/null |cut -d/ -f1 |egrep -v Installation||true)
|
||||
if [ "$LIST_OF_PKGS" = "" ]; then
|
||||
exit 1
|
||||
fi
|
||||
cd build_doc && make -j2 doc && make -j2 doc_with_postprocessing
|
||||
cd build_doc && make -j2 doc
|
||||
make -j2 doc_with_postprocessing 2>tmp.log
|
||||
if [ -s tmp.log ]; then
|
||||
content=`cat ./build_doc/tmp.log`
|
||||
echo ::set-output name=DoxygenError::$(cat tmp.log)
|
||||
exit 1
|
||||
fi
|
||||
cd ..
|
||||
git clone https://CGAL:${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}@github.com/CGAL/cgal.github.io.git
|
||||
mkdir -p cgal.github.io/${PR_NUMBER}/$ROUND
|
||||
|
|
@ -99,7 +106,7 @@ jobs:
|
|||
|
||||
- name: Post address
|
||||
uses: actions/github-script@v3
|
||||
if: steps.get_round.outputs.result != 'stop'
|
||||
if: ${{ success() && steps.get_round.outputs.result != 'stop' }}
|
||||
with:
|
||||
script: |
|
||||
const address = "The documentation is built. It will be available, after a few minutes, here : https://cgal.github.io/${{ steps.get_pr_number.outputs.result }}/${{ steps.get_round.outputs.result }}/Manual/index.html"
|
||||
|
|
@ -109,3 +116,17 @@ jobs:
|
|||
issue_number: ${{ github.event.issue.number }},
|
||||
body: address
|
||||
});
|
||||
|
||||
- name: Post error
|
||||
uses: actions/github-script@v3
|
||||
if: ${{ failure() && steps.get_round.outputs.result != 'stop' }}
|
||||
with:
|
||||
script: |
|
||||
const error = "${{steps.build_and_run.outputs.DoxygenError}}"
|
||||
const msg = "There was an error while building the doc: \n"+error
|
||||
github.issues.createComment({
|
||||
owner: "CGAL",
|
||||
repo: "cgal",
|
||||
issue_number: ${{ github.event.issue.number }},
|
||||
body: msg
|
||||
});
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ jobs:
|
|||
git rm -r ${PR_NUMBER}
|
||||
fi
|
||||
#git diff exits with 1 if there is a diff
|
||||
if !git diff --quiet; then
|
||||
if ! git diff --quiet; then
|
||||
git commit -a --amend -m"base commit" && git push -f -u origin master
|
||||
fi
|
||||
|
||||
|
|
|
|||
79
.travis.yml
79
.travis.yml
|
|
@ -1,79 +0,0 @@
|
|||
language: cpp
|
||||
dist: bionic
|
||||
sudo: required
|
||||
git:
|
||||
depth: 3
|
||||
env:
|
||||
matrix:
|
||||
- PACKAGE='CHECK'
|
||||
- PACKAGE='AABB_tree Advancing_front_surface_reconstruction Algebraic_foundations '
|
||||
- PACKAGE='Algebraic_kernel_d Algebraic_kernel_for_circles Algebraic_kernel_for_spheres '
|
||||
- PACKAGE='Alpha_shapes_2 Alpha_shapes_3 Apollonius_graph_2 '
|
||||
- PACKAGE='Arithmetic_kernel Arrangement_on_surface_2 BGL '
|
||||
- PACKAGE='Barycentric_coordinates_2 Boolean_set_operations_2 Bounding_volumes '
|
||||
- PACKAGE='Box_intersection_d CGAL_Core CGAL_ImageIO '
|
||||
- PACKAGE='CGAL_ipelets Cartesian_kernel Circular_kernel_2 '
|
||||
- PACKAGE='Circular_kernel_3 Circulator Classification '
|
||||
- PACKAGE='Combinatorial_map Cone_spanners_2 Convex_decomposition_3 '
|
||||
- PACKAGE='Convex_hull_2 Convex_hull_3 Convex_hull_d '
|
||||
- PACKAGE='Distance_2 Distance_3 Envelope_2 '
|
||||
- PACKAGE='Envelope_3 Filtered_kernel Generalized_map '
|
||||
- PACKAGE='Generator Geomview GraphicsView '
|
||||
- PACKAGE='HalfedgeDS Hash_map Heat_method_3 '
|
||||
- PACKAGE='Homogeneous_kernel Hyperbolic_triangulation_2 Inscribed_areas '
|
||||
- PACKAGE='Installation Interpolation Intersections_2 '
|
||||
- PACKAGE='Intersections_3 Interval_skip_list Interval_support '
|
||||
- PACKAGE='Jet_fitting_3 Kernel_23 Kernel_d '
|
||||
- PACKAGE='LEDA Linear_cell_complex MacOSX '
|
||||
- PACKAGE='Maintenance Matrix_search Mesh_2 '
|
||||
- PACKAGE='Mesh_3 Mesher_level Minkowski_sum_2 '
|
||||
- PACKAGE='Minkowski_sum_3 Modifier Modular_arithmetic '
|
||||
- PACKAGE='Nef_2 Nef_3 Nef_S2 '
|
||||
- PACKAGE='NewKernel_d Number_types OpenNL '
|
||||
- PACKAGE='Optimal_bounding_box Optimal_transportation_reconstruction_2 Optimisation_basic '
|
||||
- PACKAGE='Partition_2 Periodic_2_triangulation_2 Periodic_3_mesh_3 '
|
||||
- PACKAGE='Periodic_3_triangulation_3 Periodic_4_hyperbolic_triangulation_2 Point_set_2 '
|
||||
- PACKAGE='Point_set_3 Point_set_processing_3 Poisson_surface_reconstruction_3 '
|
||||
- PACKAGE='Polygon Polygon_mesh_processing Polygonal_surface_reconstruction '
|
||||
- PACKAGE='Polyhedron Polyline_simplification_2 Polynomial '
|
||||
- PACKAGE='Polytope_distance_d Principal_component_analysis Principal_component_analysis_LGPL '
|
||||
- PACKAGE='Profiling_tools Property_map QP_solver '
|
||||
- PACKAGE='Random_numbers Ridges_3 STL_Extension '
|
||||
- PACKAGE='Scale_space_reconstruction_3 Scripts SearchStructures '
|
||||
- PACKAGE='Segment_Delaunay_graph_2 Segment_Delaunay_graph_Linf_2 Set_movable_separability_2 '
|
||||
- PACKAGE='Shape_detection Skin_surface_3 Snap_rounding_2 '
|
||||
- PACKAGE='Solver_interface Spatial_searching Spatial_sorting '
|
||||
- PACKAGE='Straight_skeleton_2 Stream_lines_2 Stream_support '
|
||||
- PACKAGE='Subdivision_method_3 Surface_mesh Surface_mesh_approximation '
|
||||
- PACKAGE='Surface_mesh_deformation Surface_mesh_parameterization Surface_mesh_segmentation '
|
||||
- PACKAGE='Surface_mesh_shortest_path Surface_mesh_simplification Surface_mesh_skeletonization '
|
||||
- PACKAGE='Surface_mesh_topology Surface_mesher Surface_sweep_2 '
|
||||
- PACKAGE='TDS_2 TDS_3 Testsuite '
|
||||
- PACKAGE='Tetrahedral_remeshing Three Triangulation '
|
||||
- PACKAGE='Triangulation_2 Triangulation_3 Union_find '
|
||||
- PACKAGE='Visibility_2 Voronoi_diagram_2 wininst '
|
||||
compiler: clang
|
||||
install:
|
||||
- echo "$PWD"
|
||||
- if [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' bash .travis/install.sh
|
||||
- export CXX=clang++-10 CC=clang-10;
|
||||
before_script:
|
||||
- wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe
|
||||
- sudo mv doxygen_exe /usr/bin/doxygen
|
||||
- sudo chmod +x /usr/bin/doxygen
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++1y" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON ..
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' make
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' sudo make install &>/dev/null
|
||||
- cd ..
|
||||
script:
|
||||
- cd ./.travis
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' bash ./build_package.sh $PACKAGE
|
||||
notifications:
|
||||
email:
|
||||
on_success: change
|
||||
# default: always
|
||||
on_failure: always
|
||||
# default: always
|
||||
|
|
@ -1,144 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
[ -n "$CGAL_DEBUG_TRAVIS" ] && set -x
|
||||
|
||||
CXX_FLAGS="-DCGAL_NDEBUG -ftemplate-backtrace-limit=0"
|
||||
|
||||
function mytime {
|
||||
/usr/bin/time -f "Spend time of %C: %E (real)" "$@"
|
||||
}
|
||||
old_IFS=$IFS
|
||||
IFS=$' '
|
||||
ROOT="$PWD/.."
|
||||
for ARG in $(echo "$@")
|
||||
do
|
||||
#skip package maintenance
|
||||
if [ "$ARG" = "Maintenance" ]; then
|
||||
continue
|
||||
fi
|
||||
cd $ROOT
|
||||
|
||||
#install openmesh only if necessary
|
||||
if [ "$ARG" = "CHECK" ] || [ "$ARG" = BGL ] || [ "$ARG" = Convex_hull_3 ] ||\
|
||||
[ "$ARG" = Polygon_mesh_processing ] || [ "$ARG" = Property_map ] ||\
|
||||
[ "$ARG" = Surface_mesh_deformation ] || [ "$ARG" = Surface_mesh_shortest_path ] ||\
|
||||
[ "$ARG" = Surface_mesh_simplification ]; then
|
||||
mytime sudo bash .travis/install_openmesh.sh
|
||||
fi
|
||||
|
||||
|
||||
if [ "$ARG" = "CHECK" ]
|
||||
then
|
||||
cd .travis
|
||||
mytime ./generate_travis.sh --check
|
||||
cd ..
|
||||
IFS=$old_IFS
|
||||
mytime zsh $ROOT/Scripts/developer_scripts/test_merge_of_branch HEAD
|
||||
#test dependencies
|
||||
cd $ROOT
|
||||
mytime bash Scripts/developer_scripts/cgal_check_dependencies.sh --check_headers /usr/bin/doxygen
|
||||
|
||||
cd .travis
|
||||
#parse current matrix and check that no package has been forgotten
|
||||
|
||||
IFS=$'\n'
|
||||
COPY=0
|
||||
MATRIX=()
|
||||
for LINE in $(cat "$PWD/packages.txt")
|
||||
do
|
||||
MATRIX+="$LINE "
|
||||
done
|
||||
|
||||
PACKAGES=()
|
||||
cd ..
|
||||
for f in *
|
||||
do
|
||||
if [ -d "$f/package_info/$f" ]
|
||||
then
|
||||
PACKAGES+="$f "
|
||||
fi
|
||||
done
|
||||
|
||||
DIFFERENCE=$(echo ${MATRIX[@]} ${PACKAGES[@]} | tr ' ' '\n' | sort | uniq -u)
|
||||
IFS=$' '
|
||||
if [ "${DIFFERENCE[0]}" != "" ]
|
||||
then
|
||||
echo "The matrix and the actual package list differ : ."
|
||||
echo ${DIFFERENCE[*]}
|
||||
echo "You should run generate_travis.sh."
|
||||
exit 1
|
||||
fi
|
||||
echo "Matrix is up to date."
|
||||
#check if non standard cgal installation works
|
||||
cd $ROOT
|
||||
mkdir build_test
|
||||
cd build_test
|
||||
mytime cmake -DCMAKE_INSTALL_PREFIX=install/ -DCGAL_BUILD_THREE_DOC=TRUE ..
|
||||
mytime make install
|
||||
# test install with minimal downstream example
|
||||
mkdir installtest
|
||||
cd installtest
|
||||
touch main.cpp
|
||||
mkdir build
|
||||
echo 'project(Example)' >> CMakeLists.txt
|
||||
echo 'set(PROJECT_SRCS ${PROJECT_SOURCE_DIR}/main.cpp)' >> CMakeLists.txt
|
||||
echo 'find_package(CGAL REQUIRED)' >> CMakeLists.txt
|
||||
echo 'add_executable(${PROJECT_NAME} ${PROJECT_SRCS})' >> CMakeLists.txt
|
||||
echo 'target_link_libraries(${PROJECT_NAME} CGAL::CGAL)' >> CMakeLists.txt
|
||||
echo '#include "CGAL/remove_outliers.h"' >> main.cpp
|
||||
cd build
|
||||
mytime cmake -DCMAKE_INSTALL_PREFIX=../../install -DCGAL_BUILD_THREE_DOC=TRUE ..
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$ARG" = "Installation" ]
|
||||
then
|
||||
mkdir build_dir
|
||||
cd build_dir
|
||||
cmake -DWITH_tests=ON -DBUILD_TESTING=ON ..
|
||||
ctest -j2 -L CGAL_cmake_testsuite --output-on-failure
|
||||
cd ..
|
||||
rm -rf ./build_dir
|
||||
#==-- configure all CGAL with -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON, and then launch CTest on a few labels. --==
|
||||
mkdir config_dir
|
||||
cd config_dir
|
||||
cmake -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON -DBUILD_TESTING=ON ..
|
||||
ctest -j2 -L AABB_tree --output-on-failure
|
||||
cd ..
|
||||
rm -rf ./config_dir
|
||||
exit 0
|
||||
fi
|
||||
|
||||
IFS=$old_IFS
|
||||
|
||||
if [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ]; then
|
||||
DO_IGNORE=FALSE
|
||||
. $ROOT/.travis/test_package.sh "$ROOT" "$ARG"
|
||||
echo "DO_IGNORE is $DO_IGNORE"
|
||||
if [ "$DO_IGNORE" = "TRUE" ]; then
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
IFS=$' '
|
||||
mkdir -p build-travis
|
||||
cd build-travis
|
||||
WITHDEMOS=ON
|
||||
if [ "$ARG" = "Polyhedron" ]; then
|
||||
WITHDEMOS=OFF
|
||||
fi
|
||||
EXTRA_CXX_FLAGS=
|
||||
case "$CC" in
|
||||
clang*)
|
||||
EXTRA_CXX_FLAGS="-Werror=inconsistent-missing-override"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
mytime cmake -DCMAKE_CXX_FLAGS="${CXX_FLAGS} ${EXTRA_CXX_FLAGS}" -DCGAL_DONT_OVERRIDE_CMAKE_FLAGS:BOOL=ON -DBUILD_TESTING=ON -DWITH_tests=ON -DWITH_examples=ON -DWITH_demos=$WITHDEMOS ..
|
||||
mytime ctest -j2 -L $ARG'([_][A-Z]|$)' -E execution___of__ --output-on-failure
|
||||
done
|
||||
IFS=$old_IFS
|
||||
# Local Variables:
|
||||
# tab-width: 2
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
CHECK=
|
||||
case $1 in
|
||||
--check) CHECK=y;;
|
||||
esac
|
||||
|
||||
set -e
|
||||
cd ../
|
||||
|
||||
if [ -f "$PWD/.travis/packages.txt" ]
|
||||
then
|
||||
rm "$PWD/.travis/packages.txt"
|
||||
fi
|
||||
|
||||
#find all the packages
|
||||
PACKAGES=()
|
||||
INDEX=0
|
||||
i=0
|
||||
for f in *
|
||||
do
|
||||
if [ -d "$f/package_info/$f" ]
|
||||
then
|
||||
echo "$f" >> ./tmp.txt
|
||||
fi
|
||||
done
|
||||
LC_ALL=C sort ./tmp.txt > ./.travis/packages.txt
|
||||
rm ./tmp.txt
|
||||
while read p; do
|
||||
PACKAGES[$INDEX]+="$p "
|
||||
i=$[i+1]
|
||||
if [ $i = 3 ]
|
||||
then
|
||||
i=0
|
||||
INDEX=$[INDEX+1]
|
||||
fi
|
||||
done <./.travis/packages.txt
|
||||
if [ -f ".travis.yml" ]
|
||||
then
|
||||
#copy the current .travis.yml for later check
|
||||
mv ./.travis.yml ./.travis.old
|
||||
fi
|
||||
#writes the first part of the file
|
||||
old_IFS=$IFS
|
||||
IFS=$'\n'
|
||||
for LINE in $(cat "$PWD/.travis/template.txt")
|
||||
do
|
||||
if [ "$LINE" != " matrix:" ]
|
||||
then
|
||||
echo "$LINE" >> .travis.yml
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
echo " matrix:" >> .travis.yml
|
||||
#writes the matrix
|
||||
echo " - PACKAGE='CHECK'" >> .travis.yml
|
||||
for package in ${PACKAGES[@]}
|
||||
do
|
||||
echo " - PACKAGE='$package'" >> .travis.yml
|
||||
done
|
||||
|
||||
#writes the end of the file
|
||||
COPY=0
|
||||
for LINE in $(cat "$PWD/.travis/template.txt")
|
||||
do
|
||||
if [ "$LINE" = "compiler: clang" ]
|
||||
then
|
||||
COPY=1
|
||||
fi
|
||||
if [ $COPY = 1 ]
|
||||
then
|
||||
echo "$LINE" >> .travis.yml
|
||||
fi
|
||||
done
|
||||
IFS=$' '
|
||||
#check if there are differences between the files
|
||||
if ! cmp -s ./.travis.yml ./.travis.old;
|
||||
then
|
||||
echo ".travis.yml has changed : "
|
||||
diff ./.travis.yml ./.travis.old
|
||||
if [ -n "$CHECK" ]; then
|
||||
echo "You should modify the file .travis/template.txt"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
#erase old travis
|
||||
rm ./.travis.old
|
||||
IFS=$old_IFS
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 2
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
[ -n "$CGAL_DEBUG_TRAVIS" ] && set -x
|
||||
DONE=0
|
||||
sudo add-apt-repository ppa:mikhailnov/pulseeffects -y
|
||||
sudo apt-get update
|
||||
|
||||
while [ $DONE = 0 ]
|
||||
do
|
||||
DONE=1 && sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang-10 zsh \
|
||||
flex bison cmake graphviz libgmp-dev libmpfr-dev libmpfi-dev zlib1g-dev libeigen3-dev \
|
||||
qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev libqt5svg5-dev qttools5-dev qttools5-dev-tools qml-module-qtgraphicaleffects libopencv-dev mesa-common-dev libmetis-dev libglu1-mesa-dev \
|
||||
libboost1.72-dev || DONE=0 && sudo apt-get update
|
||||
done
|
||||
exit 0
|
||||
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/bash
|
||||
mkdir -p openmesh
|
||||
cd openmesh
|
||||
wget -O openmesh.tar.gz https://www.openmesh.org/media/Releases/6.3/OpenMesh-6.3.tar.gz
|
||||
tar xf openmesh.tar.gz --strip-components=1
|
||||
sed -i '94i #include <sys/time.h>' src/OpenMesh/Tools/Utils/conio.cc
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DBUILD_APPS=FALSE ..
|
||||
make -j2
|
||||
sudo make -j2 install &>/dev/null
|
||||
|
||||
#clean up
|
||||
cd ../..
|
||||
rm -rf ./openmesh
|
||||
|
|
@ -1,138 +0,0 @@
|
|||
AABB_tree
|
||||
Advancing_front_surface_reconstruction
|
||||
Algebraic_foundations
|
||||
Algebraic_kernel_d
|
||||
Algebraic_kernel_for_circles
|
||||
Algebraic_kernel_for_spheres
|
||||
Alpha_shapes_2
|
||||
Alpha_shapes_3
|
||||
Apollonius_graph_2
|
||||
Arithmetic_kernel
|
||||
Arrangement_on_surface_2
|
||||
BGL
|
||||
Barycentric_coordinates_2
|
||||
Boolean_set_operations_2
|
||||
Bounding_volumes
|
||||
Box_intersection_d
|
||||
CGAL_Core
|
||||
CGAL_ImageIO
|
||||
CGAL_ipelets
|
||||
Cartesian_kernel
|
||||
Circular_kernel_2
|
||||
Circular_kernel_3
|
||||
Circulator
|
||||
Classification
|
||||
Combinatorial_map
|
||||
Cone_spanners_2
|
||||
Convex_decomposition_3
|
||||
Convex_hull_2
|
||||
Convex_hull_3
|
||||
Convex_hull_d
|
||||
Distance_2
|
||||
Distance_3
|
||||
Envelope_2
|
||||
Envelope_3
|
||||
Filtered_kernel
|
||||
Generalized_map
|
||||
Generator
|
||||
Geomview
|
||||
GraphicsView
|
||||
HalfedgeDS
|
||||
Hash_map
|
||||
Heat_method_3
|
||||
Homogeneous_kernel
|
||||
Hyperbolic_triangulation_2
|
||||
Inscribed_areas
|
||||
Installation
|
||||
Interpolation
|
||||
Intersections_2
|
||||
Intersections_3
|
||||
Interval_skip_list
|
||||
Interval_support
|
||||
Jet_fitting_3
|
||||
Kernel_23
|
||||
Kernel_d
|
||||
LEDA
|
||||
Linear_cell_complex
|
||||
MacOSX
|
||||
Maintenance
|
||||
Matrix_search
|
||||
Mesh_2
|
||||
Mesh_3
|
||||
Mesher_level
|
||||
Minkowski_sum_2
|
||||
Minkowski_sum_3
|
||||
Modifier
|
||||
Modular_arithmetic
|
||||
Nef_2
|
||||
Nef_3
|
||||
Nef_S2
|
||||
NewKernel_d
|
||||
Number_types
|
||||
OpenNL
|
||||
Optimal_bounding_box
|
||||
Optimal_transportation_reconstruction_2
|
||||
Optimisation_basic
|
||||
Partition_2
|
||||
Periodic_2_triangulation_2
|
||||
Periodic_3_mesh_3
|
||||
Periodic_3_triangulation_3
|
||||
Periodic_4_hyperbolic_triangulation_2
|
||||
Point_set_2
|
||||
Point_set_3
|
||||
Point_set_processing_3
|
||||
Poisson_surface_reconstruction_3
|
||||
Polygon
|
||||
Polygon_mesh_processing
|
||||
Polygonal_surface_reconstruction
|
||||
Polyhedron
|
||||
Polyline_simplification_2
|
||||
Polynomial
|
||||
Polytope_distance_d
|
||||
Principal_component_analysis
|
||||
Principal_component_analysis_LGPL
|
||||
Profiling_tools
|
||||
Property_map
|
||||
QP_solver
|
||||
Random_numbers
|
||||
Ridges_3
|
||||
STL_Extension
|
||||
Scale_space_reconstruction_3
|
||||
Scripts
|
||||
SearchStructures
|
||||
Segment_Delaunay_graph_2
|
||||
Segment_Delaunay_graph_Linf_2
|
||||
Set_movable_separability_2
|
||||
Shape_detection
|
||||
Skin_surface_3
|
||||
Snap_rounding_2
|
||||
Solver_interface
|
||||
Spatial_searching
|
||||
Spatial_sorting
|
||||
Straight_skeleton_2
|
||||
Stream_lines_2
|
||||
Stream_support
|
||||
Subdivision_method_3
|
||||
Surface_mesh
|
||||
Surface_mesh_approximation
|
||||
Surface_mesh_deformation
|
||||
Surface_mesh_parameterization
|
||||
Surface_mesh_segmentation
|
||||
Surface_mesh_shortest_path
|
||||
Surface_mesh_simplification
|
||||
Surface_mesh_skeletonization
|
||||
Surface_mesh_topology
|
||||
Surface_mesher
|
||||
Surface_sweep_2
|
||||
TDS_2
|
||||
TDS_3
|
||||
Testsuite
|
||||
Tetrahedral_remeshing
|
||||
Three
|
||||
Triangulation
|
||||
Triangulation_2
|
||||
Triangulation_3
|
||||
Union_find
|
||||
Visibility_2
|
||||
Voronoi_diagram_2
|
||||
wininst
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
language: cpp
|
||||
dist: bionic
|
||||
sudo: required
|
||||
git:
|
||||
depth: 3
|
||||
env:
|
||||
matrix:
|
||||
PACKAGES_MATRIX
|
||||
|
||||
compiler: clang
|
||||
install:
|
||||
- echo "$PWD"
|
||||
- if [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' bash .travis/install.sh
|
||||
- export CXX=clang++-10 CC=clang-10;
|
||||
before_script:
|
||||
- wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe
|
||||
- sudo mv doxygen_exe /usr/bin/doxygen
|
||||
- sudo chmod +x /usr/bin/doxygen
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++1y" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON ..
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' make
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' sudo make install &>/dev/null
|
||||
- cd ..
|
||||
script:
|
||||
- cd ./.travis
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' bash ./build_package.sh $PACKAGE
|
||||
notifications:
|
||||
email:
|
||||
on_success: change
|
||||
# default: always
|
||||
on_failure: always
|
||||
# default: always
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
#Will cd $1 and test package named $2
|
||||
#to find out if it or one of its dependencies has changed in the current branch
|
||||
|
||||
DO_IGNORE=FALSE
|
||||
cd $1
|
||||
|
||||
if [ ! -d "$2" ]; then
|
||||
echo "$2 : MISSING PACKAGE. Ignoring."
|
||||
DO_IGNORE=TRUE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -f "$2/package_info/$2/dependencies" ];then
|
||||
echo "No dependencies found for $2"
|
||||
bash Scripts/developer_scripts/cgal_check_dependencies.sh --check_headers /usr/bin/doxygen
|
||||
exit 1
|
||||
fi
|
||||
LIST_OF_FILES=$(git diff --name-only origin/master... |cut -d/ -f1 |uniq |sort)
|
||||
LIST_OF_DEPS=$(cat "$2/package_info/$2/dependencies")
|
||||
echo "$LIST_OF_DEPS"
|
||||
for flie in $LIST_OF_DEPS
|
||||
do
|
||||
[[ $LIST_OF_FILES =~ (^|[[:space:]])$flie($|[[:space:]]) ]] && return
|
||||
done
|
||||
echo "Package ignored because none of its dependencies has been modified."
|
||||
DO_IGNORE=TRUE
|
||||
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
|
||||
#define FAR #error named reserved in windows.h
|
||||
#define far #error named reserved in windows.h
|
||||
|
||||
#define Polyline #error named reserved in windows.h
|
||||
#define Polygon #error named reserved in windows.h
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.14)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(AABB_traits_benchmark)
|
||||
|
||||
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# This is the CMake script for compiling the AABB tree demo.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(AABB_tree_Demo)
|
||||
|
||||
# Find includes in corresponding build directories
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ void MainWindow::on_actionInside_points_triggered()
|
|||
bool ok;
|
||||
|
||||
const unsigned int nb_points = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Points",
|
||||
QInputDialog::getInt(nullptr, "#Points",
|
||||
"#Points:",10000,1,100000000,9,&ok);
|
||||
|
||||
if(!ok)
|
||||
|
|
@ -171,19 +171,19 @@ void MainWindow::on_actionPoints_in_interval_triggered()
|
|||
bool ok;
|
||||
|
||||
const unsigned int nb_points = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Points",
|
||||
QInputDialog::getInt(nullptr, "#Points",
|
||||
"#Points:",10000,1,100000000,9,&ok);
|
||||
|
||||
if(!ok)
|
||||
return;
|
||||
|
||||
const double min =
|
||||
QInputDialog::getDouble(NULL, "min",
|
||||
QInputDialog::getDouble(nullptr, "min",
|
||||
"Min:",-0.1,-1000.0,1000.0,9,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
const double max =
|
||||
QInputDialog::getDouble(NULL, "max",
|
||||
QInputDialog::getDouble(nullptr, "max",
|
||||
"Max:",0.1,-1000.0,1000.0,9,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
|
|
@ -199,7 +199,7 @@ void MainWindow::on_actionBoundary_segments_triggered()
|
|||
bool ok;
|
||||
|
||||
const unsigned int nb_slices = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Slices",
|
||||
QInputDialog::getInt(nullptr, "#Slices",
|
||||
"Slices:",100,1,1000000,8,&ok);
|
||||
|
||||
if(!ok)
|
||||
|
|
@ -216,7 +216,7 @@ void MainWindow::on_actionBoundary_points_triggered()
|
|||
bool ok;
|
||||
|
||||
const unsigned int nb_points = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Points",
|
||||
QInputDialog::getInt(nullptr, "#Points",
|
||||
"Points:",1000,1,10000000,8,&ok);
|
||||
|
||||
if(!ok)
|
||||
|
|
@ -233,7 +233,7 @@ void MainWindow::on_actionEdge_points_triggered()
|
|||
bool ok;
|
||||
|
||||
const unsigned int nb_points = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Points",
|
||||
QInputDialog::getInt(nullptr, "#Points",
|
||||
"Points:",1000,1,10000000,8,&ok);
|
||||
|
||||
if(!ok)
|
||||
|
|
@ -248,7 +248,7 @@ void MainWindow::on_actionEdge_points_triggered()
|
|||
void MainWindow::on_actionBench_distances_triggered()
|
||||
{
|
||||
bool ok;
|
||||
const double duration = QInputDialog::getDouble(NULL, "Duration",
|
||||
const double duration = QInputDialog::getDouble(nullptr, "Duration",
|
||||
"Duration (s):",1.0,0.01,1000,8,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
|
|
@ -262,7 +262,7 @@ void MainWindow::on_actionBench_distances_triggered()
|
|||
void MainWindow::on_actionBench_intersections_triggered()
|
||||
{
|
||||
bool ok;
|
||||
const double duration = QInputDialog::getDouble(NULL, "Duration",
|
||||
const double duration = QInputDialog::getDouble(nullptr, "Duration",
|
||||
"Duration (s):",1.0,0.01,1000.0,8,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
|
|
@ -361,7 +361,7 @@ void MainWindow::on_actionRefine_bisection_triggered()
|
|||
{
|
||||
bool ok;
|
||||
const double max_len =
|
||||
QInputDialog::getDouble(NULL, "Max edge len",
|
||||
QInputDialog::getDouble(nullptr, "Max edge len",
|
||||
"Max edge len:",0.1,0.001,100.0,9,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class MainWindow :
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MainWindow(QWidget* parent = 0);
|
||||
MainWindow(QWidget* parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
public slots:
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ Scene::Scene()
|
|||
, m_grid_size(slow_distance_grid_size)
|
||||
, m_cut_plane(NONE)
|
||||
{
|
||||
m_pPolyhedron = NULL;
|
||||
m_pPolyhedron = nullptr;
|
||||
|
||||
// view options
|
||||
m_view_points = true;
|
||||
|
|
@ -541,7 +541,7 @@ int Scene::open(QString filename)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if(m_pPolyhedron != NULL)
|
||||
if(m_pPolyhedron != nullptr)
|
||||
delete m_pPolyhedron;
|
||||
|
||||
// allocate new polyhedron
|
||||
|
|
@ -553,7 +553,7 @@ int Scene::open(QString filename)
|
|||
QApplication::restoreOverrideCursor();
|
||||
|
||||
delete m_pPolyhedron;
|
||||
m_pPolyhedron = NULL;
|
||||
m_pPolyhedron = nullptr;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -571,7 +571,7 @@ void Scene::update_bbox()
|
|||
std::cout << "Compute bbox...";
|
||||
m_bbox = Bbox();
|
||||
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "failed (no polyhedron)." << std::endl;
|
||||
return;
|
||||
|
|
@ -794,7 +794,7 @@ FT Scene::bbox_diag() const
|
|||
|
||||
void Scene::build_facet_tree()
|
||||
{
|
||||
if ( NULL == m_pPolyhedron )
|
||||
if ( nullptr == m_pPolyhedron )
|
||||
{
|
||||
std::cerr << "Build facet tree failed: load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -813,7 +813,7 @@ void Scene::build_facet_tree()
|
|||
|
||||
void Scene::build_edge_tree()
|
||||
{
|
||||
if ( NULL == m_pPolyhedron )
|
||||
if ( nullptr == m_pPolyhedron )
|
||||
{
|
||||
std::cerr << "Build edge tree failed: load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -860,7 +860,7 @@ void Scene::generate_points_in(const unsigned int nb_points,
|
|||
const double vmin,
|
||||
const double vmax)
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -913,7 +913,7 @@ void Scene::generate_points_in(const unsigned int nb_points,
|
|||
|
||||
void Scene::generate_inside_points(const unsigned int nb_points)
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -955,7 +955,7 @@ void Scene::generate_inside_points(const unsigned int nb_points)
|
|||
|
||||
void Scene::generate_boundary_segments(const unsigned int nb_slices)
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -1005,7 +1005,7 @@ void Scene::generate_boundary_segments(const unsigned int nb_slices)
|
|||
|
||||
void Scene::generate_boundary_points(const unsigned int nb_points)
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -1055,7 +1055,7 @@ void Scene::generate_boundary_points(const unsigned int nb_points)
|
|||
|
||||
void Scene::generate_edge_points(const unsigned int nb_points)
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -1219,7 +1219,7 @@ void Scene::cut_segment_plane()
|
|||
{
|
||||
const Segment* inter_seg = CGAL::object_cast<Segment>(&(it->first));
|
||||
|
||||
if ( NULL != inter_seg )
|
||||
if ( nullptr != inter_seg )
|
||||
{
|
||||
m_cut_segments.push_back(*inter_seg);
|
||||
}
|
||||
|
|
@ -1280,7 +1280,7 @@ void Scene::toggle_view_plane()
|
|||
|
||||
void Scene::refine_bisection(const FT max_sqlen)
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -1295,7 +1295,7 @@ void Scene::refine_bisection(const FT max_sqlen)
|
|||
|
||||
void Scene::refine_loop()
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
Viewer::Viewer(QWidget* parent)
|
||||
: CGAL::QGLViewer(parent),
|
||||
m_pScene(NULL),
|
||||
m_pScene(nullptr),
|
||||
m_custom_mouse(false)
|
||||
{
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ void Viewer::setScene(Scene* pScene)
|
|||
void Viewer::draw()
|
||||
{
|
||||
CGAL::QGLViewer::draw();
|
||||
if(m_pScene != NULL)
|
||||
if(m_pScene != nullptr)
|
||||
{
|
||||
m_pScene->draw(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
void Scene::benchmark_intersections(const double duration)
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -67,7 +67,7 @@ void Scene::bench_intersections(Facet_tree& tree,
|
|||
|
||||
void Scene::benchmark_distances(const double duration)
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -101,7 +101,7 @@ std::size_t Scene::nb_digits(std::size_t value)
|
|||
// refinement loop
|
||||
void Scene::bench_memory()
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -137,7 +137,7 @@ void Scene::bench_memory()
|
|||
|
||||
void Scene::bench_construction()
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -174,7 +174,7 @@ void Scene::bench_construction()
|
|||
|
||||
void Scene::bench_intersections_vs_nbt()
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -218,7 +218,7 @@ void Scene::bench_intersections_vs_nbt()
|
|||
|
||||
void Scene::bench_distances_vs_nbt()
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -45,11 +45,9 @@ typedef unspecified_type Do_intersect_3;
|
|||
|
||||
/*!
|
||||
A functor object to construct the intersection between two geometric objects.
|
||||
This functor must support the result_of protocol, that is the return
|
||||
type of the `operator()(A, B)` is `CGAL::cpp11::result<Intersect_3(A,B)>`.
|
||||
|
||||
Provides the operators:
|
||||
`CGAL::cpp11::result<Intersect_3(A,B)> operator()(const A& a, const B& b);`
|
||||
`decltype(auto) operator()(const A& a, const B& b);`
|
||||
where `A` and `B` are any relevant types among `Ray_3`, `Segment_3`, `Line_3`,
|
||||
`Triangle_3`, `Plane_3` and `Bbox_3`.
|
||||
Relevant herein means that a line primitive (ray, segment, line) is tested
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ void triangle_mesh(const char* fname)
|
|||
typedef CGAL::AABB_tree<Traits> Tree;
|
||||
|
||||
TriangleMesh tmesh;
|
||||
if(!CGAL::read_polygon_mesh(fname, tmesh) || CGAL::is_triangle_mesh(tmesh))
|
||||
if(!CGAL::IO::read_polygon_mesh(fname, tmesh) || CGAL::is_triangle_mesh(tmesh))
|
||||
{
|
||||
std::cerr << "Invalid input." << std::endl;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ public:
|
|||
// types
|
||||
typedef CGAL::AABB_traits<K, My_triangle_primitive> My_AABB_traits;
|
||||
typedef CGAL::AABB_tree<My_AABB_traits> Tree;
|
||||
const double* My_triangle_primitive::point_container = 0;
|
||||
const double* My_triangle_primitive::point_container = nullptr;
|
||||
|
||||
int main()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ public:
|
|||
// types
|
||||
typedef CGAL::AABB_traits<K, My_triangle_primitive> My_AABB_traits;
|
||||
typedef CGAL::AABB_tree<My_AABB_traits> Tree;
|
||||
const std::vector<My_point>* My_triangle_primitive::point_container = 0;
|
||||
const std::vector<My_point>* My_triangle_primitive::point_container = nullptr;
|
||||
|
||||
int main()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ int main(int argc, char* argv[])
|
|||
const char* filename = (argc > 1) ? argv[1] : "data/tetrahedron.off";
|
||||
|
||||
Mesh mesh;
|
||||
if(!CGAL::read_polygon_mesh(filename, mesh))
|
||||
if(!CGAL::IO::read_polygon_mesh(filename, mesh))
|
||||
{
|
||||
std::cerr << "Invalid input." << std::endl;
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(AABB_tree_Examples)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include <CGAL/disable_warnings.h>
|
||||
|
||||
#include <CGAL/AABB_primitive.h>
|
||||
#include <CGAL/result_of.h>
|
||||
#include <iterator>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
@ -31,14 +30,17 @@ namespace internal {
|
|||
//classical typedefs
|
||||
typedef Iterator key_type;
|
||||
typedef typename GeomTraits::Point_3 value_type;
|
||||
typedef typename cpp11::result_of<
|
||||
typename GeomTraits::Construct_source_3(typename GeomTraits::Segment_3)
|
||||
>::type reference;
|
||||
// typedef decltype(
|
||||
// std::declval<typename GeomTraits::Construct_source_3>()(
|
||||
// std::declval<typename GeomTraits::Segment_3>())) reference;
|
||||
typedef decltype(
|
||||
typename GeomTraits::Construct_source_3()(
|
||||
*std::declval<key_type&>())) reference;
|
||||
typedef boost::readable_property_map_tag category;
|
||||
typedef Source_of_segment_3_iterator_property_map<GeomTraits, Iterator> Self;
|
||||
|
||||
inline friend
|
||||
typename Source_of_segment_3_iterator_property_map<GeomTraits,Iterator>::reference
|
||||
get(Source_of_segment_3_iterator_property_map<GeomTraits,Iterator>, Iterator it)
|
||||
inline friend reference
|
||||
get(Self, key_type it)
|
||||
{
|
||||
return typename GeomTraits::Construct_source_3()( *it );
|
||||
}
|
||||
|
|
@ -57,7 +59,6 @@ namespace internal {
|
|||
* \tparam GeomTraits is a traits class providing the nested type `Point_3` and `Segment_3`.
|
||||
* It also provides the functor `Construct_source_3` that has an operator taking a `Segment_3`
|
||||
* and returning its source as a type convertible to `Point_3`.
|
||||
* In addition `Construct_source_3` must support the result_of protocol.
|
||||
* \tparam Iterator is a model of `ForwardIterator` with its value type convertible to `GeomTraits::Segment_3`
|
||||
* \tparam CacheDatum is either `CGAL::Tag_true` or `CGAL::Tag_false`. In the former case,
|
||||
* the datum is stored in the primitive, while in the latter it is
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
#include <CGAL/internal/AABB_tree/Has_nested_type_Shared_data.h>
|
||||
#include <CGAL/internal/AABB_tree/Is_ray_intersection_geomtraits.h>
|
||||
#include <CGAL/internal/AABB_tree/Primitive_helper.h>
|
||||
#include <CGAL/internal/Has_boolean_tags.h>
|
||||
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
|
|
@ -190,14 +192,14 @@ public:
|
|||
typedef typename std::pair<typename GeomTraits::Point_3, typename Primitive::Id> Point_and_primitive_id;
|
||||
|
||||
/// `Intersection_and_primitive_id<Query>::%Type::first_type` is found according to
|
||||
/// the result type of `GeomTraits::Intersect_3::operator()`,
|
||||
/// (that is cpp11::result_of<GeomTraits::Intersect_3(Query, Primitive::Datum)>::type). If it is
|
||||
/// the result type of `GeomTraits::Intersect_3::operator()`. If it is
|
||||
/// `boost::optional<T>` then it is `T`, and the result type otherwise.
|
||||
template<typename Query>
|
||||
struct Intersection_and_primitive_id {
|
||||
typedef typename cpp11::result_of<
|
||||
typename GeomTraits::Intersect_3(Query, typename Primitive::Datum)
|
||||
>::type Intersection_type;
|
||||
typedef decltype(
|
||||
std::declval<typename GeomTraits::Intersect_3>()(
|
||||
std::declval<Query>(),
|
||||
std::declval<typename Primitive::Datum>())) Intersection_type;
|
||||
|
||||
typedef std::pair<
|
||||
typename internal::AABB_tree::Remove_optional<Intersection_type>::type,
|
||||
|
|
@ -364,8 +366,7 @@ public:
|
|||
template<typename Query>
|
||||
boost::optional< typename Intersection_and_primitive_id<Query>::Type >
|
||||
operator()(const Query& query, const typename AT::Primitive& primitive) const {
|
||||
typename cpp11::result_of<typename GeomTraits::Intersect_3(Query, typename Primitive::Datum) >::type
|
||||
inter_res = GeomTraits().intersect_3_object()(internal::Primitive_helper<AT>::get_datum(primitive,m_traits),query);
|
||||
auto inter_res = GeomTraits().intersect_3_object()(internal::Primitive_helper<AT>::get_datum(primitive,m_traits),query);
|
||||
if (!inter_res)
|
||||
return boost::none;
|
||||
return boost::make_optional( std::make_pair(*inter_res, primitive.id()) );
|
||||
|
|
@ -414,6 +415,27 @@ public:
|
|||
CGAL::SMALLER : CGAL::LARGER;
|
||||
}
|
||||
|
||||
CGAL::Comparison_result operator()(const Point& p, const Bounding_box& bb, const Point& bound, Tag_true) const
|
||||
{
|
||||
return GeomTraits().do_intersect_3_object()
|
||||
(GeomTraits().construct_sphere_3_object()
|
||||
(p, GeomTraits().compute_squared_distance_3_object()(p, bound)), bb,true)?
|
||||
CGAL::SMALLER : CGAL::LARGER;
|
||||
}
|
||||
|
||||
CGAL::Comparison_result operator()(const Point& p, const Bounding_box& bb, const Point& bound, Tag_false) const
|
||||
{
|
||||
return GeomTraits().do_intersect_3_object()
|
||||
(GeomTraits().construct_sphere_3_object()
|
||||
(p, GeomTraits().compute_squared_distance_3_object()(p, bound)), bb)?
|
||||
CGAL::SMALLER : CGAL::LARGER;
|
||||
}
|
||||
|
||||
CGAL::Comparison_result operator()(const Point& p, const Bounding_box& bb, const Point& bound) const
|
||||
{
|
||||
return (*this)(p, bb, bound, Boolean_tag<internal::Has_static_filters<GeomTraits>::value>());
|
||||
}
|
||||
|
||||
template <class Solid>
|
||||
CGAL::Comparison_result operator()(const Point& p, const Solid& pr, const FT& sq_distance) const
|
||||
{
|
||||
|
|
@ -423,11 +445,17 @@ public:
|
|||
CGAL::SMALLER :
|
||||
CGAL::LARGER;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Closest_point closest_point_object() const {return Closest_point(*this);}
|
||||
Compare_distance compare_distance_object() const {return Compare_distance();}
|
||||
|
||||
typedef enum { CGAL_AXIS_X = 0,
|
||||
CGAL_AXIS_Y = 1,
|
||||
CGAL_AXIS_Z = 2} Axis;
|
||||
|
||||
static Axis longest_axis(const Bounding_box& bbox);
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
@ -446,13 +474,6 @@ private:
|
|||
return internal::Primitive_helper<AT>::get_datum(pr,*this).bbox();
|
||||
}
|
||||
|
||||
|
||||
typedef enum { CGAL_AXIS_X = 0,
|
||||
CGAL_AXIS_Y = 1,
|
||||
CGAL_AXIS_Z = 2} Axis;
|
||||
|
||||
static Axis longest_axis(const Bounding_box& bbox);
|
||||
|
||||
/// Comparison functions
|
||||
static bool less_x(const Primitive& pr1, const Primitive& pr2,const AABB_traits<GeomTraits,AABBPrimitive, BboxMap>& traits)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ namespace CGAL {
|
|||
Self& operator=(const Self&) = delete;
|
||||
|
||||
/**
|
||||
* @brief Builds the datastructure from a sequence of primitives.
|
||||
* @brief Builds the data structure from a sequence of primitives.
|
||||
* @param first iterator over first primitive to insert
|
||||
* @param beyond past-the-end iterator
|
||||
*
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include <CGAL/disable_warnings.h>
|
||||
|
||||
#include <CGAL/AABB_primitive.h>
|
||||
#include <CGAL/result_of.h>
|
||||
#include <iterator>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
@ -31,14 +30,18 @@ namespace internal {
|
|||
//classical typedefs
|
||||
typedef Iterator key_type;
|
||||
typedef typename GeomTraits::Point_3 value_type;
|
||||
typedef typename cpp11::result_of<
|
||||
typename GeomTraits::Construct_vertex_3(typename GeomTraits::Triangle_3,int)
|
||||
>::type reference;
|
||||
// typedef decltype(
|
||||
// std::declval<typename GeomTraits::Construct_vertex_3>()(
|
||||
// std::declval<typename GeomTraits::Triangle_3>(),
|
||||
// std::declval<int>())) reference;
|
||||
typedef decltype(
|
||||
typename GeomTraits::Construct_vertex_3()(
|
||||
*std::declval<key_type&>(), 0)) reference;
|
||||
typedef boost::readable_property_map_tag category;
|
||||
typedef Point_from_triangle_3_iterator_property_map<GeomTraits, Iterator> Self;
|
||||
|
||||
inline friend
|
||||
typename Point_from_triangle_3_iterator_property_map<GeomTraits,Iterator>::reference
|
||||
get(Point_from_triangle_3_iterator_property_map<GeomTraits,Iterator>, Iterator it)
|
||||
inline friend reference
|
||||
get(Self, key_type it)
|
||||
{
|
||||
return typename GeomTraits::Construct_vertex_3()( *it, 0 );
|
||||
}
|
||||
|
|
@ -57,7 +60,6 @@ namespace internal {
|
|||
* \tparam GeomTraits is a traits class providing the nested type `Point_3` and `Triangle_3`.
|
||||
* It also provides the functor `Construct_vertex_3` that has an operator taking a `Triangle_3`
|
||||
* and an integer as parameters and returning a triangle point as a type convertible to `Point_3`.
|
||||
* In addition `Construct_vertex_3` must support the result_of protocol.
|
||||
* \tparam Iterator is a model of `ForwardIterator` with its value type convertible to `GeomTraits::Triangle_3`
|
||||
* \tparam CacheDatum is either `CGAL::Tag_true` or `CGAL::Tag_false`. In the former case,
|
||||
* the datum is stored in the primitive, while in the latter it is
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
|
||||
#include <CGAL/AABB_primitive.h>
|
||||
#include <CGAL/result_of.h>
|
||||
#include <iterator>
|
||||
|
||||
namespace CGAL
|
||||
|
|
@ -31,14 +30,18 @@ namespace CGAL
|
|||
//classical typedefs
|
||||
typedef Iterator key_type;
|
||||
typedef typename GeomTraits::Point_3 value_type;
|
||||
typedef typename cpp11::result_of<
|
||||
typename GeomTraits::Construct_vertex_3(typename GeomTraits::Tetrahedron_3, int)
|
||||
>::type reference;
|
||||
typedef decltype(
|
||||
std::declval<typename GeomTraits::Construct_vertex_3>()(
|
||||
std::declval<typename GeomTraits::Tetrahedron_3>(),
|
||||
std::declval<int>())) reference;
|
||||
// typedef decltype(
|
||||
// typename GeomTraits::Construct_vertex_3()(
|
||||
// *std::declval<key_type&>(), 0)) reference; // fails polyhedron demo!
|
||||
typedef boost::readable_property_map_tag category;
|
||||
typedef Point_from_cell_iterator_proprety_map<GeomTraits, Iterator> Self;
|
||||
|
||||
inline friend
|
||||
typename Point_from_cell_iterator_proprety_map<GeomTraits, Iterator>::reference
|
||||
get(Point_from_cell_iterator_proprety_map<GeomTraits, Iterator>, Iterator it)
|
||||
inline friend reference
|
||||
get(Self, key_type it)
|
||||
{
|
||||
typename GeomTraits::Construct_point_3 point;
|
||||
return point(it->vertex(1)->point());
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(AABB_tree_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,159 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAdvancingFrontSurfaceReconstructionRef
|
||||
\cgalConcept
|
||||
|
||||
The concept `AdvancingFrontSurfaceReconstructionTraits_3` describes the requirements
|
||||
for the the geometric traits of the class `CGAL::Delaunay_triangulation_3`
|
||||
used in the class `CGAL::Advancing_front_surface_reconstruction`.
|
||||
It defines the geometric objects (points, segments...) forming the triangulation
|
||||
together with a few geometric predicates and constructions on these objects.
|
||||
|
||||
\cgalRefines `DelaunayTriangulationTraits_3`
|
||||
|
||||
\cgalHasModel All models of `Kernel`.
|
||||
*/
|
||||
class AdvancingFrontSurfaceReconstructionTraits_3
|
||||
{
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
The coordinate type.
|
||||
*/
|
||||
typedef unspecified_type FT;
|
||||
|
||||
/*!
|
||||
The vector type.
|
||||
*/
|
||||
typedef unspecified_type Vector_3;
|
||||
|
||||
/*!
|
||||
The sphere type.
|
||||
*/
|
||||
typedef unspecified_type Sphere_3;
|
||||
|
||||
/*!
|
||||
A constructor object that must provide the function operator
|
||||
|
||||
`Vector_3 operator()(Point_3 p, Point_3 q)`,
|
||||
|
||||
which constructs the vector `q-p`.
|
||||
*/
|
||||
typedef unspecified_type Construct_vector_3;
|
||||
|
||||
/*!
|
||||
A constructor object that must provide the function operator
|
||||
|
||||
`Vector_3 operator()(Vector_3 v, Vector_3 w)`,
|
||||
|
||||
which returns the cross product of `v` and `w`.
|
||||
*/
|
||||
typedef unspecified_type Construct_cross_product_vector_3;
|
||||
|
||||
/*!
|
||||
A constructor object that must provide the function operator
|
||||
|
||||
`FT operator()(Vector_3 v, Vector_3 w)`,
|
||||
|
||||
which returns the scalar (inner) product of `v` and `w`.
|
||||
*/
|
||||
typedef unspecified_type Compute_scalar_product_3;
|
||||
|
||||
/*!
|
||||
A constructor object that must provide the function operator
|
||||
|
||||
`Sphere_3 operator()(Point_3 p, Point_3 q, Point_3 r)`,
|
||||
|
||||
which constructs a sphere initialized to the smallest sphere which passes
|
||||
through the points `p`, `q`, and `r`.
|
||||
*/
|
||||
typedef unspecified_type Construct_sphere_3;
|
||||
|
||||
/*!
|
||||
A constructor object that must provide the function operator
|
||||
|
||||
`Point_3 operator()(Sphere_3 s)`,
|
||||
|
||||
which returns the center of the sphere `s`.
|
||||
*/
|
||||
typedef unspecified_type Construct_center_3;
|
||||
|
||||
/*!
|
||||
A constructor object that must provide the function operators
|
||||
|
||||
`FT operator()(Point_3 p, Point_3 q, Point_3 r, Point_3 s)`,
|
||||
|
||||
which returns the squared radius of the sphere passing through `p`, `q` and `r`,
|
||||
and whose center is in the plane defined by these three points.
|
||||
|
||||
and
|
||||
|
||||
`FT operator()(Point_3 p, Point_3 q, Point_3 r, Point_3 s)`,
|
||||
|
||||
which returns the squared radius of the sphere passing through `p`, `q`, `r`, and `s`.
|
||||
|
||||
and
|
||||
|
||||
`FT operator()(Sphere_3 s)`,
|
||||
|
||||
which returns the squared radius of the sphere `s`.
|
||||
*/
|
||||
typedef unspecified_type Compute_squared_radius_3;
|
||||
|
||||
/*!
|
||||
A constructor object that must provide the function operator
|
||||
|
||||
`FT operator()(Point_3 p, Point_3 q)`,
|
||||
|
||||
which returns the squared distance between the points `p` and `q`.
|
||||
*/
|
||||
typedef unspecified_type Compute_squared_distance_3;
|
||||
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// The following functions give access to the predicate and construction objects:
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
gives access to the `Construct_vector_3` construction.
|
||||
*/
|
||||
Construct_vector_3 construct_vector_3_object();
|
||||
|
||||
/*!
|
||||
gives access to the `Construct_cross_product_vector_3` construction.
|
||||
*/
|
||||
Construct_cross_product_vector_3 construct_cross_product_vector_3_object();
|
||||
|
||||
/*!
|
||||
gives access to the `Compute_scalar_product_3` construction.
|
||||
*/
|
||||
Compute_scalar_product_3 compute_scalar_product_3_object();
|
||||
|
||||
/*!
|
||||
gives access to the `Construct_sphere_3` construction.
|
||||
*/
|
||||
Construct_sphere_3 construct_sphere_3_object();
|
||||
|
||||
/*!
|
||||
gives access to the `Construct_center_3` construction.
|
||||
*/
|
||||
Construct_center_3 construct_center_3_object();
|
||||
|
||||
/*!
|
||||
gives access to the `Compute_squared_radius_3` construction.
|
||||
*/
|
||||
Compute_squared_radius_3 compute_squared_radius_3_object();
|
||||
|
||||
/*!
|
||||
gives access to the `Compute_squared_distance_3` construction.
|
||||
*/
|
||||
Compute_squared_distance_3 compute_squared_distance_3_object();
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end AdvancingFrontSurfaceReconstructionTraits_3 */
|
||||
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
/// \defgroup PkgAdvancingFrontSurfaceReconstructionRef Advancing Front Surface Reconstruction Reference
|
||||
|
||||
/// \defgroup PkgAdvancingFrontSurfaceReconstructionRefConcepts Concepts
|
||||
/// \ingroup PkgAdvancingFrontSurfaceReconstructionRef
|
||||
|
||||
/*!
|
||||
\addtogroup PkgAdvancingFrontSurfaceReconstructionRef
|
||||
|
||||
|
|
@ -25,6 +28,10 @@ of topological singularities. }
|
|||
|
||||
\cgalClassifedRefPages
|
||||
|
||||
\cgalCRPSection{Concepts}
|
||||
|
||||
- `AdvancingFrontSurfaceReconstructionTraits_3`
|
||||
|
||||
\cgalCRPSection{Classes}
|
||||
|
||||
- `CGAL::Advancing_front_surface_reconstruction`
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ Algebraic_foundations
|
|||
Circulator
|
||||
Stream_support
|
||||
TDS_2
|
||||
TDS_3
|
||||
Triangulation_2
|
||||
Triangulation_3
|
||||
Number_types
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Advancing_front_surface_reconstruction_Examples)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -114,9 +114,9 @@ int main (int argc, char* argv[])
|
|||
const char* fname = (argc>1) ? argv[1] : "data/cube.pwn";
|
||||
// Loading point set from a file.
|
||||
|
||||
if (!CGAL::read_points(fname, std::back_inserter(points),
|
||||
CGAL::parameters::point_map(Point_map()).
|
||||
normal_map(Normal_map())))
|
||||
if (!CGAL::IO::read_points(fname, std::back_inserter(points),
|
||||
CGAL::parameters::point_map(Point_map()).
|
||||
normal_map(Normal_map())))
|
||||
{
|
||||
std::cerr << "Error: cannot read file" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
|||
|
|
@ -175,23 +175,42 @@ namespace CGAL {
|
|||
store handles to the vertices and faces of the 3D triangulation, which enables the user to explore the
|
||||
2D as well as 3D neighborhood of vertices and facets of the surface.
|
||||
|
||||
\tparam Dt must be a `Delaunay_triangulation_3` with
|
||||
`Advancing_front_surface_reconstruction_vertex_base_3` and `Advancing_front_surface_reconstruction_cell_base_3` blended into the vertex and cell type.
|
||||
The default uses the `Exact_predicates_inexact_constructions_kernel` as geometric traits class.
|
||||
\tparam Dt must be a `Delaunay_triangulation_3` whose `Traits` template parameter must be a model of
|
||||
`AdvancingFrontSurfaceReconstructionTraits_3` and whose `Tds` template parameter must be
|
||||
a model of `TriangulationDataStructure_3` with `Advancing_front_surface_reconstruction_vertex_base_3` and
|
||||
`Advancing_front_surface_reconstruction_cell_base_3` blended into the vertex and cell type, respectively.
|
||||
The default value is:
|
||||
\code
|
||||
CGAL::Delaunay_triangulation_3<CGAL::Exact_predicates_inexact_constructions_kernel,
|
||||
CGAL::Triangulation_data_structure_3<
|
||||
CGAL::Advancing_front_surface_reconstruction_vertex_base_3<
|
||||
CGAL::Exact_predicates_inexact_constructions_kernel>,
|
||||
CGAL::Advancing_front_surface_reconstruction_cell_base_3<
|
||||
CGAL::Exact_predicates_inexact_constructions_kernel> > >`
|
||||
\endcode
|
||||
|
||||
\tparam P must be a functor with `double operator()(AdvancingFront,Cell_handle,int)` returning the
|
||||
priority of the facet `(Cell_handle,int)`. This functor enables the user to choose how candidate
|
||||
triangles are prioritized. If a facet should not appear in the output,
|
||||
\tparam P must be a functor offering
|
||||
\code
|
||||
FT operator()(Advancing_front_surface_reconstruction,Cell_handle,int)
|
||||
\endcode
|
||||
returning the priority of the facet `(Cell_handle,int)`. This functor enables the user
|
||||
to choose how candidate triangles are prioritized. If a facet should not appear in the output,
|
||||
`infinity()` must be returned. It defaults to a functor that returns the
|
||||
`smallest_radius_delaunay_sphere()`.
|
||||
|
||||
*/
|
||||
template <
|
||||
class Dt = Default,
|
||||
class P = Default>
|
||||
class Advancing_front_surface_reconstruction {
|
||||
|
||||
typedef typename Default::Get<Dt,Delaunay_triangulation_3<Exact_predicates_inexact_constructions_kernel, Triangulation_data_structure_3<Advancing_front_surface_reconstruction_vertex_base_3<Exact_predicates_inexact_constructions_kernel>, Advancing_front_surface_reconstruction_cell_base_3<Exact_predicates_inexact_constructions_kernel> > > >::type Triangulation;
|
||||
template <class Dt = Default,
|
||||
class P = Default>
|
||||
class Advancing_front_surface_reconstruction
|
||||
{
|
||||
typedef typename Default::Get<Dt,
|
||||
Delaunay_triangulation_3<
|
||||
Exact_predicates_inexact_constructions_kernel,
|
||||
Triangulation_data_structure_3<
|
||||
Advancing_front_surface_reconstruction_vertex_base_3<
|
||||
Exact_predicates_inexact_constructions_kernel>,
|
||||
Advancing_front_surface_reconstruction_cell_base_3<
|
||||
Exact_predicates_inexact_constructions_kernel> > > >::type Triangulation;
|
||||
typedef typename Default::Get<P,AFSR::Default_priority>::type Priority;
|
||||
public:
|
||||
|
||||
|
|
@ -202,9 +221,9 @@ namespace CGAL {
|
|||
/*!
|
||||
The type of the 2D triangulation data structure describing the reconstructed surface, being a model of `TriangulationDataStructure_2`.
|
||||
- The type `Triangulation_data_structure_2::Vertex` is model of the concept `TriangulationDataStructure_2::Vertex` and has additionally the
|
||||
method `vertex_3()` that returns a `#Vertex_handle` to the associated 3D vertex.
|
||||
method `vertex_3()` that returns a `Vertex_handle` to the associated 3D vertex.
|
||||
- The type `Triangulation_data_structure_2::Face` is model of the concept `TriangulationDataStructure_2::Face` and has additionally the
|
||||
method `facet()` that returns the associated `#Facet`, and a method `bool is_on_surface()`
|
||||
method `facet()` that returns the associated `Facet`, and a method `bool is_on_surface()`
|
||||
for testing if a face is part of the reconstructed surface or a face incident to a boundary edge.
|
||||
|
||||
In case the surface has boundaries, the 2D surface has one vertex which is associated to the infinite
|
||||
|
|
@ -213,15 +232,20 @@ namespace CGAL {
|
|||
typedef unspecified_type Triangulation_data_structure_2;
|
||||
|
||||
/*!
|
||||
The type of the 3D triangulation.
|
||||
The type of the 3D Delaunay triangulation (the first template parameter).
|
||||
*/
|
||||
typedef unspecified_type Triangulation_3;
|
||||
|
||||
/*!
|
||||
The type of the facet priority functor.
|
||||
The type of the facet priority functor (the second template parameter).
|
||||
*/
|
||||
typedef unspecified_type Priority;
|
||||
|
||||
/*!
|
||||
The number type.
|
||||
*/
|
||||
typedef typename Triangulation_3::Geom_traits::FT FT;
|
||||
|
||||
/*!
|
||||
The point type.
|
||||
*/
|
||||
|
|
@ -245,21 +269,21 @@ namespace CGAL {
|
|||
/*!
|
||||
A bidirectional iterator range which enables to enumerate all points that were removed
|
||||
from the 3D Delaunay triangulation during the surface reconstruction. The value type
|
||||
of the iterator is `#Point`.
|
||||
of the iterator is `Point`.
|
||||
*/
|
||||
typedef unspecified_type Outlier_range;
|
||||
|
||||
/*!
|
||||
A bidirectional iterator range which enables to visit all vertices on a boundary.
|
||||
The value type of the iterator is `Vertex_handle`.
|
||||
*/
|
||||
typedef unspecified_type Vertex_on_boundary_range;
|
||||
|
||||
/*!
|
||||
A bidirectional iterator range which enables to visit all boundaries.
|
||||
The value type of the iterator is `Vertex_on_boundary_range`.
|
||||
*/
|
||||
typedef unspecified_type Boundary_range;
|
||||
|
||||
/*!
|
||||
A bidirectional iterator range which enables to visit all vertices on a boundary.
|
||||
The value type of the iterator is `#Vertex_handle`
|
||||
*/
|
||||
typedef unspecified_type Vertex_on_boundary_range;
|
||||
/// @}
|
||||
#endif
|
||||
|
||||
|
|
@ -268,6 +292,7 @@ namespace CGAL {
|
|||
typedef Advancing_front_surface_reconstruction<Dt,P> Extract;
|
||||
typedef typename Triangulation_3::Geom_traits Geom_traits;
|
||||
|
||||
typedef typename Kernel::FT FT;
|
||||
typedef typename Kernel::FT coord_type;
|
||||
|
||||
typedef typename Kernel::Point_3 Point;
|
||||
|
|
@ -377,7 +402,23 @@ namespace CGAL {
|
|||
std::list<Next_border_elt> nbe_pool;
|
||||
std::list<Intern_successors_type> ist_pool;
|
||||
|
||||
public:
|
||||
Vector construct_vector(const Point& p, const Point& q) const
|
||||
{
|
||||
return T.geom_traits().construct_vector_3_object()(p, q);
|
||||
}
|
||||
|
||||
Vector construct_cross_product(const Vector& v, const Vector& w) const
|
||||
{
|
||||
return T.geom_traits().construct_cross_product_vector_3_object()(v, w);
|
||||
}
|
||||
|
||||
FT compute_scalar_product(const Vector& v, const Vector& w) const
|
||||
{
|
||||
return T.geom_traits().compute_scalar_product_3_object()(v, w);
|
||||
}
|
||||
|
||||
private:
|
||||
Intern_successors_type* new_border()
|
||||
{
|
||||
nbe_pool.resize(nbe_pool.size()+1);
|
||||
|
|
@ -679,12 +720,14 @@ namespace CGAL {
|
|||
++it;
|
||||
}while(collinear(p,q,it->point()));
|
||||
const Point& r = it->point();
|
||||
Vector u = q-r;
|
||||
Vector v = q-p;
|
||||
Vector w = r-p;
|
||||
Vector vw = cross_product(v,w);
|
||||
double len = (std::max)(u*u,(std::max)(v*v,w*w));
|
||||
Point s = p + 10* len * (vw/(vw*vw));
|
||||
Vector u = construct_vector(r, q);
|
||||
Vector v = construct_vector(p, q);
|
||||
Vector w = construct_vector(p, r);
|
||||
Vector vw = construct_cross_product(v,w);
|
||||
double len = (std::max)(compute_scalar_product(u,u),
|
||||
(std::max)(compute_scalar_product(v,v),
|
||||
compute_scalar_product(w,w)));
|
||||
Point s = p + 10 * len * (vw/compute_scalar_product(vw,vw));
|
||||
added_vertex = T.insert(s);
|
||||
}
|
||||
}
|
||||
|
|
@ -736,9 +779,9 @@ namespace CGAL {
|
|||
|
||||
\param radius_ratio_bound candidates incident to surface triangles which are not in the beta-wedge
|
||||
are discarded, if the ratio of their radius and the radius of the surface triangle is larger than `radius_ratio_bound`.
|
||||
Described in Section \ref AFSR_Boundaries
|
||||
Described in Section \ref AFSR_Boundaries.
|
||||
\param beta half the angle of the wedge in which only the radius of triangles counts for the plausibility of candidates.
|
||||
Described in Section \ref AFSR_Selection
|
||||
Described in Section \ref AFSR_Selection.
|
||||
|
||||
*/
|
||||
void run(double radius_ratio_bound=5, double beta= 0.52)
|
||||
|
|
@ -1186,7 +1229,7 @@ namespace CGAL {
|
|||
\param index index of the facet in `c`
|
||||
|
||||
*/
|
||||
coord_type
|
||||
FT
|
||||
smallest_radius_delaunay_sphere(const Cell_handle& c,
|
||||
const int& index) const
|
||||
{
|
||||
|
|
@ -1249,16 +1292,16 @@ namespace CGAL {
|
|||
const Point& pp2 = cc->vertex(i2)->point();
|
||||
const Point& pp3 = cc->vertex(i3)->point();
|
||||
|
||||
Sphere facet_sphere(pp1, pp2, pp3);
|
||||
if (squared_distance(facet_sphere.center(), pp0) <
|
||||
facet_sphere.squared_radius())
|
||||
Sphere facet_sphere = T.geom_traits().construct_sphere_3_object()(pp1, pp2, pp3);
|
||||
if (squared_distance(T.geom_traits().construct_center_3_object()(facet_sphere), pp0) <
|
||||
T.geom_traits().compute_squared_radius_3_object()(facet_sphere))
|
||||
{
|
||||
#ifdef AFSR_LAZY
|
||||
value = lazy_squared_radius(cc);
|
||||
#else
|
||||
// qualified with CGAL, to avoid a compilation error with clang
|
||||
if(volume(pp0, pp1, pp2, pp3) != 0){
|
||||
value = CGAL::squared_radius(pp0, pp1, pp2, pp3);
|
||||
value = T.geom_traits().compute_squared_radius_3_object()(pp0, pp1, pp2, pp3);
|
||||
} else {
|
||||
typedef Exact_predicates_exact_constructions_kernel EK;
|
||||
Cartesian_converter<Kernel, EK> to_exact;
|
||||
|
|
@ -1280,26 +1323,30 @@ namespace CGAL {
|
|||
cc = lazy_circumcenter(c);
|
||||
cn = lazy_circumcenter(n);
|
||||
#else
|
||||
cc = CGAL::circumcenter(cp0, cp1, cp2, cp3);
|
||||
cn = CGAL::circumcenter(np0, np1, np2, np3);
|
||||
cc = T.geom_traits().construct_circumcenter_3_object()(cp0, cp1, cp2, cp3);
|
||||
cn = T.geom_traits().construct_circumcenter_3_object()(np0, np1, np2, np3);
|
||||
#endif
|
||||
// computation of the distance of cp1 to the dual segment cc, cn...
|
||||
Vector V(cc - cn), Vc(cc - cp1), Vn(cp1 - cn);
|
||||
coord_type ac(V * Vc), an(V * Vn), norm_V(V * V);
|
||||
Vector V = construct_vector(cn, cc),
|
||||
Vc = construct_vector(cp1, cc),
|
||||
Vn = construct_vector(cn, cp1);
|
||||
coord_type ac = compute_scalar_product(V, Vc),
|
||||
an = compute_scalar_product(V, Vn),
|
||||
norm_V = compute_scalar_product(V, V);
|
||||
if ((ac > 0) && (an > 0))
|
||||
{
|
||||
value = (Vc*Vc) - ac*ac/norm_V;
|
||||
value = compute_scalar_product(Vc, Vc) - ac*ac/norm_V;
|
||||
if ((value < 0)||(norm_V > inv_eps_2)){
|
||||
// qualified with CGAL, to avoid a compilation error with clang
|
||||
value = CGAL::squared_radius(cp1, cp2, cp3);
|
||||
value = T.geom_traits().compute_squared_radius_3_object()(cp1, cp2, cp3);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ac <= 0)
|
||||
value = squared_distance(cc, cp1);
|
||||
value = T.geom_traits().compute_squared_distance_3_object()(cc, cp1);
|
||||
else // (an <= 0)
|
||||
value = squared_distance(cn, cp1);
|
||||
value = T.geom_traits().compute_squared_distance_3_object()(cn, cp1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1314,7 +1361,7 @@ namespace CGAL {
|
|||
|
||||
returns the infinite floating value that prevents a facet to be used.
|
||||
*/
|
||||
coord_type infinity() const { return std::numeric_limits<coord_type>::infinity(); }
|
||||
FT infinity() const { return std::numeric_limits<FT>::infinity(); }
|
||||
/// @}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
|
|
@ -1341,9 +1388,9 @@ namespace CGAL {
|
|||
const Point& p2 = c->vertex(i2)->point();
|
||||
const Point& pc = c->vertex(i3)->point();
|
||||
|
||||
Vector P2P1 = p1-p2, P2Pn, PnP1;
|
||||
Vector P2P1 = construct_vector(p2, p1), P2Pn, PnP1;
|
||||
|
||||
Vector v2, v1 = cross_product(pc-p2, P2P1);
|
||||
Vector v2, v1 = construct_cross_product(construct_vector(p2, pc), P2P1);
|
||||
|
||||
coord_type norm, norm1 = v1*v1;
|
||||
coord_type norm12 = P2P1*P2P1;
|
||||
|
|
@ -1375,12 +1422,12 @@ namespace CGAL {
|
|||
{
|
||||
const Point& pn = neigh->vertex(n_i3)->point();
|
||||
|
||||
P2Pn = pn-p2;
|
||||
v2 = cross_product(P2P1,P2Pn);
|
||||
P2Pn = construct_vector(p2, pn);
|
||||
v2 = construct_cross_product(P2P1,P2Pn);
|
||||
|
||||
//pas necessaire de normer pour un bon echantillon:
|
||||
// on peut alors tester v1*v2 >= 0
|
||||
norm = sqrt(norm1 * (v2*v2));
|
||||
norm = sqrt(norm1 * compute_scalar_product(v2,v2));
|
||||
pscal = v1*v2;
|
||||
// check if the triangle will produce a sliver on the surface
|
||||
bool sliver_facet = (pscal <= COS_ALPHA_SLIVER*norm);
|
||||
|
|
@ -1394,10 +1441,9 @@ namespace CGAL {
|
|||
// We skip triangles having an internal angle along e
|
||||
// whose cosinus is smaller than -DELTA
|
||||
// that is the angle is larger than arcos(-DELTA)
|
||||
border_facet = !((P2P1*P2Pn >=
|
||||
-DELTA*sqrt(norm12*(P2Pn*P2Pn)))&&
|
||||
(P2P1*PnP1 >=
|
||||
-DELTA*sqrt(norm12*(PnP1*PnP1))));
|
||||
border_facet =
|
||||
!((P2P1*P2Pn >= -DELTA*sqrt(norm12*compute_scalar_product(P2Pn,P2Pn))) &&
|
||||
(P2P1*PnP1 >= -DELTA*sqrt(norm12*compute_scalar_product(PnP1,PnP1))));
|
||||
// \todo investigate why we simply do not skip this triangle
|
||||
// but continue looking for a better candidate
|
||||
// if (!border_facet){
|
||||
|
|
@ -1569,9 +1615,11 @@ namespace CGAL {
|
|||
int n_i3 = (6 - n_ind - n_i1 - n_i2);
|
||||
|
||||
const Point& pn = neigh->vertex(n_i3)->point();
|
||||
Vector v1 = cross_product(pc-p2,p1-p2),
|
||||
v2 = cross_product(p1-p2,pn-p2);
|
||||
coord_type norm = sqrt((v1*v1)*(v2*v2));
|
||||
Vector v1 = construct_cross_product(construct_vector(p2, pc),
|
||||
construct_vector(p2, p1)),
|
||||
v2 = construct_cross_product(construct_vector(p2, p1),
|
||||
construct_vector(p2, pn));
|
||||
coord_type norm = sqrt(compute_scalar_product(v1, v1) * compute_scalar_product(v2, v2));
|
||||
|
||||
if (v1*v2 > COS_BETA*norm)
|
||||
return 1; // label bonne pliure sinon:
|
||||
|
|
@ -2487,9 +2535,9 @@ namespace CGAL {
|
|||
\param out output iterator
|
||||
\param radius_ratio_bound candidates incident to surface triangles which are not in the beta-wedge
|
||||
are discarded, if the ratio of their radius and the radius of the surface triangle is larger than `radius_ratio_bound`.
|
||||
Described in Section \ref AFSR_Boundaries
|
||||
Described in Section \ref AFSR_Boundaries.
|
||||
\param beta half the angle of the wedge in which only the radius of triangles counts for the plausibility of candidates.
|
||||
Described in Section \ref AFSR_Selection
|
||||
Described in Section \ref AFSR_Selection.
|
||||
|
||||
*/
|
||||
template <typename PointInputIterator, typename IndicesOutputIterator>
|
||||
|
|
@ -2533,7 +2581,7 @@ namespace CGAL {
|
|||
be convertible to `Exact_predicates_inexact_constructions_kernel::Point_3` with the `Cartesian_converter`.
|
||||
\tparam IndicesOutputIterator must be an output iterator to which
|
||||
`std::array<std::size_t, 3>` can be assigned.
|
||||
\tparam Priority must be a functor with `double operator()(AdvancingFront,Cell_handle,int)` returning the
|
||||
\tparam Priority must be a functor with `double operator()(Advancing_front_surface_reconstruction,Cell_handle,int)` returning the
|
||||
priority of the facet `(Cell_handle,int)`.
|
||||
|
||||
\param b iterator on the first point of the sequence
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Advancing_front_surface_reconstruction_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace CGAL {
|
|||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The template function `compare()` compares the first argument with respect to
|
||||
the second, i.e.\ it returns `CGAL::LARGER` if \f$ x\f$ is larger then \f$ y\f$.
|
||||
the second, i.e.\ it returns `CGAL::LARGER` if \f$ x\f$ is larger than \f$ y\f$.
|
||||
|
||||
In case the argument types `NT1` and `NT2` differ,
|
||||
`compare` is performed with the semantic of the type determined via
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Algebraic_foundations_Examples)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ int main(){
|
|||
CGAL::Gmpq fraction(4,5);
|
||||
FT::Decompose()(fraction,numerator,denominator);
|
||||
|
||||
CGAL::set_pretty_mode(std::cout);
|
||||
CGAL::IO::set_pretty_mode(std::cout);
|
||||
std::cout << "decompose fraction: "<< std::endl;
|
||||
std::cout << "fraction : " << fraction << std::endl;
|
||||
std::cout << "numerator : " << numerator<< std::endl;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ binary_func(const A& a , const B& b){
|
|||
}
|
||||
|
||||
int main(){
|
||||
CGAL::set_pretty_mode(std::cout);
|
||||
CGAL::IO::set_pretty_mode(std::cout);
|
||||
|
||||
// Function call for ImplicitInteroperable types
|
||||
std::cout<< binary_func(double(3), int(5)) << std::endl;
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ public:
|
|||
Output_rep(const T& tt) : t(tt) {}
|
||||
std::ostream& operator () (std::ostream& out) const {
|
||||
if ( needs_parens_as_product(t)) {
|
||||
return out << "(" << oformat(t) << ")";
|
||||
return out << "(" << IO::oformat(t) << ")";
|
||||
} else {
|
||||
return out << oformat(t);
|
||||
return out << IO::oformat(t);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#include <CGAL/number_type_config.h>
|
||||
#include <CGAL/Algebraic_structure_traits.h>
|
||||
#include <CGAL/Real_embeddable_traits.h>
|
||||
#include <CGAL/Kernel/Same_uncertainty.h>
|
||||
|
||||
namespace CGAL {
|
||||
CGAL_NTS_BEGIN_NAMESPACE
|
||||
|
|
@ -302,19 +303,21 @@ to_interval( const Real_embeddable& x) {
|
|||
}
|
||||
|
||||
template <typename NT>
|
||||
NT approximate_sqrt(const NT& nt, CGAL::Null_functor)
|
||||
typename Coercion_traits<double, NT>::Type
|
||||
approximate_sqrt(const NT& x, CGAL::Null_functor)
|
||||
{
|
||||
return NT(sqrt(CGAL::to_double(nt)));
|
||||
return sqrt(CGAL::to_double(x));
|
||||
}
|
||||
|
||||
template <typename NT, typename Sqrt>
|
||||
NT approximate_sqrt(const NT& nt, Sqrt sqrt)
|
||||
typename Sqrt::result_type
|
||||
approximate_sqrt(const NT& nt, Sqrt sqrt)
|
||||
{
|
||||
return sqrt(nt);
|
||||
}
|
||||
|
||||
template <typename NT>
|
||||
NT approximate_sqrt(const NT& nt)
|
||||
decltype(auto) approximate_sqrt(const NT& nt)
|
||||
{
|
||||
// the initial version of this function was using Algebraic_category
|
||||
// for the dispatch but some ring type (like Gmpz) provides a Sqrt
|
||||
|
|
@ -324,6 +327,36 @@ NT approximate_sqrt(const NT& nt)
|
|||
return approximate_sqrt(nt, Sqrt());
|
||||
}
|
||||
|
||||
template <class NT>
|
||||
typename Same_uncertainty_nt<Comparison_result, NT>::type
|
||||
compare_quotients(const NT& xnum, const NT& xden,
|
||||
const NT& ynum, const NT& yden)
|
||||
{
|
||||
// No assumptions on the sign of den are made
|
||||
|
||||
// code assumes that SMALLER == - 1;
|
||||
CGAL_precondition( SMALLER == static_cast<Comparison_result>(-1) );
|
||||
|
||||
int xsign = sign(xnum) * sign(xden) ;
|
||||
int ysign = sign(ynum) * sign(yden) ;
|
||||
if (xsign == 0) return static_cast<Comparison_result>(-ysign);
|
||||
if (ysign == 0) return static_cast<Comparison_result>(xsign);
|
||||
// now (x != 0) && (y != 0)
|
||||
int diff = xsign - ysign;
|
||||
if (diff == 0)
|
||||
{
|
||||
int msign = sign(xden) * sign(yden);
|
||||
NT leftop = NT(xnum * yden * msign);
|
||||
NT rightop = NT(ynum * xden * msign);
|
||||
return CGAL::compare(leftop, rightop);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (xsign < ysign) ? SMALLER : LARGER;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CGAL_NTS_END_NAMESPACE
|
||||
} //namespace CGAL
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Algebraic_foundations_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||
|
|
|
|||
|
|
@ -1,27 +1,19 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Algebraic_kernel_d_Examples)
|
||||
|
||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||
|
||||
find_package(MPFI QUIET)
|
||||
|
||||
if(MPFI_FOUND)
|
||||
|
||||
if(MPFI_FOUND AND NOT CGAL_DISABLE_GMP)
|
||||
include(${CGAL_USE_FILE})
|
||||
include(${MPFI_USE_FILE})
|
||||
include(CGAL_VersionUtils)
|
||||
|
||||
create_single_source_cgal_program("Compare_1.cpp")
|
||||
create_single_source_cgal_program("Construct_algebraic_real_1.cpp")
|
||||
create_single_source_cgal_program("Isolate_1.cpp")
|
||||
create_single_source_cgal_program("Sign_at_1.cpp")
|
||||
create_single_source_cgal_program("Solve_1.cpp")
|
||||
|
||||
else()
|
||||
|
||||
message(
|
||||
STATUS
|
||||
"This program requires the CGAL library and MPFI, and will not be compiled."
|
||||
)
|
||||
|
||||
message(STATUS "This program requires the CGAL, CGAL_Core and MPFI libraries, and will not be compiled.")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
#include <CGAL/tss.h>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <memory>
|
||||
|
||||
|
||||
namespace CGAL {
|
||||
|
|
@ -393,8 +393,8 @@ public:
|
|||
Algebraic_curve_kernel_2()
|
||||
: _m_gcd_cache_2(new Gcd_cache_2())
|
||||
{
|
||||
_m_curve_cache_2 = boost::shared_ptr<Curve_cache_2>(new Curve_cache_2(this));
|
||||
_m_curve_pair_cache_2 = boost::shared_ptr<Curve_pair_cache_2> (new Curve_pair_cache_2(this));
|
||||
_m_curve_cache_2 = std::shared_ptr<Curve_cache_2>(new Curve_cache_2(this));
|
||||
_m_curve_pair_cache_2 = std::shared_ptr<Curve_pair_cache_2> (new Curve_pair_cache_2(this));
|
||||
// std::cout << "CONSTRUCTION Algebraic_curve_kernel_2 " << std::endl;
|
||||
}
|
||||
|
||||
|
|
@ -2766,9 +2766,9 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
mutable boost::shared_ptr<Curve_cache_2> _m_curve_cache_2;
|
||||
mutable boost::shared_ptr<Curve_pair_cache_2> _m_curve_pair_cache_2;
|
||||
mutable boost::shared_ptr<Gcd_cache_2> _m_gcd_cache_2;
|
||||
mutable std::shared_ptr<Curve_cache_2> _m_curve_cache_2;
|
||||
mutable std::shared_ptr<Curve_pair_cache_2> _m_curve_pair_cache_2;
|
||||
mutable std::shared_ptr<Gcd_cache_2> _m_gcd_cache_2;
|
||||
|
||||
|
||||
}; // class Algebraic_curve_kernel_2
|
||||
|
|
|
|||
|
|
@ -436,8 +436,8 @@ std::ostream&
|
|||
operator << (std::ostream& os,
|
||||
const CGAL::internal::Algebraic_real_d_1<Coefficient, Rational, HandlePolicy, RepClass >& x){
|
||||
os << "[" << x.polynomial()
|
||||
<< ",[" << oformat(x.low())
|
||||
<< " , " << oformat(x.high()) << " ]]";
|
||||
<< ",[" << IO::oformat(x.low())
|
||||
<< " , " << IO::oformat(x.high()) << " ]]";
|
||||
return os;
|
||||
}
|
||||
|
||||
|
|
@ -458,9 +458,9 @@ operator >> (std::istream& is,
|
|||
is >> poly;
|
||||
swallow(is, ',');// read the ","
|
||||
swallow(is, '[');// read the ","
|
||||
is >> iformat(low);
|
||||
is >> IO::iformat(low);
|
||||
swallow(is, ',');// read the ","
|
||||
is >> iformat(high);
|
||||
is >> IO::iformat(high);
|
||||
swallow(is, ']');// read the "]"
|
||||
swallow(is, ']');// read the "]"
|
||||
x = ALGNUM(poly, low, high);
|
||||
|
|
|
|||
|
|
@ -2007,7 +2007,7 @@ public:
|
|||
*
|
||||
* For each status line at an event and each status line that represents
|
||||
* an interval, all y-coordinates are approximated such that their
|
||||
* isolating interval has absolute size smaller then \c precision.
|
||||
* isolating interval has absolute size smaller than \c precision.
|
||||
*/
|
||||
void refine_all(Bound precision) {
|
||||
|
||||
|
|
@ -2417,7 +2417,7 @@ std::ostream& operator<< (
|
|||
typedef typename Curve::Asymptote_y Asymptote_y;
|
||||
|
||||
|
||||
switch (::CGAL::get_mode(out)) {
|
||||
switch (::CGAL::IO::get_mode(out)) {
|
||||
case ::CGAL::IO::PRETTY: {
|
||||
|
||||
out << "--------------- Analysis results ---------------" << std::endl;
|
||||
|
|
@ -2514,7 +2514,7 @@ std::istream& operator>> (
|
|||
std::istream& is,
|
||||
Curve_analysis_2< AlgebraicKernelWithAnalysis_2, Rep_ >& curve) {
|
||||
|
||||
CGAL_precondition(CGAL::is_ascii(is));
|
||||
CGAL_precondition(CGAL::IO::is_ascii(is));
|
||||
|
||||
typedef AlgebraicKernelWithAnalysis_2 Algebraic_kernel_with_analysis_2;
|
||||
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ protected:
|
|||
}
|
||||
/*
|
||||
#if CGAL_ACK_DEBUG_FLAG
|
||||
::CGAL::set_ascii_mode(CGAL_ACK_DEBUG_PRINT);
|
||||
::CGAL::IO::set_ascii_mode(CGAL_ACK_DEBUG_PRINT);
|
||||
CGAL_ACK_DEBUG_PRINT << "Stha: " << (*seq_it) << std::endl;
|
||||
#endif
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -675,7 +675,7 @@ template < class AlgebraicCurveKernel_2, class Rep>
|
|||
std::ostream& operator<< (std::ostream& os,
|
||||
const Xy_coordinate_2<AlgebraicCurveKernel_2, Rep>& pt)
|
||||
{
|
||||
switch (::CGAL::get_mode(os)) {
|
||||
switch (::CGAL::IO::get_mode(os)) {
|
||||
case ::CGAL::IO::PRETTY: {
|
||||
os << "[x-coord: " << CGAL::to_double(pt.x()) << "; curve: " <<
|
||||
pt.curve().polynomial_2() <<
|
||||
|
|
@ -703,7 +703,7 @@ std::istream& operator >> (
|
|||
std::istream& is,
|
||||
Xy_coordinate_2< AlgebraicCurveKernel_2, Rep_>& pt) {
|
||||
|
||||
CGAL_precondition(CGAL::is_ascii(is));
|
||||
CGAL_precondition(CGAL::IO::is_ascii(is));
|
||||
|
||||
// this instance's first template argument
|
||||
typedef AlgebraicCurveKernel_2 Algebraic_curve_kernel_2;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Algebraic_kernel_d_Tests)
|
||||
|
||||
# CGAL and its components
|
||||
|
|
@ -34,32 +34,36 @@ include(${CGAL_USE_FILE})
|
|||
# ##########################################################
|
||||
|
||||
create_single_source_cgal_program("cyclic.cpp")
|
||||
create_single_source_cgal_program("Algebraic_curve_kernel_2.cpp")
|
||||
create_single_source_cgal_program("algebraic_curve_kernel_2_tools.cpp")
|
||||
create_single_source_cgal_program("Algebraic_kernel_d_1_LEDA.cpp")
|
||||
|
||||
create_single_source_cgal_program(
|
||||
"Algebraic_kernel_d_1_CORE_Integer_rational.cpp")
|
||||
create_single_source_cgal_program(
|
||||
"Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp")
|
||||
create_single_source_cgal_program(
|
||||
"Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp")
|
||||
create_single_source_cgal_program(
|
||||
"Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp")
|
||||
|
||||
create_single_source_cgal_program("Algebraic_kernel_d_1_GMP.cpp")
|
||||
create_single_source_cgal_program("Algebraic_kernel_d_2.cpp")
|
||||
create_single_source_cgal_program("Algebraic_real_d_1.cpp")
|
||||
create_single_source_cgal_program("Bitstream_descartes.cpp")
|
||||
create_single_source_cgal_program("Curve_analysis_2.cpp")
|
||||
create_single_source_cgal_program("Curve_pair_analysis_2.cpp")
|
||||
create_single_source_cgal_program("Descartes.cpp")
|
||||
create_single_source_cgal_program("Real_embeddable_traits_extension.cpp")
|
||||
if(RS_FOUND)
|
||||
create_single_source_cgal_program("Algebraic_kernel_rs_gmpq_d_1.cpp")
|
||||
create_single_source_cgal_program("Algebraic_kernel_rs_gmpz_d_1.cpp")
|
||||
if(NOT CGAL_DISABLE_GMP)
|
||||
create_single_source_cgal_program("Algebraic_curve_kernel_2.cpp")
|
||||
create_single_source_cgal_program("algebraic_curve_kernel_2_tools.cpp")
|
||||
create_single_source_cgal_program("Algebraic_kernel_d_1_LEDA.cpp")
|
||||
|
||||
create_single_source_cgal_program(
|
||||
"Algebraic_kernel_d_1_CORE_Integer_rational.cpp")
|
||||
create_single_source_cgal_program(
|
||||
"Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp")
|
||||
create_single_source_cgal_program(
|
||||
"Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp")
|
||||
create_single_source_cgal_program(
|
||||
"Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp")
|
||||
|
||||
create_single_source_cgal_program("Algebraic_kernel_d_1_GMP.cpp")
|
||||
create_single_source_cgal_program("Algebraic_kernel_d_2.cpp")
|
||||
create_single_source_cgal_program("Algebraic_real_d_1.cpp")
|
||||
create_single_source_cgal_program("Bitstream_descartes.cpp")
|
||||
create_single_source_cgal_program("Curve_analysis_2.cpp")
|
||||
create_single_source_cgal_program("Curve_pair_analysis_2.cpp")
|
||||
create_single_source_cgal_program("Real_embeddable_traits_extension.cpp")
|
||||
if(RS_FOUND)
|
||||
create_single_source_cgal_program("Algebraic_kernel_rs_gmpq_d_1.cpp")
|
||||
create_single_source_cgal_program("Algebraic_kernel_rs_gmpz_d_1.cpp")
|
||||
else()
|
||||
message(
|
||||
STATUS
|
||||
"NOTICE: Some tests require the RS library, and will not be compiled.")
|
||||
endif()
|
||||
else()
|
||||
message(
|
||||
STATUS
|
||||
"NOTICE: Some tests require the RS library, and will not be compiled.")
|
||||
message(STATUS "NOTICE: Some tests require the CGAL_Core library, and will not be compiled.")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ template<typename Arithmetic_kernel> void test_routine() {
|
|||
CGAL_ACK_DEBUG_PRINT << "P[3(0,P[2(0,-2)(2,2)])(1,P[1(1,-1)])(3,P[1(1,-6)])]" << std::endl;
|
||||
#endif
|
||||
f=from_string<Poly_int2>("P[3(0,P[2(0,-2)(2,2)])(1,P[1(1,-1)])(3,P[1(1,-6)])]");
|
||||
::CGAL::set_pretty_mode(std::cout);
|
||||
::CGAL::IO::set_pretty_mode(std::cout);
|
||||
curve=construct_curve_2(f);
|
||||
assert(curve.number_of_status_lines_with_event()==1);
|
||||
assert(number_of_objects<Algebraic_kernel_d_2>(curve)==2);
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ void test_algebraic_curve_kernel_2() {
|
|||
|
||||
Poly_2 polys[ACK_2_n_polys];
|
||||
|
||||
::CGAL::set_mode(std::cerr, ::CGAL::IO::PRETTY);
|
||||
::CGAL::IO::set_mode(std::cerr, ::CGAL::IO::PRETTY);
|
||||
|
||||
//std::cerr << "constructing curves..\n";
|
||||
for(int i = 0; i < ACK_2_n_polys; i++) {
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){
|
|||
assert(compare_1(bound,Algebraic_real_1(2)) == SMALLER );
|
||||
}
|
||||
|
||||
CGAL::set_pretty_mode(std::cerr);
|
||||
CGAL::IO::set_pretty_mode(std::cerr);
|
||||
|
||||
// Approximations
|
||||
bool all_right = true;
|
||||
|
|
@ -408,13 +408,13 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){
|
|||
|
||||
#define CGAL_TEST_ALGEBRAIC_REAL_IO(_f) \
|
||||
alg1=_f; \
|
||||
ss<<CGAL::oformat(alg1); \
|
||||
ss<<CGAL::IO::oformat(alg1); \
|
||||
CGAL_assertion(ss.good()); \
|
||||
ss>>CGAL::iformat(alg2); \
|
||||
CGAL_assertion(!ss.fail()); \
|
||||
ss>>CGAL::IO::iformat(alg2); \
|
||||
CGAL_assertion(!ss.fail()); \
|
||||
ss.clear(); \
|
||||
assert(alg1==alg2)
|
||||
// Note: after the reading ss>>CGAL::iformat(alg2) the state of ss can
|
||||
// Note: after the reading ss>>CGAL::IO::iformat(alg2) the state of ss can
|
||||
// have the eofbit. The C++ norm says if one tries to write to a stream
|
||||
// with eofbit, then the failbit will be set. That is why one must
|
||||
// clear the iostate with ss.clear().
|
||||
|
|
@ -422,7 +422,7 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){
|
|||
|
||||
Algebraic_real_1 alg1,alg2;
|
||||
std::stringstream ss;
|
||||
CGAL::set_ascii_mode(ss);
|
||||
CGAL::IO::set_ascii_mode(ss);
|
||||
|
||||
// test construction from int, Coefficient and Bound
|
||||
CGAL_TEST_ALGEBRAIC_REAL_IO(construct_algebraic_real_1(int(2)));
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Algebraic_kernel_for_circles_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -30,19 +30,19 @@ namespace CGAL {
|
|||
template <typename RT>
|
||||
Comparison_result
|
||||
compare_x(const CGAL::Root_for_spheres_2_3<RT>& r1, const CGAL::Root_for_spheres_2_3<RT>& r2){
|
||||
return compare(r1.x(), r2.x());
|
||||
return CGAL::compare(r1.x(), r2.x());
|
||||
}
|
||||
|
||||
template <typename RT>
|
||||
Comparison_result
|
||||
compare_y(const CGAL::Root_for_spheres_2_3<RT>& r1, const CGAL::Root_for_spheres_2_3<RT>& r2){
|
||||
return compare(r1.y(), r2.y());
|
||||
return CGAL::compare(r1.y(), r2.y());
|
||||
}
|
||||
|
||||
template <typename RT>
|
||||
Comparison_result
|
||||
compare_z(const CGAL::Root_for_spheres_2_3<RT>& r1, const CGAL::Root_for_spheres_2_3<RT>& r2){
|
||||
return compare(r1.z(), r2.z());
|
||||
return CGAL::compare(r1.z(), r2.z());
|
||||
}
|
||||
|
||||
template <typename RT>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Algebraic_kernel_for_spheres_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -134,9 +134,8 @@ All \cgal kernels are models of both concepts.
|
|||
|
||||
The triangulation data structure of the triangulation
|
||||
has to be a model of the concept `TriangulationDataStructure_2`,
|
||||
and it must be parameterized with
|
||||
vertex and face classes which are models of the concepts
|
||||
`AlphaShapeVertex_2` and `AlphaShapeFace_2`.
|
||||
whose vertex and face classes are models of the concepts
|
||||
`AlphaShapeVertex_2` and `AlphaShapeFace_2`, respectively.
|
||||
The classes `Alpha_shape_vertex_base_2<Gt, Vb>` and `Alpha_shape_face_base_2<Gt, Fb>`
|
||||
are models of these concepts and can be used for all type of alpha shapes,
|
||||
provided that the template parameters `Vb` and `Fb` are appropriately chosen,
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ does not make sense if the traits class already provides exact constructions.
|
|||
<ul>
|
||||
<li>When the tag `ExactAlphaComparisonTag` is set to \link Tag_true `Tag_true`\endlink,
|
||||
the class `Cartesian_converter` is used internally to switch between the traits class
|
||||
and the %CGAL kernel `CGAL::Simple_cartesian<NT>`, where `NT` can be either `CGAL::Interval_nt` or
|
||||
and the \cgal kernel `CGAL::Simple_cartesian<NT>`, where `NT` can be either `CGAL::Interval_nt` or
|
||||
`CGAL::Exact_rational`. `Cartesian_converter` must thus offer the necessary functors
|
||||
to convert a two-dimensional point of the traits class to a two-dimensional point
|
||||
of `CGAL::Simple_cartesian<NT>`. However, these functors are not necessarily provided by
|
||||
|
|
@ -106,7 +106,7 @@ allowing filtered exact comparisons (that is, interval arithmetic is first used
|
|||
resorting to exact arithmetic). Access to the interval containing the exact value is provided through the function
|
||||
`FT::Approximate_nt approx() const` where `FT::Approximate_nt` is `CGAL::Interval_nt<Protected>`
|
||||
with `Protected=true`. Access to the exact value is provided through the function
|
||||
`FT::Exact_nt exact() const` where `FT::Exact_nt` depends on the configuration of %CGAL
|
||||
`FT::Exact_nt exact() const` where `FT::Exact_nt` depends on the configuration of \cgal
|
||||
(it is `Gmpq` if `gmp` is available and `Quotient<CGAL::MP_Float>` otherwise).
|
||||
An overload for the function `double to_double(FT)` is also available. Its
|
||||
precision is controlled through `FT::set_relative_precision_of_to_double()` in
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlphaShapes2Ref
|
||||
|
||||
\deprecated The class is deprecated since \cgal 4.10, as the weighted point and the function
|
||||
objects for weighted points are part of the concept `Kernel`. The class is kept for backward
|
||||
compatibility.
|
||||
|
||||
The class `Weighted_alpha_shape_euclidean_traits_2` was the default model for the concept
|
||||
`AlphaShapeTraits_2` for the regular version of Alpha Shapes.
|
||||
|
||||
\tparam K must be a model of `Kernel`.
|
||||
|
||||
\cgalModels `AlphaShapeTraits_2`
|
||||
|
||||
*/
|
||||
template< typename K >
|
||||
class Weighted_alpha_shape_euclidean_traits_2
|
||||
: public K
|
||||
{
|
||||
public:
|
||||
|
||||
}; /* end Weighted_alpha_shape_euclidean_traits_2 */
|
||||
} /* end namespace CGAL */
|
||||
|
|
@ -45,7 +45,7 @@ typedef unspecified_type FT;
|
|||
/*!
|
||||
A default constructor.
|
||||
*/
|
||||
AlphaShapeTraits_2();
|
||||
WeightedAlphaShapeTraits_2();
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,12 +70,12 @@ finite number of different \f$ \alpha\f$-shapes and corresponding
|
|||
|
||||
\cgalCRPSection{Concepts}
|
||||
- `AlphaShapeTraits_2`
|
||||
- `WeightedAlphaShapeTraits_2`
|
||||
- `AlphaShapeFace_2`
|
||||
- `AlphaShapeVertex_2`
|
||||
|
||||
\cgalCRPSection{Classes}
|
||||
- `CGAL::Alpha_shape_2<Dt>`
|
||||
- `CGAL::Weighted_alpha_shape_euclidean_traits_2<K>`
|
||||
- `CGAL::Alpha_shape_vertex_base_2<AlphaShapeTraits_2>`
|
||||
- `CGAL::Alpha_shape_face_base_2<AlphaShapeTraits_2, TriangulationFaceBase_2>`
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Alpha_shapes_2_Examples)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
// Copyright (c) 1997 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||
//
|
||||
//
|
||||
// Author(s) : Tran Kai Frank DA <Frank.Da@sophia.inria.fr>
|
||||
// Andreas Fabri <Andreas.Fabri@geometryfactory.com>
|
||||
|
||||
#ifndef CGAL_ALPHA_SHAPE_EUCLIDEAN_TRAITS_H
|
||||
#define CGAL_ALPHA_SHAPE_EUCLIDEAN_TRAITS_H
|
||||
|
||||
#include <CGAL/license/Alpha_shapes_2.h>
|
||||
|
||||
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template < class R >
|
||||
class Alpha_shape_euclidean_traits_2 : public R
|
||||
{};
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
#endif
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
// Copyright (c) 1997 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||
//
|
||||
// Author(s) : Tran Kai Frank DA <Frank.Da@sophia.inria.fr>
|
||||
// Andreas Fabri <Andreas.Fabri@geometryfactory.com>
|
||||
|
||||
#ifndef CGAL_WEIGHTED_ALPHA_SHAPE_EUCLIDEAN_TRAITS_2_H
|
||||
#define CGAL_WEIGHTED_ALPHA_SHAPE_EUCLIDEAN_TRAITS_2_H
|
||||
|
||||
#include <CGAL/license/Alpha_shapes_2.h>
|
||||
|
||||
#define CGAL_DEPRECATED_HEADER "<CGAL/Weighted_alpha_shape_euclidean_traits_2.h>"
|
||||
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
|
||||
"The kernel K can be used directly as traits since weighted points and "\
|
||||
"the associated function objects are now part of the concept Kernel."
|
||||
#include <CGAL/internal/deprecation_warning.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template< class K_ >
|
||||
class Weighted_alpha_shape_euclidean_traits_2
|
||||
: public K_
|
||||
{
|
||||
public:
|
||||
Weighted_alpha_shape_euclidean_traits_2() { }
|
||||
Weighted_alpha_shape_euclidean_traits_2(const K_& k) : K_(k) { }
|
||||
};
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_WEIGHTED_ALPHA_SHAPE_EUCLIDEAN_TRAITS_2_H
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Alpha_shapes_2_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -12,14 +12,6 @@ when alpha is given as an int.
|
|||
Alpha_shape_3(Dt& dt, bool swap=true, NT alpha = 0, Mode m = REGULARIZED)
|
||||
The triangulation is swapped if swap=true and copied otherwise.
|
||||
|
||||
- suppress the traits classes Alpha_shape_euclidean_traits_3.h
|
||||
and Weighted_alpha_shape_euclidean_traits_3.h
|
||||
their purpose was to rename the Compute_squared_radius_3 constructor.
|
||||
The same can be achieved in class Alpha_shapes_3 using the Weighted_tag
|
||||
of the triangulation
|
||||
|
||||
- same as previous for Alpha_shapes_2
|
||||
|
||||
- test the taking into account of paramater alpha in functions
|
||||
get_alpha_shape_edges
|
||||
get_alpha_shape_facets
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Alpha_shapes_3_Demo)
|
||||
|
||||
# Find includes in corresponding build directories
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class MainWindow : public CGAL::Qt::DemosMainWindow, private Ui::MainWindow
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWindow(QWidget* parent = 0);
|
||||
MainWindow(QWidget* parent = nullptr);
|
||||
|
||||
void connectActions();
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ meaning in particular that the alpha complex may have
|
|||
singular faces. For \f$ 0 \leq k \leq d-1\f$,
|
||||
a \f$ k\f$-simplex of the alpha complex is said to be
|
||||
singular if it is not a facet of a \f$ (k+1)\f$-simplex of the complex.
|
||||
%CGAL provides two versions of alpha shapes. In the general mode,
|
||||
\cgal provides two versions of alpha shapes. In the general mode,
|
||||
the alpha shapes correspond strictly to the above definition.
|
||||
The regularized mode provides a regularized version of the alpha shapes.
|
||||
It corresponds to the domain covered by a regularized version
|
||||
|
|
@ -219,8 +219,8 @@ in the non-weighted case and `WeightedAlphaShapeTraits_3` in the weighted case.
|
|||
All \cgal kernels are models of both concepts.
|
||||
|
||||
The triangulation data structure of the triangulation
|
||||
has to be a model of the concept `TriangulationDataStructure_3`,
|
||||
and it must be parameterized with vertex and cell classes, which are model of the concepts
|
||||
has to be a model of the concept `TriangulationDataStructure_3`
|
||||
whose vertex and cell classes are model of the concepts
|
||||
`AlphaShapeVertex_3` and `AlphaShapeCell_3`.
|
||||
The classes `Alpha_shape_vertex_base_3<Gt>` and `Alpha_shape_cell_base_3<Gt>`
|
||||
are models of these concepts and can be used for all type of alpha shapes,
|
||||
|
|
@ -234,8 +234,8 @@ the traits class are described in the concepts `FixedAlphaShapeTraits_3`
|
|||
in the non-weighted case and `FixedWeightedAlphaShapeTraits_3` in the weighted case.
|
||||
All \cgal kernels are models of both concepts.
|
||||
The triangulation data structure of the triangulation
|
||||
has to be a model of the concept `TriangulationDataStructure_3`,
|
||||
and it must be parameterized with vertex and cell classes, which are model of the concepts
|
||||
has to be a model of the concept `TriangulationDataStructure_3`
|
||||
whose vertex and cell classes are model of the concepts
|
||||
`FixedAlphaShapeVertex_3` and `FixedAlphaShapeCell_3`.
|
||||
The package provides models `Fixed_alpha_shape_vertex_base_3<Gt>`
|
||||
and `Fixed_alpha_shape_cell_base_3<Gt>`, respectively.
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ does not make sense if the traits class already provides exact constructions.
|
|||
<ul>
|
||||
<li>When the tag `ExactAlphaComparisonTag` is set to \link Tag_true `Tag_true`\endlink,
|
||||
the class `Cartesian_converter` is used internally to switch between the traits class
|
||||
and the %CGAL kernel `CGAL::Simple_cartesian<NT>`, where `NT` can be either `CGAL::Interval_nt` or
|
||||
and the \cgal kernel `CGAL::Simple_cartesian<NT>`, where `NT` can be either `CGAL::Interval_nt` or
|
||||
`CGAL::Exact_rational`. `Cartesian_converter` must thus offer the necessary functors
|
||||
to convert a three-dimensional point of the traits class to a three-dimensional point
|
||||
of `CGAL::Simple_cartesian<NT>`. However, these functors are not necessarily provided by
|
||||
|
|
@ -103,7 +103,7 @@ allowing filtered exact comparisons (that is, interval arithmetic is first used
|
|||
resorting to exact arithmetic). Access to the interval containing the exact value is provided through the function
|
||||
`FT::Approximate_nt approx() const` where `FT::Approximate_nt` is `Interval_nt<Protected>`
|
||||
with `Protected=true`. Access to the exact value is provided through the function
|
||||
`FT::Exact_nt exact() const` where `FT::Exact_nt` depends on the configuration of %CGAL
|
||||
`FT::Exact_nt exact() const` where `FT::Exact_nt` depends on the configuration of \cgal
|
||||
(it may be `mpq_class`, `Gmpq`, `Quotient<CGAL::MP_Float>`, etc).
|
||||
An overload for the function `double to_double(FT)` is also available. Its
|
||||
precision is controlled through `FT::set_relative_precision_of_to_double()` in
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Alpha_shapes_3_Examples)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (c) 1997 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||
//
|
||||
//
|
||||
// Author(s) : Tran Kai Frank DA <Frank.Da@sophia.inria.fr>
|
||||
|
||||
#ifndef CGAL_ALPHA_SHAPE_EUCLIDEAN_TRAITS_3_H
|
||||
#define CGAL_ALPHA_SHAPE_EUCLIDEAN_TRAITS_3_H
|
||||
|
||||
#include <CGAL/license/Alpha_shapes_3.h>
|
||||
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template <class K>
|
||||
class Alpha_shape_euclidean_traits_3 : public K {};
|
||||
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
#endif //CGAL_ALPHA_SHAPE_EUCLIDEAN_TRAITS_3_H
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
// Copyright (c) 1997 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||
//
|
||||
// Author(s) : Tran Kai Frank DA <Frank.Da@sophia.inria.fr>
|
||||
|
||||
#ifndef CGAL_WEIGHTED_ALPHA_SHAPE_EUCLIDEAN_TRAITS_3_H
|
||||
#define CGAL_WEIGHTED_ALPHA_SHAPE_EUCLIDEAN_TRAITS_3_H
|
||||
|
||||
#include <CGAL/license/Alpha_shapes_3.h>
|
||||
|
||||
#define CGAL_DEPRECATED_HEADER "<CGAL/Weighted_alpha_shape_euclidean_traits_3.h>"
|
||||
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
|
||||
"The kernel K can be used directly as traits since weighted points and "\
|
||||
"the associated function objects are now part of the concept Kernel."
|
||||
#include <CGAL/internal/deprecation_warning.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template < class K_ >
|
||||
class Weighted_alpha_shape_euclidean_traits_3
|
||||
: public K_
|
||||
{
|
||||
public:
|
||||
Weighted_alpha_shape_euclidean_traits_3() { }
|
||||
Weighted_alpha_shape_euclidean_traits_3(const K_& k) : K_(k) { }
|
||||
};
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_WEIGHTED_ALPHA_SHAPE_EUCLIDEAN_TRAITS_3_H
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
#include <CGAL/internal/Exact_type_selector.h>
|
||||
#include <CGAL/Has_conversion.h>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <memory>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Alpha_shapes_3_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ template <class Point>
|
|||
bool
|
||||
file_input(std::ifstream& is, std::list<Point>& L, int nb=0)
|
||||
{
|
||||
CGAL::set_ascii_mode(is);
|
||||
CGAL::IO::set_ascii_mode(is);
|
||||
int n;
|
||||
is >> n;
|
||||
if (nb != 0 && nb <= n) n=nb;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ template <class Weighted_point>
|
|||
bool
|
||||
file_input(std::ifstream& is, std::list<Weighted_point>& L)
|
||||
{
|
||||
CGAL::set_ascii_mode(is);
|
||||
CGAL::IO::set_ascii_mode(is);
|
||||
int n;
|
||||
is >> n;
|
||||
std::cout << "Reading " << n << " points" << std::endl;
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ two visible circles.
|
|||
|
||||
The 2D Apollonius graph class
|
||||
`Apollonius_graph_2<ApolloniusGraphTraits_2,ApolloniusGraphDataStructure_2>`
|
||||
follows the design of the triangulation package of \cgal. It is
|
||||
follows the design of the triangulation packages of \cgal. It is
|
||||
parametrized by two arguments:
|
||||
<UL>
|
||||
<LI>the <B>geometric traits</B> class. It provides the basic
|
||||
|
|
|
|||
|
|
@ -4,14 +4,20 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgApolloniusGraph2Ref
|
||||
|
||||
The class `Apollonius_graph_2` represents the
|
||||
Apollonius graph. It supports insertions and deletions of sites.
|
||||
It is templated by two template arguments `Gt`, which
|
||||
must be a model of `ApolloniusGraphTraits_2`, and `Agds`,
|
||||
which must be a model of `ApolloniusGraphDataStructure_2`.
|
||||
The second template argument defaults to
|
||||
`CGAL::Triangulation_data_structure_2< CGAL::Apollonius_graph_vertex_base_2<Gt,true>, CGAL::Triangulation_face_base_2<Gt> >`.
|
||||
\cgalModels `DelaunayGraph_2`
|
||||
The class `Apollonius_graph_2` represents the Apollonius graph.
|
||||
It supports insertions and deletions of sites.
|
||||
|
||||
\tparam Gt is the geometric traits class and must be a model of `ApolloniusGraphTraits_2`.
|
||||
|
||||
\tparam Agds is the Apollonius graph data structure and must be a model of `ApolloniusGraphDataStructure_2`
|
||||
whose vertex and face must be models of `ApolloniusGraphVertexBase_2` and `TriangulationFaceBase_2`,
|
||||
respectively.
|
||||
It defaults to:
|
||||
\code
|
||||
CGAL::Triangulation_data_structure_2<
|
||||
CGAL::Apollonius_graph_vertex_base_2<Gt,true>,
|
||||
CGAL::Triangulation_face_base_2<Gt> >`
|
||||
\endcode
|
||||
|
||||
\cgalHeading{Traversal of the Apollonius Graph}
|
||||
|
||||
|
|
@ -40,17 +46,11 @@ ag.incident_edges(ag.infinite_vertex());
|
|||
ag.incident_edges(ag.infinite_vertex(), f);
|
||||
\endcode
|
||||
|
||||
\sa `DelaunayGraph_2`
|
||||
\sa `ApolloniusGraphTraits_2`
|
||||
\sa `ApolloniusGraphDataStructure_2`
|
||||
\sa `ApolloniusGraphVertexBase_2`
|
||||
\sa `TriangulationFaceBase_2`
|
||||
\cgalModels `DelaunayGraph_2`
|
||||
|
||||
\sa `CGAL::Apollonius_graph_traits_2<K,Method_tag>`
|
||||
\sa `CGAL::Apollonius_graph_filtered_traits_2<CK,CM,EK,EM,FK,FM>`
|
||||
\sa `CGAL::Triangulation_data_structure_2<Vb,Fb>`
|
||||
\sa `CGAL::Apollonius_graph_vertex_base_2<Gt,StoreHidden>`
|
||||
\sa `CGAL::Triangulation_face_base_2<Gt>`
|
||||
|
||||
\sa `CGAL::Apollonius_graph_hierarchy_2<Gt,Agds>`
|
||||
*/
|
||||
template< typename Gt, typename Agds >
|
||||
class Apollonius_graph_2 {
|
||||
|
|
@ -92,7 +92,7 @@ typedef Gt::Site_2 Site_2;
|
|||
|
||||
/// \name Handles And Iterators
|
||||
/// The vertices and faces of the Apollonius graph are accessed
|
||||
/// through `handles`, `iterators` and `circulators`. The iterators
|
||||
/// through `handles`, `iterators`, and `circulators`. The iterators
|
||||
/// and circulators are all bidirectional and non-mutable. The
|
||||
/// circulators and iterators are assignable to the corresponding
|
||||
/// handle types, and they are also convertible to the corresponding
|
||||
|
|
@ -261,63 +261,62 @@ operator=(const Apollonius_graph_2<Gt,Agds>& other);
|
|||
/*!
|
||||
Returns a reference to the Apollonius graph traits object.
|
||||
*/
|
||||
Geom_traits geom_traits();
|
||||
const Geom_traits& geom_traits() const;
|
||||
|
||||
/*!
|
||||
Returns a reference to the
|
||||
underlying data structure.
|
||||
*/
|
||||
Data_structure data_structure();
|
||||
const Data_structure& data_structure() const;
|
||||
|
||||
/*!
|
||||
Same as `data_structure()`. This
|
||||
method has been added in compliance with the `DelaunayGraph_2`
|
||||
concept.
|
||||
*/
|
||||
Data_structure tds();
|
||||
const Data_structure& tds() const;
|
||||
|
||||
/*!
|
||||
Returns the dimension of the Apollonius graph.
|
||||
*/
|
||||
int dimension();
|
||||
int dimension() const;
|
||||
|
||||
/*!
|
||||
Returns the number of finite vertices.
|
||||
*/
|
||||
size_type number_of_vertices();
|
||||
size_type number_of_vertices() const;
|
||||
|
||||
/*!
|
||||
Returns the number of visible sites.
|
||||
*/
|
||||
size_type number_of_visible_sites();
|
||||
size_type number_of_visible_sites() const;
|
||||
|
||||
/*!
|
||||
Returns the number of hidden sites.
|
||||
*/
|
||||
size_type number_of_hidden_sites();
|
||||
size_type number_of_hidden_sites() const;
|
||||
|
||||
/*!
|
||||
Returns the number of faces (both finite and infinite) of the
|
||||
Apollonius graph.
|
||||
*/
|
||||
size_type number_of_faces();
|
||||
size_type number_of_faces() const;
|
||||
|
||||
/*!
|
||||
Returns a face incident to the `infinite_vertex`.
|
||||
*/
|
||||
Face_handle infinite_face();
|
||||
Face_handle infinite_face() const;
|
||||
|
||||
/*!
|
||||
Returns the `infinite_vertex`.
|
||||
*/
|
||||
Vertex_handle
|
||||
infinite_vertex();
|
||||
Vertex_handle infinite_vertex() const;
|
||||
|
||||
/*!
|
||||
Returns a vertex distinct from the `infinite_vertex`.
|
||||
\pre The number of (visible) vertices in the Apollonius graph must be at least one.
|
||||
*/
|
||||
Vertex_handle finite_vertex();
|
||||
Vertex_handle finite_vertex() const;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
@ -337,63 +336,62 @@ Vertex_handle finite_vertex();
|
|||
/*!
|
||||
Starts at an arbitrary finite vertex.
|
||||
*/
|
||||
Finite_vertices_iterator finite_vertices_begin();
|
||||
Finite_vertices_iterator finite_vertices_begin() const;
|
||||
|
||||
/*!
|
||||
Past-the-end iterator.
|
||||
*/
|
||||
Finite_vertices_iterator finite_vertices_end();
|
||||
Finite_vertices_iterator finite_vertices_end() const;
|
||||
|
||||
/*!
|
||||
Starts at an arbitrary finite edge.
|
||||
*/
|
||||
Finite_edges_iterator finite_edges_begin();
|
||||
Finite_edges_iterator finite_edges_begin() const;
|
||||
|
||||
/*!
|
||||
Past-the-end iterator.
|
||||
*/
|
||||
Finite_edges_iterator finite_edges_end();
|
||||
Finite_edges_iterator finite_edges_end() const;
|
||||
|
||||
/*!
|
||||
Starts at an arbitrary finite face.
|
||||
*/
|
||||
Finite_faces_iterator finite_faces_begin();
|
||||
Finite_faces_iterator finite_faces_begin() const;
|
||||
|
||||
/*!
|
||||
Past-the-end iterator.
|
||||
*/
|
||||
Finite_faces_iterator finite_faces_end()
|
||||
const;
|
||||
Finite_faces_iterator finite_faces_end() const;
|
||||
|
||||
/*!
|
||||
Starts at an arbitrary vertex.
|
||||
*/
|
||||
All_vertices_iterator all_vertices_begin();
|
||||
All_vertices_iterator all_vertices_begin() const;
|
||||
|
||||
/*!
|
||||
Past-the-end iterator.
|
||||
*/
|
||||
All_vertices_iterator all_vertices_end();
|
||||
All_vertices_iterator all_vertices_end() const;
|
||||
|
||||
/*!
|
||||
Starts at an arbitrary edge.
|
||||
*/
|
||||
All_edges_iterator all_edges_begin();
|
||||
All_edges_iterator all_edges_begin() const;
|
||||
|
||||
/*!
|
||||
Past-the-end iterator.
|
||||
*/
|
||||
All_edges_iterator all_edges_end();
|
||||
All_edges_iterator all_edges_end() const;
|
||||
|
||||
/*!
|
||||
Starts at an arbitrary face.
|
||||
*/
|
||||
All_faces_iterator all_faces_begin();
|
||||
All_faces_iterator all_faces_begin() const;
|
||||
|
||||
/*!
|
||||
Past-the-end iterator.
|
||||
*/
|
||||
All_faces_iterator all_faces_end();
|
||||
All_faces_iterator all_faces_end() const;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
@ -407,32 +405,32 @@ All_faces_iterator all_faces_end();
|
|||
/*!
|
||||
Starts at an arbitrary site.
|
||||
*/
|
||||
Sites_iterator sites_begin();
|
||||
Sites_iterator sites_begin() const;
|
||||
|
||||
/*!
|
||||
Past-the-end iterator.
|
||||
*/
|
||||
Sites_iterator sites_end();
|
||||
Sites_iterator sites_end() const;
|
||||
|
||||
/*!
|
||||
Starts at an arbitrary visible site.
|
||||
*/
|
||||
Visible_sites_iterator visible_sites_begin();
|
||||
Visible_sites_iterator visible_sites_begin() const;
|
||||
|
||||
/*!
|
||||
Past-the-end iterator.
|
||||
*/
|
||||
Visible_sites_iterator visible_sites_end();
|
||||
Visible_sites_iterator visible_sites_end() const;
|
||||
|
||||
/*!
|
||||
Starts at an arbitrary hidden site.
|
||||
*/
|
||||
Hidden_sites_iterator hidden_sites_begin();
|
||||
Hidden_sites_iterator hidden_sites_begin() const;
|
||||
|
||||
/*!
|
||||
Past-the-end iterator.
|
||||
*/
|
||||
Hidden_sites_iterator hidden_sites_end();
|
||||
Hidden_sites_iterator hidden_sites_end() const;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
@ -454,39 +452,39 @@ Hidden_sites_iterator hidden_sites_end();
|
|||
Starts at an arbitrary face incident
|
||||
to `v`.
|
||||
*/
|
||||
Face_circulator incident_faces(Vertex_handle v);
|
||||
Face_circulator incident_faces(Vertex_handle v) const;
|
||||
|
||||
/*!
|
||||
Starts at face `f`.
|
||||
\pre Face `f` is incident to vertex `v`.
|
||||
*/
|
||||
Face_circulator incident_faces(Vertex_handle v, Face_handle f);
|
||||
Face_circulator incident_faces(Vertex_handle v, Face_handle f) const;
|
||||
|
||||
/*!
|
||||
Starts at an arbitrary edge incident
|
||||
to `v`.
|
||||
*/
|
||||
Edge_circulator incident_edges(Vertex_handle v);
|
||||
Edge_circulator incident_edges(Vertex_handle v) const;
|
||||
|
||||
/*!
|
||||
Starts at the first edge of `f` incident to
|
||||
`v`, in counterclockwise order around `v`.
|
||||
\pre Face `f` is incident to vertex `v`.
|
||||
*/
|
||||
Edge_circulator incident_edges(Vertex_handle v, Face_handle f);
|
||||
Edge_circulator incident_edges(Vertex_handle v, Face_handle f) const;
|
||||
|
||||
/*!
|
||||
Starts at an arbitrary vertex incident
|
||||
to `v`.
|
||||
*/
|
||||
Vertex_circulator incident_vertices(Vertex_handle v);
|
||||
Vertex_circulator incident_vertices(Vertex_handle v) const;
|
||||
|
||||
/*!
|
||||
Starts at the first vertex of `f` adjacent to `v`
|
||||
in counterclockwise order around `v`.
|
||||
\pre Face `f` is incident to vertex `v`.
|
||||
*/
|
||||
Vertex_circulator incident_vertices(Vertex_handle v, Face_handle f);
|
||||
Vertex_circulator incident_vertices(Vertex_handle v, Face_handle f) const;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
@ -516,7 +514,7 @@ bool is_infinite(Face_handle f, int i) const;
|
|||
`true`, iff edge `e` is infinite.
|
||||
*/
|
||||
bool
|
||||
is_infinite(Edge e) const;
|
||||
is_infinite(const Edge& e) const;
|
||||
|
||||
/*!
|
||||
`true`, iff edge `*ec` is infinite.
|
||||
|
|
@ -544,7 +542,7 @@ site `s` in the Apollonius graph. If `s` is visible then the
|
|||
vertex handle of `s` is returned, otherwise
|
||||
`Vertex_handle(nullptr)` is returned.
|
||||
*/
|
||||
Vertex_handle insert(Site_2 s);
|
||||
Vertex_handle insert(const Site_2& s);
|
||||
|
||||
/*!
|
||||
Inserts `s` in the Apollonius graph using the site
|
||||
|
|
@ -553,8 +551,7 @@ the center of `s`. If `s` is visible then the vertex handle of
|
|||
`s` is returned, otherwise `Vertex_handle(nullptr)` is
|
||||
returned.
|
||||
*/
|
||||
Vertex_handle insert(Site_2 s, Vertex_handle
|
||||
vnear);
|
||||
Vertex_handle insert(const Site_2& s, Vertex_handle vnear);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
@ -581,7 +578,7 @@ arbitrarily and one of the nearest neighbors of `p` is
|
|||
returned. If there are no visible sites in the Apollonius diagram
|
||||
`Vertex_handle(nullptr)` is returned.
|
||||
*/
|
||||
Vertex_handle nearest_neighbor(Point_2 p);
|
||||
Vertex_handle nearest_neighbor(const Point_2& p) const;
|
||||
|
||||
/*!
|
||||
Finds the nearest neighbor of the point
|
||||
|
|
@ -591,8 +588,7 @@ arbitrarily and one of the nearest neighbors of `p` is
|
|||
returned. If there are no visible sites in the Apollonius diagram
|
||||
`Vertex_handle(nullptr)` is returned.
|
||||
*/
|
||||
Vertex_handle nearest_neighbor(Point_2 p,
|
||||
Vertex_handle vnear);
|
||||
Vertex_handle nearest_neighbor(const Point_2& p, Vertex_handle vnear) const;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
@ -645,7 +641,7 @@ the stream `str`.
|
|||
|
||||
*/
|
||||
template< class Stream >
|
||||
Stream& draw_primal(Stream& str);
|
||||
Stream& draw_primal(Stream& str) const;
|
||||
|
||||
/*!
|
||||
Draws the dual of the
|
||||
|
|
@ -658,7 +654,7 @@ Apollonius graph, i.e., the Apollonius diagram, to the stream
|
|||
|
||||
*/
|
||||
template < class Stream >
|
||||
Stream& draw_dual(Stream& str);
|
||||
Stream& draw_dual(Stream& str) const;
|
||||
|
||||
/*!
|
||||
Draws the edge
|
||||
|
|
@ -669,7 +665,7 @@ Draws the edge
|
|||
|
||||
*/
|
||||
template< class Stream >
|
||||
Stream& draw_primal_edge(Edge e, Stream& str);
|
||||
Stream& draw_primal_edge(const Edge& e, Stream& str) const;
|
||||
|
||||
/*!
|
||||
Draws the dual of the
|
||||
|
|
@ -682,7 +678,7 @@ of the Apollonius diagram.
|
|||
|
||||
*/
|
||||
template< class Stream >
|
||||
Stream& draw_dual_edge(Edge e, Stream& str);
|
||||
Stream& draw_dual_edge(const Edge& e, Stream& str) const;
|
||||
|
||||
/*!
|
||||
Writes the current
|
||||
|
|
@ -690,7 +686,7 @@ state of the Apollonius graph to an output stream. In particular,
|
|||
all visible and hidden sites are written as well as the
|
||||
underlying combinatorial data structure.
|
||||
*/
|
||||
void file_output(std::ostream& os);
|
||||
void file_output(std::ostream& os) const;
|
||||
|
||||
/*!
|
||||
Reads the state of the
|
||||
|
|
@ -701,14 +697,12 @@ void file_input(std::istream& is);
|
|||
/*!
|
||||
Writes the current state of the Apollonius graph to an output stream.
|
||||
*/
|
||||
std::ostream& operator<<(std::ostream& os,
|
||||
Apollonius_graph_2<Gt,Agds> ag);
|
||||
std::ostream& operator<<(std::ostream& os, const Apollonius_graph_2<Gt,Agds>& ag) const;
|
||||
|
||||
/*!
|
||||
Reads the state of the Apollonius graph from an input stream.
|
||||
*/
|
||||
std::istream& operator>>(std::istream& is,
|
||||
Apollonius_graph_2<Gt,Agds> ag);
|
||||
std::istream& operator>>(std::istream& is, const Apollonius_graph_2<Gt,Agds>& ag);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
@ -721,9 +715,9 @@ Checks the validity of the Apollonius graph. If `verbose` is
|
|||
is 0, only the data structure is validated. If `level` is 1, then
|
||||
both the data structure and the Apollonius graph are
|
||||
validated. Negative values of `level` always return true, and
|
||||
values greater then 1 are equivalent to `level` being 1.
|
||||
values greater than 1 are equivalent to `level` being 1.
|
||||
*/
|
||||
bool is_valid(bool verbose = false, int level = 1);
|
||||
bool is_valid(bool verbose = false, int level = 1) const;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
@ -737,12 +731,11 @@ void clear();
|
|||
|
||||
/*!
|
||||
The Apollonius graphs
|
||||
`other` and `ag` are swapped. `ag`.`swap(other)` should
|
||||
be preferred to `ag`` = other` or to `ag``(other)` if
|
||||
`other` and `ag` are swapped. `ag.swap(other)` should
|
||||
be preferred to `ag = other` or to `ag(other)` if
|
||||
`other` is deleted afterwards.
|
||||
*/
|
||||
void swap(Apollonius_graph_2<Gt,Agds>
|
||||
other);
|
||||
void swap(Apollonius_graph_2<Gt,Agds>& other);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,36 +19,34 @@ find the nearest neighbor of \f$ p\f$ as in the
|
|||
we use the nearest neighbor found at level \f$ i+1\f$ to find the nearest
|
||||
neighbor at level \f$ i\f$. This is a variant of the corresponding
|
||||
hierarchy for points found in \cgalCite{d-iirdt-98}.
|
||||
|
||||
The class has two template parameters which have essentially the same
|
||||
meaning as in the `Apollonius_graph_2<Gt,Agds>` class. The first
|
||||
template parameter must be a model of the
|
||||
`ApolloniusGraphTraits_2` concept.
|
||||
The second template parameter must be a model of the
|
||||
`ApolloniusGraphDataStructure_2` concept. However, the vertex base
|
||||
class that is to be used in the Apollonius graph data structure must
|
||||
be a model of the `ApolloniusGraphHierarchyVertexBase_2` concept.
|
||||
The second template parameter defaults to
|
||||
`Triangulation_data_structure_2< Apollonius_graph_hierarchy_vertex_base_2< Apollonius_graph_vertex_base_2<Gt,true> >, Triangulation_face_base_2<Gt> >`.
|
||||
meaning as in the `Apollonius_graph_2<Gt,Agds>` class.
|
||||
|
||||
\tparam Gt is the geometric traits class and must be a model of `ApolloniusGraphTraits_2`.
|
||||
|
||||
\tparam Agds is the Apollonius graph data structure and must be a model of `ApolloniusGraphDataStructure_2`
|
||||
whose vertex and face must be models of `ApolloniusGraphHierarchyVertexBase_2` and `TriangulationFaceBase_2`, respectively.
|
||||
It defaults to:
|
||||
\code
|
||||
CGAL::Triangulation_data_structure_2<
|
||||
CGAL::Apollonius_graph_hierarchy_vertex_base_2<CGAL::Apollonius_graph_vertex_base_2<Gt,true> >,
|
||||
CGAL::Triangulation_face_base_2<Gt> >
|
||||
\endcode
|
||||
|
||||
\cgalHeading{Heritage}
|
||||
|
||||
The `Apollonius_graph_hierarchy_2` class derives publicly from the
|
||||
`Apollonius_graph_2<Gt,Agds>` class. The interface is
|
||||
the same with its base class. In the sequel only the methods
|
||||
overridden are documented.
|
||||
|
||||
\cgalHeading{Types}
|
||||
|
||||
`Apollonius_graph_hierarchy_2` does not introduce other types than those introduced by
|
||||
its base class `Apollonius_graph_2<Gt,Agds>`.
|
||||
|
||||
\sa `ApolloniusGraphDataStructure_2`
|
||||
\sa `ApolloniusGraphTraits_2`
|
||||
\sa `ApolloniusGraphHierarchyVertexBase_2`
|
||||
\sa `CGAL::Apollonius_graph_2<Gt,Agds>`
|
||||
\sa `CGAL::Triangulation_data_structure_2<Vb,Fb>`
|
||||
\sa `CGAL::Apollonius_graph_traits_2<K,Method_tag>`
|
||||
\sa `CGAL::Apollonius_graph_filtered_traits_2<CK,CM,EK,EM,FK,FM>`
|
||||
\sa `CGAL::Apollonius_graph_hierarchy_vertex_base_2<Agvb>`
|
||||
|
||||
*/
|
||||
template< typename Gt, typename Agds >
|
||||
class Apollonius_graph_hierarchy_2 : public CGAL::Apollonius_graph_2<Gt,Agds> {
|
||||
|
|
@ -61,8 +59,7 @@ public:
|
|||
Creates an hierarchy of Apollonius graphs using `gt` as
|
||||
geometric traits.
|
||||
*/
|
||||
Apollonius_graph_hierarchy_2(Gt
|
||||
gt=Gt());
|
||||
Apollonius_graph_hierarchy_2(Gt gt=Gt());
|
||||
|
||||
/*!
|
||||
Creates an Apollonius graph hierarchy using
|
||||
|
|
@ -70,17 +67,15 @@ Creates an Apollonius graph hierarchy using
|
|||
range [`first`, `beyond`).
|
||||
*/
|
||||
template< class Input_iterator >
|
||||
Apollonius_graph_hierarchy_2<Gt,Agds>(Input_iterator
|
||||
first, Input_iterator beyond, Gt gt=Gt());
|
||||
Apollonius_graph_hierarchy_2(Input_iterator first, Input_iterator beyond, Gt gt=Gt());
|
||||
|
||||
/*!
|
||||
Copy constructor. All faces, vertices and inter-level pointers
|
||||
Copy constructor. All faces, vertices, and inter-level pointers
|
||||
are duplicated. After the construction, `agh` and `other` refer
|
||||
to two different Apollonius graph hierarchies: if
|
||||
`other` is modified, `agh` is not.
|
||||
*/
|
||||
Apollonius_graph_hierarchy_2<Gt,Agds>
|
||||
(Apollonius_graph_hierarchy_2<Gt,Agds> other);
|
||||
Apollonius_graph_hierarchy_2(const Apollonius_graph_hierarchy_2<Gt,Agds>& other);
|
||||
|
||||
/*!
|
||||
Assignment. All faces, vertices and inter-level pointers
|
||||
|
|
@ -112,7 +107,7 @@ site `s` in the Apollonius graph hierarchy. If `s`
|
|||
is visible then the vertex handle of `s` is returned, otherwise
|
||||
`Vertex_handle(nullptr)` is returned.
|
||||
*/
|
||||
Vertex_handle insert(Site_2 s);
|
||||
Vertex_handle insert(const Site_2& s);
|
||||
|
||||
/*!
|
||||
Inserts `s` in the Apollonius graph hierarchy using the
|
||||
|
|
@ -124,8 +119,7 @@ A call to this method is equivalent to `agh.insert(s);` and it has
|
|||
been added for the sake of conformity with the interface of the
|
||||
`Apollonius_graph_2<Gt,Agds>` class.
|
||||
*/
|
||||
Vertex_handle insert(Site_2 s, Vertex_handle
|
||||
vnear);
|
||||
Vertex_handle insert(const Site_2& s, Vertex_handle vnear);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
@ -152,7 +146,7 @@ arbitrarily and one of the nearest neighbors of `p` is
|
|||
returned. If there are no visible sites in the Apollonius diagram
|
||||
`Vertex_handle(nullptr)` is returned.
|
||||
*/
|
||||
Vertex_handle nearest_neighbor(Point p);
|
||||
Vertex_handle nearest_neighbor(const Point_2& p) const;
|
||||
|
||||
/*!
|
||||
Finds the nearest neighbor of the point
|
||||
|
|
@ -163,8 +157,7 @@ A call to this method is equivalent to
|
|||
conformity with the interface of the
|
||||
`Apollonius_graph_2<Gt,Agds>` class.
|
||||
*/
|
||||
Vertex_handle nearest_neighbor(Point p,
|
||||
Vertex_handle vnear);
|
||||
Vertex_handle nearest_neighbor(const Point_2& p, Vertex_handle vnear) const;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
@ -177,7 +170,7 @@ state of the Apollonius graph hierarchy to an output stream. In particular,
|
|||
all visible and hidden sites are written as well as the
|
||||
underlying combinatorial hierarchical data structure.
|
||||
*/
|
||||
void file_output(std::ostream& os);
|
||||
void file_output(std::ostream& os) const;
|
||||
|
||||
/*!
|
||||
Reads the state of the
|
||||
|
|
@ -189,7 +182,7 @@ void file_input(std::istream& is);
|
|||
Writes the current state of the Apollonius graph hierarchy to an
|
||||
output stream.
|
||||
*/
|
||||
std::ostream& operator<<(std::ostream& os, Apollonius_graph_hierarchy_2<Gt,Agds> agh);
|
||||
std::ostream& operator<<(std::ostream& os, Apollonius_graph_hierarchy_2<Gt,Agds> agh) const;
|
||||
|
||||
/*!
|
||||
Reads the state of the Apollonius graph hierarchy from an input stream.
|
||||
|
|
@ -209,7 +202,7 @@ is validated, as well as the inter-level pointers. If `level` is
|
|||
1, then the data structure at all levels is validated, the inter-level
|
||||
pointers are validated and all levels of the Apollonius graph
|
||||
hierarchy are also validated. Negative values of `level` always
|
||||
return `true`, and values greater then 1 are equivalent to
|
||||
return `true`, and values greater than 1 are equivalent to
|
||||
`level` being 1.
|
||||
*/
|
||||
bool is_valid(bool verbose = false, int level = 1) const;
|
||||
|
|
@ -227,11 +220,10 @@ void clear();
|
|||
|
||||
/*!
|
||||
The Apollonius graph hierarchies `other` and `agh` are
|
||||
swapped. `agh`.`swap(other)` should be preferred to `agh`` =
|
||||
other` or to `agh``(other)` if `other` is deleted afterwards.
|
||||
swapped. `agh.swap(other)` should be preferred to `agh = other`
|
||||
or to `agh(other)` if `other` is deleted afterwards.
|
||||
*/
|
||||
void swap(Apollonius_graph_hierarchy_2<Gt,Agds>
|
||||
other);
|
||||
void swap(Apollonius_graph_hierarchy_2<Gt,Agds>& other);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,9 @@ of the `ApolloniusGraphVertexBase_2` concept.
|
|||
|
||||
\cgalModels `ApolloniusGraphHierarchyVertexBase_2`
|
||||
|
||||
\sa `ApolloniusGraphVertexBase_2`
|
||||
\sa `ApolloniusGraphHierarchyVertexBase_2`
|
||||
\sa `CGAL::Apollonius_graph_vertex_base_2<Gt,StoreHidden>`
|
||||
|
||||
\sa `CGAL::Triangulation_data_structure_2<Vb,Fb>`
|
||||
\sa `CGAL::Apollonius_graph_hierarchy_2<Gt,Agds>`
|
||||
*/
|
||||
template< typename Agvb >
|
||||
class Apollonius_graph_hierarchy_vertex_base_2 : Agvb {
|
||||
|
|
@ -34,7 +33,7 @@ Apollonius_graph_hierarchy_vertex_base_2();
|
|||
Constructs a vertex associated with the site `s` and
|
||||
embedded at the center of `s`.
|
||||
*/
|
||||
Apollonius_graph_hierarchy_vertex_base_2(Site_2 s);
|
||||
Apollonius_graph_hierarchy_vertex_base_2(const Site_2& s);
|
||||
|
||||
/*!
|
||||
Constructs a vertex associated with
|
||||
|
|
@ -42,7 +41,7 @@ the site `s`, embedded at the center of `s`,
|
|||
and pointing to the face associated with the face
|
||||
handle `f`.
|
||||
*/
|
||||
Apollonius_graph_vertex_base_2(Site_2 s, Face_handle f);
|
||||
Apollonius_graph_hierarchy_vertex_base_2(const Site_2& s, Face_handle f);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,13 +22,8 @@ The way the predicates are evaluated is discussed in
|
|||
|
||||
\cgalModels `ApolloniusGraphTraits_2`
|
||||
|
||||
\sa `Kernel`
|
||||
\sa `ApolloniusGraphTraits_2`
|
||||
\sa `CGAL::Integral_domain_without_division_tag`
|
||||
\sa `CGAL::Field_with_sqrt_tag`
|
||||
\sa `CGAL::Apollonius_graph_2<Gt,Agds>`
|
||||
\sa `CGAL::Apollonius_graph_filtered_traits_2<CK,CM,EK,EM,FK,FM>`
|
||||
|
||||
*/
|
||||
template< typename K, typename Method_tag >
|
||||
class Apollonius_graph_traits_2 {
|
||||
|
|
@ -45,14 +40,13 @@ Apollonius_graph_traits_2<K,Method_tag>();
|
|||
/*!
|
||||
Copy constructor.
|
||||
*/
|
||||
Apollonius_graph_traits_2<K,Method_tag>(Apollonius_graph_traits_2<K,Method_tag> other);
|
||||
Apollonius_graph_traits_2<K,Method_tag>(const Apollonius_graph_traits_2<K,Method_tag>& other);
|
||||
|
||||
/*!
|
||||
Assignment operator.
|
||||
*/
|
||||
Apollonius_graph_traits_2<K,Method_tag>
|
||||
operator=(Apollonius_graph_traits_2<K,Method_tag>
|
||||
other);
|
||||
operator=(const Apollonius_graph_traits_2<K,Method_tag>& other);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,13 +19,8 @@ discarded. By default `StoreHidden` is set to `true`.
|
|||
|
||||
\cgalModels `ApolloniusGraphVertexBase_2`
|
||||
|
||||
\sa `ApolloniusGraphVertexBase_2`
|
||||
\sa `ApolloniusGraphDataStructure_2`
|
||||
\sa `ApolloniusGraphTraits_2`
|
||||
\sa `CGAL::Triangulation_data_structure_2<Vb,Fb>`
|
||||
\sa `CGAL::Apollonius_graph_traits_2<K,Method_tag>`
|
||||
\sa `CGAL::Apollonius_graph_filtered_traits_2<CK,CM,EK,EM,FK,FM>`
|
||||
|
||||
\sa `CGAL::Apollonius_graph_hierarchy_vertex_base_2<Gt>`
|
||||
*/
|
||||
template< typename Gt, typename StoreHidden >
|
||||
class Apollonius_graph_vertex_base_2 {
|
||||
|
|
@ -37,13 +32,13 @@ public:
|
|||
/*!
|
||||
%Default constructor.
|
||||
*/
|
||||
Apollonius_graph_bertex_base_2();
|
||||
Apollonius_graph_vertex_base_2();
|
||||
|
||||
/*!
|
||||
Constructs a vertex associated with the site `s` and
|
||||
embedded at the center of `s`.
|
||||
*/
|
||||
Apollonius_graph_vertex_base_2(Site_2 s);
|
||||
Apollonius_graph_vertex_base_2(const Site_2& s);
|
||||
|
||||
/*!
|
||||
Constructs a vertex associated with
|
||||
|
|
@ -51,7 +46,7 @@ the site `s`, embedded at the center of `s`,
|
|||
and pointing to the face associated with the face
|
||||
handle `f`.
|
||||
*/
|
||||
Apollonius_graph_vertex_base_2(Site_2 s, Face_handle f);
|
||||
Apollonius_graph_vertex_base_2(const Site_2& s, Face_handle f);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,12 +22,9 @@ The I/O operators are defined for `iostream`.
|
|||
The information output in the `iostream` is: the point of the
|
||||
Apollonius site and its weight.
|
||||
|
||||
\sa `Kernel`
|
||||
\sa `ApolloniusSite_2`
|
||||
\sa `CGAL::Qt_widget`
|
||||
\sa `CGAL::Apollonius_graph_traits_2<K,Method_tag>`
|
||||
\sa `CGAL::Apollonius_graph_filtered_traits_2<CK,CM,EK,EM,FK,FM>`
|
||||
|
||||
*/
|
||||
template< typename K >
|
||||
class Apollonius_site_2 {
|
||||
|
|
@ -44,7 +41,7 @@ Apollonius_site_2(Point_2 p=Point_2(), Weight w= Weight(0));
|
|||
/*!
|
||||
Copy constructor.
|
||||
*/
|
||||
Apollonius_site_2(Apollonius_site_2<K> other);
|
||||
Apollonius_site_2(const Apollonius_site_2<K>& other);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
@ -57,8 +54,7 @@ Apollonius site `s` into the stream `os`.
|
|||
\pre The insert operator must be defined for `Point_2` and `Weight`.
|
||||
\relates Apollonius_site_2
|
||||
*/
|
||||
std::ostream& operator<<(std::ostream& os,
|
||||
const Apollonius_site_2<K>& s);
|
||||
std::ostream& operator<<(std::ostream& os, const Apollonius_site_2<K>& s) const;
|
||||
|
||||
/*!
|
||||
Reads an Apollonius site from the stream `is` and assigns it
|
||||
|
|
@ -67,8 +63,7 @@ to `s`.
|
|||
\pre The extract operator must be defined for `Point_2` and `Weight`.
|
||||
\relates Apollonius_site_2
|
||||
*/
|
||||
std::istream& operator>>(std::istream& is,
|
||||
const Apollonius_site_2<K>& s);
|
||||
std::istream& operator>>(std::istream& is, const Apollonius_site_2<K>& s);
|
||||
|
||||
/*!
|
||||
Inserts the Apollonius site `s` into the `Qt_widget` stream `w`.
|
||||
|
|
@ -76,7 +71,6 @@ Inserts the Apollonius site `s` into the `Qt_widget` stream `w`.
|
|||
\pre The insert operator must be defined for `K::Circle_2`.
|
||||
\relates Apollonius_site_2
|
||||
*/
|
||||
Qt_widget& operator<<(Qt_widget& w,
|
||||
const Apollonius_site_2<K>& s);
|
||||
Qt_widget& operator<<(Qt_widget& w, const Apollonius_site_2<K>& s) const;
|
||||
|
||||
} /* end namespace CGAL */
|
||||
|
|
|
|||
|
|
@ -42,10 +42,10 @@ public:
|
|||
/// @{
|
||||
|
||||
/*!
|
||||
Inserts
|
||||
a degree two vertex and two faces adjacent to it that have two common
|
||||
edges. The edge defined by the face handle `f` and the integer
|
||||
`i` is duplicated. It returns a handle to the vertex created.
|
||||
inserts a degree two vertex and two faces adjacent to it that have two common edges.
|
||||
|
||||
The edge defined by the face handle `f` and the integer `i` is duplicated. It returns a handle
|
||||
to the vertex created.
|
||||
*/
|
||||
Vertex_handle insert_degree_2(Face_handle f, int i);
|
||||
|
||||
|
|
|
|||
|
|
@ -19,17 +19,12 @@ next and previous level graphs.
|
|||
`ApolloniusGraphHierarchyVertexBase_2` does not introduce any
|
||||
types in addition to those of `ApolloniusGraphVertexBase_2`.
|
||||
|
||||
\cgalHasModel CGAL::Apollonius_graph_hierarchy_vertex_base_2<CGAL::Apollonius_graph_vertex_base_2<Gt,StoreHidden> >
|
||||
\cgalHasModel `CGAL::Apollonius_graph_hierarchy_vertex_base_2<CGAL::Apollonius_graph_vertex_base_2<Gt,StoreHidden> >`
|
||||
|
||||
\sa `ApolloniusGraphDataStructure_2`
|
||||
\sa `ApolloniusGraphVertexBase_2`
|
||||
\sa `CGAL::Apollonius_graph_hierarchy_2<Gt,Agds>`
|
||||
\sa `CGAL::Triangulation_data_structure_2<Vb,Fb>`
|
||||
\sa `CGAL::Apollonius_graph_vertex_base_2<Gt,StoreHidden>`
|
||||
\sa `CGAL::Apollonius_graph_hierarchy_vertex_base_2<Agvb>`
|
||||
|
||||
*/
|
||||
|
||||
class ApolloniusGraphHierarchyVertexBase_2 {
|
||||
public:
|
||||
|
||||
|
|
@ -37,8 +32,7 @@ public:
|
|||
/// @{
|
||||
|
||||
/*!
|
||||
Default
|
||||
constructor.
|
||||
%Default constructor.
|
||||
*/
|
||||
ApolloniusGraphHierarchyVertexBase_2();
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
\ingroup PkgApolloniusGraph2Concepts
|
||||
\cgalConcept
|
||||
|
||||
\cgalRefines `TriangulationVertexBase_2`
|
||||
|
||||
The concept `ApolloniusGraphVertexBase_2` describes the
|
||||
requirements for the vertex base class of the
|
||||
`ApolloniusGraphDataStructure_2` concept. A vertex stores an
|
||||
|
|
@ -12,14 +10,14 @@ Apollonius site and provides access to one of its incident faces
|
|||
through a `Face_handle`. In addition, it maintains a container of
|
||||
sites. The container stores the hidden sites related to the vertex.
|
||||
|
||||
\cgalRefines `TriangulationVertexBase_2`
|
||||
|
||||
\cgalHasModel `CGAL::Apollonius_graph_vertex_base_2<Gt,StoreHidden>`
|
||||
|
||||
\sa `ApolloniusGraphDataStructure_2`
|
||||
\sa `ApolloniusGraphTraits_2`
|
||||
\sa `CGAL::Apollonius_graph_vertex_base_2<Gt,StoreHidden>`
|
||||
|
||||
\sa `CGAL::Apollonius_graph_2<Gt,Agds>`
|
||||
\sa `CGAL::Triangulation_data_structure_2<Vb,Fb>`
|
||||
*/
|
||||
|
||||
class ApolloniusGraphVertexBase_2 {
|
||||
public:
|
||||
|
||||
|
|
@ -77,7 +75,7 @@ typedef unspecified_type Hidden_sites_iterator;
|
|||
/// @{
|
||||
|
||||
/*!
|
||||
Default constructor.
|
||||
%Default constructor.
|
||||
*/
|
||||
ApolloniusGraphVertexBase_2();
|
||||
|
||||
|
|
|
|||
|
|
@ -43,18 +43,18 @@ aforementioned concepts.
|
|||
\cgalCRPSection{Concepts}
|
||||
|
||||
- `ApolloniusSite_2`
|
||||
- `ApolloniusGraphTraits_2`
|
||||
- `ApolloniusGraphDataStructure_2`
|
||||
- `ApolloniusGraphVertexBase_2`
|
||||
- `ApolloniusGraphTraits_2`
|
||||
- `ApolloniusGraphHierarchyVertexBase_2`
|
||||
|
||||
\cgalCRPSection{Classes}
|
||||
|
||||
- `CGAL::Apollonius_graph_2<Gt,Agds>`
|
||||
- `CGAL::Apollonius_site_2<K>`
|
||||
- `CGAL::Apollonius_graph_vertex_base_2<Gt,StoreHidden>`
|
||||
- `CGAL::Apollonius_graph_traits_2<K,Method_tag>`
|
||||
- `CGAL::Apollonius_graph_filtered_traits_2<CK,CM,EK,EM,FK,FM>`
|
||||
- `CGAL::Apollonius_graph_vertex_base_2<Gt,StoreHidden>`
|
||||
- `CGAL::Apollonius_graph_hierarchy_2<Gt,Agds>`
|
||||
- `CGAL::Apollonius_graph_hierarchy_vertex_base_2<Agvb>`
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Apollonius_graph_2_Examples)
|
||||
|
||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||
|
|
|
|||
|
|
@ -1966,7 +1966,7 @@ Apollonius_graph_2<Gt,Agds,LTag>::file_output(std::ostream& os) const
|
|||
|
||||
CGAL_assertion( n >= 1 );
|
||||
|
||||
if( is_ascii(os) ) {
|
||||
if( IO::is_ascii(os) ) {
|
||||
os << n << ' ' << m << ' ' << dimension() << std::endl;
|
||||
} else {
|
||||
os << n << m << dimension();
|
||||
|
|
@ -1980,24 +1980,24 @@ Apollonius_graph_2<Gt,Agds,LTag>::file_output(std::ostream& os) const
|
|||
V[infinite_vertex()] = inum++;
|
||||
|
||||
// finite vertices
|
||||
if (is_ascii(os)) os << std::endl;
|
||||
if (IO::is_ascii(os)) os << std::endl;
|
||||
for (Finite_vertices_iterator vit = finite_vertices_begin();
|
||||
vit != finite_vertices_end(); ++vit) {
|
||||
V[vit] = inum++;
|
||||
os << vit->site();
|
||||
if ( is_ascii(os) ) { os << ' '; }
|
||||
if ( IO::is_ascii(os) ) { os << ' '; }
|
||||
os << vit->number_of_hidden_sites();
|
||||
typename Vertex::Hidden_sites_iterator hit;
|
||||
for (hit = vit->hidden_sites_begin(); hit != vit->hidden_sites_end();
|
||||
++hit) {
|
||||
if ( is_ascii(os) ) { os << ' '; }
|
||||
if ( IO::is_ascii(os) ) { os << ' '; }
|
||||
os << *hit;
|
||||
}
|
||||
// write non-combinatorial info of the vertex
|
||||
// os << *vit ;
|
||||
if ( is_ascii(os) ) { os << std::endl; }
|
||||
if ( IO::is_ascii(os) ) { os << std::endl; }
|
||||
}
|
||||
if ( is_ascii(os) ) { os << std::endl; }
|
||||
if ( IO::is_ascii(os) ) { os << std::endl; }
|
||||
|
||||
// vertices of the faces
|
||||
inum = 0;
|
||||
|
|
@ -2007,25 +2007,25 @@ Apollonius_graph_2<Gt,Agds,LTag>::file_output(std::ostream& os) const
|
|||
F[fit] = inum++;
|
||||
for(int j = 0; j < dim ; ++j) {
|
||||
os << V[ fit->vertex(j) ];
|
||||
if( is_ascii(os) ) { os << ' '; }
|
||||
if( IO::is_ascii(os) ) { os << ' '; }
|
||||
}
|
||||
// write non-combinatorial info of the face
|
||||
// os << *fit ;
|
||||
if( is_ascii(os) ) { os << std::endl; }
|
||||
if( IO::is_ascii(os) ) { os << std::endl; }
|
||||
}
|
||||
if( is_ascii(os) ) { os << std::endl; }
|
||||
if( IO::is_ascii(os) ) { os << std::endl; }
|
||||
|
||||
// neighbor pointers of the faces
|
||||
for( All_faces_iterator it = all_faces_begin();
|
||||
it != all_faces_end(); ++it) {
|
||||
for(int j = 0; j < dimension()+1; ++j){
|
||||
os << F[ it->neighbor(j) ];
|
||||
if( is_ascii(os) ) { os << ' '; }
|
||||
if( IO::is_ascii(os) ) { os << ' '; }
|
||||
}
|
||||
if( is_ascii(os) ) { os << std::endl; }
|
||||
if( IO::is_ascii(os) ) { os << std::endl; }
|
||||
}
|
||||
|
||||
if ( is_ascii(os) ) { os << std::endl; }
|
||||
if ( IO::is_ascii(os) ) { os << std::endl; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@ file_output(std::ostream& os) const
|
|||
// write each level of the hierarchy
|
||||
for (unsigned int i = 0; i < ag_hierarchy_2__maxlevel; ++i) {
|
||||
hierarchy[i]->file_output(os);
|
||||
if ( is_ascii(os) ) { os << std::endl << std::endl; }
|
||||
if ( IO::is_ascii(os) ) { os << std::endl << std::endl; }
|
||||
}
|
||||
|
||||
Vertex_map* V = new Vertex_map[ag_hierarchy_2__maxlevel];
|
||||
|
|
@ -520,22 +520,22 @@ file_output(std::ostream& os) const
|
|||
}
|
||||
|
||||
// write up and down pointer info
|
||||
if ( is_ascii(os) ) { os << std::endl << std::endl; }
|
||||
if ( IO::is_ascii(os) ) { os << std::endl << std::endl; }
|
||||
for (unsigned int i = 0; i < ag_hierarchy_2__maxlevel; ++i) {
|
||||
os << i;
|
||||
if ( is_ascii(os) ) { os << " "; }
|
||||
if ( IO::is_ascii(os) ) { os << " "; }
|
||||
os << hierarchy[i]->number_of_vertices();
|
||||
if ( is_ascii(os) ) { os << std::endl; }
|
||||
if ( IO::is_ascii(os) ) { os << std::endl; }
|
||||
for (Finite_vertices_iterator vit = hierarchy[i]->finite_vertices_begin();
|
||||
vit != hierarchy[i]->finite_vertices_end(); ++vit) {
|
||||
os << V[i][vit];
|
||||
if ( is_ascii(os) ) { os << " "; }
|
||||
if ( IO::is_ascii(os) ) { os << " "; }
|
||||
os << V_down[i][vit];
|
||||
if ( is_ascii(os) ) { os << " "; }
|
||||
if ( IO::is_ascii(os) ) { os << " "; }
|
||||
os << V_up[i][vit];
|
||||
if ( is_ascii(os) ) { os << std::endl; }
|
||||
if ( IO::is_ascii(os) ) { os << std::endl; }
|
||||
}
|
||||
if ( is_ascii(os) ) { os << std::endl << std::endl; }
|
||||
if ( IO::is_ascii(os) ) { os << std::endl << std::endl; }
|
||||
}
|
||||
|
||||
delete[] V;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
|
||||
#include <CGAL/Apollonius_graph_2/basic.h>
|
||||
#include <CGAL/atomic.h>
|
||||
#include <atomic>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -33,8 +33,8 @@ public:
|
|||
typedef bool bool_;
|
||||
typedef unsigned long long_;
|
||||
#else
|
||||
typedef CGAL::cpp11::atomic<bool> bool_;
|
||||
typedef CGAL::cpp11::atomic<unsigned long> long_;
|
||||
typedef std::atomic<bool> bool_;
|
||||
typedef std::atomic<unsigned long> long_;
|
||||
#endif
|
||||
|
||||
static bool_ count_cases;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
|
||||
#include <CGAL/Apollonius_graph_2/basic.h>
|
||||
#include <CGAL/atomic.h>
|
||||
#include <atomic>
|
||||
|
||||
#define AG2_PROFILE_PREDICATES
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ public:
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
typedef unsigned long long_;
|
||||
#else
|
||||
typedef CGAL::cpp11::atomic<unsigned long> long_;
|
||||
typedef std::atomic<unsigned long> long_;
|
||||
#endif
|
||||
|
||||
// high level predicates
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Apollonius_graph_2_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Arithmetic_kernel_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public:
|
|||
int i = 0;
|
||||
for(InputIterator it = begin;it != end; it++, i++) {
|
||||
std::stringstream curr_item;
|
||||
::CGAL::set_pretty_mode(curr_item);
|
||||
::CGAL::IO::set_pretty_mode(curr_item);
|
||||
curr_item << i << "th: ";
|
||||
curr_item << (*it);
|
||||
curve_list->insertItem(curr_item.str());
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ void xAlci_main_window::oc_rasterize_click()
|
|||
oc_activate_layers();
|
||||
} else {
|
||||
// CGAL::set_error_behaviour(CGAL::THROW_EXCEPTION);
|
||||
::CGAL::set_pretty_mode(std::cout);
|
||||
::CGAL::IO::set_pretty_mode(std::cout);
|
||||
Poly_int2 f;
|
||||
|
||||
if(!input_poly(f, oc_input->text().ascii()))
|
||||
|
|
|
|||
|
|
@ -194,16 +194,16 @@ void xAlci_main_window::oc_analyse_click()
|
|||
Poly_int2 ress = fxx*fy*fy - ((fx*fy*fxy)*Poly_int1(2,0)) + fyy*fx*fx,
|
||||
res1 = f*fx, res2 = f*fy;
|
||||
|
||||
CGAL::set_pretty_mode(std::cout);
|
||||
CGAL::IO::set_pretty_mode(std::cout);
|
||||
std::cout << "curv:\n " << ress << "\n\n";
|
||||
std::cout << "fx:\n " << fx << "\n\n";
|
||||
std::cout << "fy:\n " << fy << "\n\n";
|
||||
std::cout << "f*fx:\n " << res1 << "\n\n";
|
||||
std::cout << "f*fy:\n " << res2 << "\n\n";
|
||||
|
||||
CGAL::set_ascii_mode(std::cout);
|
||||
CGAL::IO::set_ascii_mode(std::cout);
|
||||
std::cout << "f:\n " << f << "\n\n";
|
||||
CGAL::set_pretty_mode(std::cout);
|
||||
CGAL::IO::set_pretty_mode(std::cout);
|
||||
std::cout << "f:\n " << f << "\n\n";
|
||||
|
||||
timer.reset();
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue