Merge branch 'master' into Stream_support-Color-GF

This commit is contained in:
Laurent Rineau 2019-01-23 09:37:08 +01:00 committed by GitHub
commit afc3de2894
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
487 changed files with 85185 additions and 2757 deletions

View File

@ -19,37 +19,38 @@ env:
- PACKAGE='Distance_2 Distance_3 Envelope_2 '
- PACKAGE='Envelope_3 Filtered_kernel Generalized_map '
- PACKAGE='Generator Geomview GraphicsView '
- PACKAGE='HalfedgeDS Hash_map Homogeneous_kernel '
- PACKAGE='Inscribed_areas Installation Interpolation '
- PACKAGE='Intersections_2 Intersections_3 Interval_skip_list '
- PACKAGE='Interval_support Inventor Jet_fitting_3 '
- PACKAGE='Kernel_23 Kernel_d LEDA '
- PACKAGE='Linear_cell_complex MacOSX Maintenance '
- PACKAGE='Matrix_search Mesh_2 Mesh_3 '
- PACKAGE='Mesher_level Minkowski_sum_2 Minkowski_sum_3 '
- PACKAGE='Modifier Modular_arithmetic Nef_2 '
- PACKAGE='Nef_3 Nef_S2 NewKernel_d '
- PACKAGE='Number_types OpenNL Optimal_transportation_reconstruction_2 '
- PACKAGE='Optimisation_basic Partition_2 Periodic_2_triangulation_2 '
- PACKAGE='Periodic_3_mesh_3 Periodic_3_triangulation_3 Point_set_2 '
- PACKAGE='Point_set_3 Point_set_processing_3 Point_set_shape_detection_3 '
- PACKAGE='Poisson_surface_reconstruction_3 Polygon Polygon_mesh_processing '
- PACKAGE='Polyhedron Polyhedron_IO Polyline_simplification_2 '
- PACKAGE='Polynomial Polytope_distance_d Principal_component_analysis '
- PACKAGE='Principal_component_analysis_LGPL Profiling_tools Property_map '
- PACKAGE='QP_solver Random_numbers Ridges_3 '
- PACKAGE='Scale_space_reconstruction_3 Scripts SearchStructures '
- PACKAGE='Segment_Delaunay_graph_2 Segment_Delaunay_graph_Linf_2 Set_movable_separability_2 '
- PACKAGE='Skin_surface_3 Snap_rounding_2 Solver_interface '
- PACKAGE='Spatial_searching Spatial_sorting STL_Extension '
- PACKAGE='Straight_skeleton_2 Stream_lines_2 Stream_support '
- PACKAGE='Subdivision_method_3 Surface_mesh Surface_mesh_deformation '
- PACKAGE='Surface_mesher Surface_mesh_parameterization Surface_mesh_segmentation '
- PACKAGE='Surface_mesh_shortest_path Surface_mesh_simplification Surface_mesh_skeletonization '
- PACKAGE='Surface_sweep_2 TDS_2 TDS_3 '
- PACKAGE='Testsuite Three Triangulation '
- PACKAGE='Triangulation_2 Triangulation_3 Union_find '
- PACKAGE='Visibility_2 Voronoi_diagram_2 wininst '
- PACKAGE='HalfedgeDS Hash_map Heat_method_3 '
- PACKAGE='Homogeneous_kernel Inscribed_areas Installation '
- PACKAGE='Interpolation Intersections_2 Intersections_3 '
- PACKAGE='Interval_skip_list Interval_support Inventor '
- 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_transportation_reconstruction_2 Optimisation_basic Partition_2 '
- PACKAGE='Periodic_2_triangulation_2 Periodic_3_mesh_3 Periodic_3_triangulation_3 '
- PACKAGE='Point_set_2 Point_set_3 Point_set_processing_3 '
- PACKAGE='Point_set_shape_detection_3 Poisson_surface_reconstruction_3 Polygon '
- PACKAGE='Polygon_mesh_processing Polyhedron Polyhedron_IO '
- PACKAGE='Polyline_simplification_2 Polynomial Polytope_distance_d '
- PACKAGE='Principal_component_analysis Principal_component_analysis_LGPL Profiling_tools '
- PACKAGE='Property_map QP_solver Random_numbers '
- PACKAGE='Ridges_3 Scale_space_reconstruction_3 Scripts '
- PACKAGE='SearchStructures Segment_Delaunay_graph_2 Segment_Delaunay_graph_Linf_2 '
- PACKAGE='Set_movable_separability_2 Skin_surface_3 Snap_rounding_2 '
- PACKAGE='Solver_interface Spatial_searching Spatial_sorting '
- PACKAGE='STL_Extension Straight_skeleton_2 Stream_lines_2 '
- PACKAGE='Stream_support Subdivision_method_3 Surface_mesh '
- PACKAGE='Surface_mesh_approximation Surface_mesh_deformation Surface_mesher '
- PACKAGE='Surface_mesh_parameterization Surface_mesh_segmentation Surface_mesh_shortest_path '
- PACKAGE='Surface_mesh_simplification Surface_mesh_skeletonization Surface_sweep_2 '
- PACKAGE='TDS_2 TDS_3 Testsuite '
- PACKAGE='Three Triangulation Triangulation_2 '
- PACKAGE='Triangulation_3 Union_find Visibility_2 '
- PACKAGE='Voronoi_diagram_2 wininst '
compiler: clang-3.6
install:
- echo "$PWD"

View File

@ -39,6 +39,7 @@ Geomview
GraphicsView
HalfedgeDS
Hash_map
Heat_method_3
Homogeneous_kernel
Inscribed_areas
Installation
@ -111,6 +112,7 @@ Stream_lines_2
Stream_support
Subdivision_method_3
Surface_mesh
Surface_mesh_approximation
Surface_mesh_deformation
Surface_mesher
Surface_mesh_parameterization

View File

@ -1297,7 +1297,7 @@ void Scene::refine_loop()
return;
}
std::cout << "Loop subdivision...";
CGAL::Subdivision_method_3::Loop_subdivision(*m_pPolyhedron, 1);
CGAL::Subdivision_method_3::Loop_subdivision(*m_pPolyhedron);
std::cout << "done (" << m_pPolyhedron->size_of_facets() << " facets)" << std::endl;
clear_internal_data();

View File

@ -1,5 +1,5 @@
#include <iostream>
#include <boost/iterator.hpp>
#include <boost/iterator/iterator_adaptor.hpp>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/AABB_tree.h>

View File

@ -31,10 +31,18 @@
#include <boost/type_traits/is_same.hpp>
#include <boost/variant/apply_visitor.hpp>
#if BOOST_VERSION >= 105000
#include <boost/heap/priority_queue.hpp>
# if defined(BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable: 4996)
# endif
# include <boost/heap/priority_queue.hpp>
# if defined(BOOST_MSVC)
# pragma warning(pop)
# endif
#else
#include <queue>
# include <queue>
#endif
#include <CGAL/assertions.h>
namespace CGAL {

View File

@ -16,3 +16,4 @@ Property_map
STL_Extension
Spatial_searching
Stream_support
Distance_3

View File

@ -325,27 +325,27 @@ efficiency.
The following example illustrates the construction of `AlgebraicKernel_d_1::Algebraic_real_1`
using `AlgebraicKernel_d_1::Construct_algebraic_real_1`:
<SMALL>\cgalExample{Algebraic_kernel_d/Construct_algebraic_real_1.cpp}</SMALL>
\cgalExample{Algebraic_kernel_d/Construct_algebraic_real_1.cpp}
\subsection CGALAK1Solving Solving Univariate Polynomials
The following example illustrates the construction of `AlgebraicKernel_d_1::Algebraic_real_1`
using `AlgebraicKernel_d_1::Solve_1`: <SMALL>\cgalExample{Algebraic_kernel_d/Solve_1.cpp} </SMALL>
using `AlgebraicKernel_d_1::Solve_1`: \cgalExample{Algebraic_kernel_d/Solve_1.cpp}
\subsection CGALAK1EGCompare_1 Comparison and Approximation of Algebraic Real Numbers
The following example illustrates the comparison of `AlgebraicKernel_d_1::Algebraic_real_1` numbers:
<SMALL>\cgalExample{Algebraic_kernel_d/Compare_1.cpp}</SMALL>
\cgalExample{Algebraic_kernel_d/Compare_1.cpp}
\subsection CGALAK1EGIsolate_1 Isolation of Algebraic Real Numbers with respect to roots of other polynomials
The following example illustrates the isolation of `AlgebraicKernel_d_1::Algebraic_real_1` numbers:
<SMALL>\cgalExample{Algebraic_kernel_d/Isolate_1.cpp}</SMALL>
\cgalExample{Algebraic_kernel_d/Isolate_1.cpp}
\subsection CGALAK1EGSign_at_1 Interplay with Polynomials
The following example illustrates the sign evaluation of `AlgebraicKernel_d_1::Algebraic_real_1` numbers in polynomials:
<SMALL>\cgalExample{Algebraic_kernel_d/Sign_at_1.cpp}</SMALL>
\cgalExample{Algebraic_kernel_d/Sign_at_1.cpp}
\section Algebraic_kernel_dDesign Design and Implementation History

View File

@ -1524,17 +1524,11 @@ compute_intermediate_values_and_slices() const {
#if CGAL_ACK_DEBUG_FLAG
CGAL_ACK_DEBUG_PRINT << "Prepare intermediate slices.." << std::flush;
#endif
std::size_t size = event_x_coordinates().size()+1;
this->ptr()->intermediate_values=std::vector<Lazy_bound>();
this->ptr()->intermediate_slices=std::vector<Lazy_status_line_CPA_1>();
for(size_type i=0;
i<=static_cast<size_type>(event_x_coordinates().size());
i++) {
this->ptr()->intermediate_values.get().push_back(Lazy_bound());
this->ptr()->intermediate_slices.get().push_back
(Lazy_status_line_CPA_1());
}
this->ptr()->intermediate_values.get().resize(size);
this->ptr()->intermediate_slices.get().resize(size);
#if CGAL_ACK_DEBUG_FLAG
CGAL_ACK_DEBUG_PRINT << "done" << std::endl;
#endif

View File

@ -26,6 +26,7 @@
#include <CGAL/basic.h>
#include <CGAL/Algebraic_kernel_d/Real_embeddable_extension.h>
#include <CGAL/Get_arithmetic_kernel.h>
#include <CGAL/GMP_arithmetic_kernel.h>
#include <CGAL/LEDA_arithmetic_kernel.h>

View File

@ -0,0 +1,78 @@
// Copyright (c) 2017 Inria.
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 3 of the License,
// or (at your option) any later version.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0+
//
// Author: Marc Glisse <marc.glisse@inria.fr>
#ifndef CGAL_GMPXX_ARITHMETIC_KERNEL_H
#define CGAL_GMPXX_ARITHMETIC_KERNEL_H
#include <CGAL/Arithmetic_kernel/Arithmetic_kernel_base.h>
#include <CGAL/Get_arithmetic_kernel.h>
#include <CGAL/boost_mp.h>
#ifdef CGAL_USE_BOOST_MP
//Currently already included in boost_mp.h
//#include <boost/multiprecision/cpp_int.hpp>
//#ifdef CGAL_USE_GMP
//#include <boost/multiprecision/gmp.hpp>
//#endif
// FIXME: the could be several kernels based on Boost.Multiprecision.
namespace CGAL {
/** \ingroup CGAL_Arithmetic_kernel
* \brief The Boost.Multiprecision set of exact number types
*/
struct BOOST_cpp_arithmetic_kernel : internal::Arithmetic_kernel_base {
typedef boost::multiprecision::cpp_int Integer;
typedef boost::multiprecision::cpp_rational Rational;
};
#ifdef CGAL_USE_GMP
struct BOOST_gmp_arithmetic_kernel : internal::Arithmetic_kernel_base {
typedef boost::multiprecision::mpz_int Integer;
typedef boost::multiprecision::mpq_rational Rational;
};
#endif
template <class T1, class T2, class T3, class T4, class T5>
struct Get_arithmetic_kernel<boost::multiprecision::detail::expression<T1,T2,T3,T4,T5> >
: Get_arithmetic_kernel<typename boost::multiprecision::detail::expression<T1,T2,T3,T4,T5>::result_type> {};
template <>
struct Get_arithmetic_kernel<boost::multiprecision::cpp_int> {
typedef BOOST_cpp_arithmetic_kernel Arithmetic_kernel;
};
template <>
struct Get_arithmetic_kernel<boost::multiprecision::cpp_rational> {
typedef BOOST_cpp_arithmetic_kernel Arithmetic_kernel;
};
#ifdef CGAL_USE_GMP
template <>
struct Get_arithmetic_kernel<boost::multiprecision::mpz_int> {
typedef BOOST_gmp_arithmetic_kernel Arithmetic_kernel;
};
template <>
struct Get_arithmetic_kernel<boost::multiprecision::mpq_rational> {
typedef BOOST_gmp_arithmetic_kernel Arithmetic_kernel;
};
#endif
} //namespace CGAL
#endif // CGAL_USE_BOOST_MP
#endif

View File

@ -2209,10 +2209,10 @@ representing line segments.
A polyline can be constructed given one of the following inputs:
- <b>A range of \a points</b>, where two succeeding points in the
- <b>A range of <em>points</em></b>, where two succeeding points in the
range represent the endpoints of a segment of the polyline.
- <b>A range of \a segments</b>. Note that , if the types
- <b>A range of <em>segments</em></b>. Note that , if the types
`SubcurveTraits_2::Curve_2` and `SubcurveTraits_2::X_monotone_curve_2` are
not the same, then when `Make_x_monotone_2` is invoked the segments
that compose the polyline will be broken into \f$x\f$-monotone
@ -2681,7 +2681,7 @@ manner whenever possible. Thus, it resorts to exact computations only when
the approximate computation fails to produce an unambiguous result.
Note that most arrangement vertices are therefore associated with approximated
points. You cannot access the coordinates of such points and obtain them as
algebraic numbers, and only access to the approximate coordinates in possible.
algebraic numbers, and only access to the approximate coordinates is possible.
See the Reference Manual for the exact interface of the `Point_2`,
`Curve_2` and `X_monotone_curve_2` defined by the traits class.

View File

@ -167,7 +167,7 @@ virtual void before_detach ();
issued immediately after the observer has been detached from its
arrangement instance.
*/
virtual void after_attach ();
virtual void after_detach ();
/// @}

View File

@ -242,6 +242,11 @@ private:
/*! Set the marked-face index */
void set_marked_facet_index(size_type id) {m_marked_facet_index = id;}
/*! Add vertices to the current facet. */
template <typename Iterator, typename Builder>
void add_vertices_to_facet(Iterator begin, Iterator end, Builder& B)
{ for (Iterator it = begin; it != end; ++it) B.add_vertex_to_facet(*it); }
/*! builds the polyhedron */
void operator()(HDS& hds)
{
@ -262,11 +267,11 @@ private:
for (CoordIndexIter it = m_indices_begin; it != m_indices_end; ++it) {
Polyhedron_facet_handle fh = B.begin_facet();
if (counter == m_marked_facet_index) fh->set_marked(true);
//! \todo EF: when upgrading to C++11 change the type of the following
// iterator to auto. Better yet, use for (auto blah : foo).
for (std::vector<size_t>::const_iterator iit = it->begin();
iit != it->end(); ++iit)
B.add_vertex_to_facet(*iit);
//! \todo EF: when upgrading to C++11 enable the following code and
// remove add_vertices_to_facet().
// for (const auto& facet : *it) B.add_vertex_to_facet(facet);
// B.end_facet();
add_vertices_to_facet(it->begin(), it->end(), B);
B.end_facet();
++counter;
}

View File

@ -197,7 +197,7 @@ function(run_test_alt name datafile)
set(command ${name} ${datafile} ${ARGN})
string(MAKE_C_IDENTIFIER "${name} ${ARGV4} ${ARGV5}" test_name)
add_test(NAME ${test_name} COMMAND ${command}
WORKING_DIRECTORY ${CGAL_CURRENT_SOURCE_DIR})
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
set_property(TEST "${test_name}"
APPEND PROPERTY DEPENDS "compilation_of__${name}")
if(POLICY CMP0066) # CMake 3.7 or later

View File

@ -708,6 +708,7 @@ user might encounter.
## I/O Functions ##
- \link PkgBGLIOFct CGAL::read_off() \endlink
- \link PkgBGLIOFct CGAL::write_off() \endlink
- \link PkgBGLIOFct CGAL::write_wrl() \endlink
*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -25,10 +25,10 @@ int main()
Point_3(1,-1,-1),
Point_3(1,1,-1),
Point_3(-1,1,-1),
Point_3(-1,1,1),
Point_3(-1,-1,1),
Point_3(1,-1,1),
Point_3(1,1,1),
Point_3(-1,1,1),
sm
);
@ -45,10 +45,10 @@ int main()
Point_3(0.5,-0.5,-0.5),
Point_3(0.5,0.5,-0.5),
Point_3(-0.5,0.5,-0.5),
Point_3(-0.5,0.5,0.5),
Point_3(-0.5,-0.5,0.5),
Point_3(0.5,-0.5,0.5),
Point_3(0.5,0.5,0.5),
Point_3(-0.5,0.5,0.5),
poly
);
pvertex_descriptor pvd = * vertices(pmesh).first;

View File

@ -585,8 +585,16 @@ add_face(const VertexRange& vr, Graph& g)
std::vector<vertex_descriptor> vertices(vr.begin(), vr.end()); // quick and dirty copy
unsigned int n = (unsigned int)vertices.size();
//check that every vertex is unique
std::sort(vertices.begin(), vertices.end());
if(std::adjacent_find(vertices.begin(), vertices.end()) != vertices.end()){
return boost::graph_traits<Graph>::null_face();
}
std::copy(vr.begin(), vr.end(), vertices.begin());
// don't allow degenerated faces
CGAL_assertion(n > 2);
if(n <= 2){
return boost::graph_traits<Graph>::null_face();
}
std::vector<halfedge_descriptor> halfedges(n);
std::vector<bool> is_new(n);
@ -1321,38 +1329,37 @@ flip_edge(typename boost::graph_traits<Graph>::halfedge_descriptor h,
/**
* \returns `true` if `e` satisfies the *link condition* \cgalCite{degn-tpec-98}, which guarantees that the surface is also 2-manifold after the edge collapse.
*/
template<typename Graph>
template<typename Graph>
bool
does_satisfy_link_condition(typename boost::graph_traits<Graph>::edge_descriptor e,
Graph& g)
does_satisfy_link_condition(typename boost::graph_traits<Graph>::edge_descriptor e,
Graph& g)
{
typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
typedef CGAL::Halfedge_around_source_iterator<Graph> out_edge_iterator;
typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
typedef CGAL::Halfedge_around_source_iterator<Graph> out_edge_iterator;
halfedge_descriptor v0_v1 = halfedge(e,g);
halfedge_descriptor v1_v0 = opposite(v0_v1,g);
vertex_descriptor v0 = target(v1_v0,g), v1 = target(v0_v1,g);
halfedge_descriptor v0_v1 = halfedge(e,g);
halfedge_descriptor v1_v0 = opposite(v0_v1,g);
vertex_descriptor vL = target(next(v0_v1,g),g);
vertex_descriptor vR = target(next(v1_v0,g),g);
vertex_descriptor v0 = target(v1_v0,g), v1 = target(v0_v1,g);
out_edge_iterator eb1, ee1 ;
out_edge_iterator eb2, ee2 ;
vertex_descriptor vL = target(next(v0_v1,g),g);
vertex_descriptor vR = target(next(v1_v0,g),g);
out_edge_iterator eb1, ee1 ;
out_edge_iterator eb2, ee2 ;
// The following loop checks the link condition for v0_v1.
// Specifically, that for every vertex 'k' adjacent to both 'p and 'q', 'pkq' is a face of the mesh.
//
//
for ( boost::tie(eb1,ee1) = halfedges_around_source(v0,g) ; eb1 != ee1 ; ++ eb1 )
{
halfedge_descriptor v0_k = *eb1;
if ( v0_k != v0_v1 )
{
vertex_descriptor k = target(v0_k,g);
for ( boost::tie(eb2,ee2) = halfedges_around_source(k,g) ; eb2 != ee2 ; ++ eb2 )
{
halfedge_descriptor k_v1 = *eb2;
@ -1369,66 +1376,53 @@ bool
// If k is either t or b then p-q-k *might* be a face of the mesh. It won't be if k==t but p->q is border
// or k==b but q->b is a border (because in that case even though there exists triangles p->q->t (or q->p->b)
// they are holes, not faces)
//
//
bool lIsFace = ( vL == k && (! is_border(v0_v1,g)) )
|| ( vR == k && (! is_border(v1_v0,g)) ) ;
if ( !lIsFace )
{
// CGAL_ECMS_TRACE(3," k=V" << get(Vertex_index_map,k) << " IS NOT in a face with p-q. NON-COLLAPSABLE edge." ) ;
return false ;
}
else
}
else
{
//CGAL_ECMS_TRACE(4," k=V" << get(Vertex_index_map,k) << " is in a face with p-q") ;
}
}
}
}
}
if ( is_border(v0_v1,g) )
{
if ( next(next(next(v0_v1,g),g),g) == v0_v1 )
{
//CGAL_ECMS_TRACE(3," p-q belongs to an open triangle. NON-COLLAPSABLE edge." ) ;
return false ;
}
}
else if ( is_border(v1_v0,g) )
}
// detect isolated triangle (or triangle attached to a mesh with non-manifold vertices)
if (!is_border(v0_v1,g) && is_border(opposite(next(v0_v1,g), g), g)
&& is_border(opposite(prev(v0_v1,g), g), g) ) return false;
if (!is_border(v1_v0,g) && is_border(opposite(next(v1_v0,g), g), g)
&& is_border(opposite(prev(v1_v0,g), g), g) ) return false;
if ( !is_border(v0_v1,g) && !is_border(v1_v0,g) )
{
if ( is_border(v0,g) && is_border(v1,g) )
{
if ( next(next(next(v1_v0,g),g),g) == v1_v0 )
{
//CGAL_ECMS_TRACE(3," p-q belongs to an open triangle. NON-COLLAPSABLE edge." ) ;
return false ;
}
//CGAL_ECMS_TRACE(3," both p and q are boundary vertices but p-q is not. NON-COLLAPSABLE edge." ) ;
return false ;
}
else
{
if ( is_border(v0,g) && is_border(v1,g) )
if ( is_tetrahedron(v0_v1,g) )
{
//CGAL_ECMS_TRACE(3," both p and q are boundary vertices but p-q is not. NON-COLLAPSABLE edge." ) ;
//CGAL_ECMS_TRACE(3," p-q belongs to a tetrahedron. NON-COLLAPSABLE edge." ) ;
return false ;
}
else
}
if ( next(v0_v1, g) == opposite(prev(v1_v0, g), g) &&
prev(v0_v1, g) == opposite(next(v1_v0, g), g) )
{
if ( is_tetrahedron(v0_v1,g) )
{
//CGAL_ECMS_TRACE(3," p-q belongs to a tetrahedron. NON-COLLAPSABLE edge." ) ;
return false ;
}
if ( next(v0_v1, g) == opposite(prev(v1_v0, g), g) &&
prev(v0_v1, g) == opposite(next(v1_v0, g), g) )
{
//CGAL_ECMS_TRACE(3," degenerate volume." ) ;
return false ;
}
//CGAL_ECMS_TRACE(3," degenerate volume." ) ;
return false ;
}
}
}
return true ;
}

View File

@ -36,12 +36,15 @@
#include <boost/graph/graph_traits.hpp>
#include <boost/tuple/tuple.hpp>
#include <cstdlib>
namespace CGAL {
namespace METIS {
template<typename TriangleMesh, typename METIS_options, typename NamedParameters>
void partition_dual_graph(const TriangleMesh& tm, int nparts,
void partition_dual_graph(const TriangleMesh& tm,
int nparts,
METIS_options options, // options array
const NamedParameters& np)
{
@ -93,11 +96,11 @@ void partition_dual_graph(const TriangleMesh& tm, int nparts,
idx_t objval;
// partition info for the nodes
idx_t* npart = (idx_t*) calloc(nn, sizeof(idx_t));
idx_t* npart = (idx_t*) calloc(num_vertices(tm), sizeof(idx_t));
CGAL_assertion(npart != NULL);
// partition info for the elements
idx_t* epart = (idx_t*) calloc(ne, sizeof(idx_t));
idx_t* epart = (idx_t*) calloc(num_faces(tm), sizeof(idx_t));
CGAL_assertion(epart != NULL);
// do not support Fortran-style arrays
@ -118,6 +121,12 @@ void partition_dual_graph(const TriangleMesh& tm, int nparts,
Output_face_partition_ids fo;
vo(tm, indices, npart, get_param(np, internal_np::vertex_partition_id));
fo(tm, epart, get_param(np, internal_np::face_partition_id));
delete[] eptr;
delete[] eind;
std::free(npart);
std::free(epart);
}
template<typename TriangleMesh, typename NamedParameters>

View File

@ -34,6 +34,8 @@
#include <boost/graph/graph_traits.hpp>
#include <boost/tuple/tuple.hpp>
#include <cstdlib>
namespace CGAL {
namespace METIS {
@ -76,7 +78,8 @@ struct Output_face_partition_ids
};
template<typename TriangleMesh, typename METIS_options, typename NamedParameters>
void partition_graph(const TriangleMesh& tm, int nparts,
void partition_graph(const TriangleMesh& tm,
int nparts,
METIS_options options, // pointer to the options array
const NamedParameters& np)
{
@ -125,11 +128,11 @@ void partition_graph(const TriangleMesh& tm, int nparts,
idx_t objval;
// partition info for the nodes
idx_t* npart = (idx_t*) calloc(nn, sizeof(idx_t));
idx_t* npart = (idx_t*) calloc(num_vertices(tm), sizeof(idx_t));
CGAL_assertion(npart != NULL);
// partition info for the elements
idx_t* epart = (idx_t*) calloc(ne, sizeof(idx_t));
idx_t* epart = (idx_t*) calloc(num_faces(tm), sizeof(idx_t));
CGAL_assertion(epart != NULL);
// do not support Fortran-style arrays
@ -150,6 +153,12 @@ void partition_graph(const TriangleMesh& tm, int nparts,
Output_face_partition_ids fo;
vo(tm, indices, npart, get_param(np, internal_np::vertex_partition_id));
fo(tm, epart, get_param(np, internal_np::face_partition_id));
delete[] eptr;
delete[] eind;
std::free(npart);
std::free(epart);
}
template<typename TriangleMesh, typename NamedParameters>

View File

@ -837,6 +837,8 @@ make_quad(const P& p0, const P& p1, const P& p2, const P& p3, Graph& g)
* \ingroup PkgBGLHelperFct
* \brief Creates an isolated hexahedron
* with its vertices initialized to `p0`, `p1`, ...\ , and `p7`, and adds it to the graph `g`.
* \image html hexahedron.png
* \image latex hexahedron.png
* \returns the halfedge that has the target vertex associated with `p0`, in the face with the vertices with the points `p0`, `p1`, `p2`, and `p3`.
**/
template<typename Graph, typename P>
@ -868,16 +870,16 @@ make_hexahedron(const P& p0, const P& p1, const P& p2, const P& p3,
ppmap[v6] = p6;
ppmap[v7] = p7;
halfedge_descriptor ht = internal::make_quad(v7, v4, v5, v6, g);
halfedge_descriptor hb = prev(internal::make_quad(v1, v0, v3, v2, g),g);
halfedge_descriptor ht = internal::make_quad(v4, v5, v6, v7, g);
halfedge_descriptor hb = prev(internal::make_quad(v0, v3, v2, v1, g),g);
for(int i=0; i <4; i++){
halfedge_descriptor h = halfedge(add_edge(g),g);
set_target(h,target(hb,g),g);
set_next(h,opposite(hb,g),g);
set_next(opposite(next(ht,g),g),h,g);
set_next(opposite(prev(ht,g),g),h,g);
h = opposite(h,g);
set_target(h,target(ht,g),g);
set_next(h,opposite(ht,g),g);
set_target(h,source(prev(ht,g),g),g);
set_next(h,opposite(next(next(ht,g),g),g),g);
set_next(opposite(next(hb,g),g),h,g);
hb = next(hb,g);
ht = prev(ht,g);
@ -892,6 +894,8 @@ make_hexahedron(const P& p0, const P& p1, const P& p2, const P& p3,
* \ingroup PkgBGLHelperFct
* \brief Creates an isolated tetrahedron
* with its vertices initialized to `p0`, `p1`, `p2`, and `p3`, and adds it to the graph `g`.
* \image html tetrahedron.png
* \image latex tetrahedron.png
* \returns the halfedge that has the target vertex associated with `p0`, in the face with the vertices with the points `p0`, `p1`, and `p2`.
**/
template<typename Graph, typename P>

View File

@ -36,6 +36,89 @@
#include <CGAL/boost/graph/named_function_params.h>
namespace CGAL {
/*!
\ingroup PkgBGLIOFct
writes the graph `g` in the wrl format (VRML 2.0).
\cgalNamedParamsBegin
* \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `g`.
* If this parameter is omitted, an internal property map for
* `CGAL::vertex_point_t` should be available in `FaceGraph`\cgalParamEnd
* \cgalNamedParamsEnd
*/
template <typename FaceGraph, typename NamedParameters>
bool write_wrl(std::ostream& os,
const FaceGraph& g,
const NamedParameters& np)
{
typedef typename boost::graph_traits<FaceGraph>::vertex_descriptor vertex_descriptor;
typedef typename boost::graph_traits<FaceGraph>::face_descriptor face_descriptor;
typedef typename boost::graph_traits<FaceGraph>::vertices_size_type vertices_size_type;
typename Polygon_mesh_processing::GetVertexPointMap<FaceGraph, NamedParameters>::const_type
vpm = choose_param(get_param(np, internal_np::vertex_point),
get_const_property_map(CGAL::vertex_point, g));
boost::container::flat_map<vertex_descriptor,vertices_size_type> reindex;
int n = 0;
os << "#VRML V2.0 utf8\n"
"Group {\n"
"children [\n"
"Shape {\n"
"appearance DEF A1 Appearance {\n"
"material Material {\n"
"diffuseColor .6 .5 .9\n"
"}\n"
"}\n"
"appearance\n"
"Appearance {\n"
"material DEF Material Material {}\n"
"}\n"
"}\n"
"Group {\n"
"children [\n"
"Shape {\n"
"appearance Appearance { material USE Material }\n"
"geometry IndexedFaceSet {\n"
"convex FALSE\n"
"solid FALSE\n"
"coord Coordinate {\n"
"point [\n";
BOOST_FOREACH(vertex_descriptor v, vertices(g)){
os << get(vpm,v) << ",\n";
reindex[v]=n++;
}
os << "] #point\n"
"} #coord Coordinate\n"
"coordIndex [\n";
BOOST_FOREACH(face_descriptor f, faces(g)){
BOOST_FOREACH(vertex_descriptor v, vertices_around_face(halfedge(f,g),g)){
os << reindex[v] << ",";
}
os << "-1,\n";
}
os << "] #coordIndex\n"
"} #geometry\n"
"} #Shape\n"
"] #children\n"
"} #group\n"
"]\n"
"}\n";
return os.good();
}
template <typename FaceGraph>
bool write_wrl(std::ostream& os,
const FaceGraph& g)
{
return write_wrl(os, g,
parameters::all_default());
}
/*!
\ingroup PkgBGLIOFct
writes the graph `g` in the OFF format.

View File

@ -405,6 +405,29 @@ namespace CGAL {
> ::type type;
};
template<typename PointRange, typename NamedParameters>
class GetIsConstrainedMap
{
struct DummyConstrainedMap
{
typedef typename std::iterator_traits<typename PointRange::iterator>::value_type key_type;
typedef bool value_type;
typedef value_type reference;
typedef boost::readable_property_map_tag category;
typedef DummyConstrainedMap Self;
friend reference get(const Self&, const key_type&) { return false; }
};
public:
typedef DummyConstrainedMap NoMap;
typedef typename boost::lookup_named_param_def <
internal_np::point_is_constrained_t,
NamedParameters,
DummyConstrainedMap //default
> ::type type;
};
} // namespace Point_set_processing_3
template<typename NamedParameters, typename DefaultSolver>

View File

@ -117,3 +117,25 @@ CGAL_add_named_parameter(plane_t, plane_map, plane_map)
CGAL_add_named_parameter(plane_index_t, plane_index_map, plane_index_map)
CGAL_add_named_parameter(select_percentage_t, select_percentage, select_percentage)
CGAL_add_named_parameter(require_uniform_sampling_t, require_uniform_sampling, require_uniform_sampling)
CGAL_add_named_parameter(point_is_constrained_t, point_is_constrained, point_is_constrained_map)
// List of named parameters used in Surface_mesh_approximation package
CGAL_add_named_parameter(verbose_level_t, verbose_level, verbose_level)
CGAL_add_named_parameter(seeding_method_t, seeding_method, seeding_method)
CGAL_add_named_parameter(max_number_of_proxies_t, max_number_of_proxies, max_number_of_proxies)
CGAL_add_named_parameter(min_error_drop_t, min_error_drop, min_error_drop)
CGAL_add_named_parameter(number_of_relaxations_t, number_of_relaxations, number_of_relaxations)
// meshing parameters
CGAL_add_named_parameter(subdivision_ratio_t, subdivision_ratio, subdivision_ratio)
CGAL_add_named_parameter(relative_to_chord_t, relative_to_chord, relative_to_chord)
CGAL_add_named_parameter(with_dihedral_angle_t, with_dihedral_angle, with_dihedral_angle)
CGAL_add_named_parameter(optimize_anchor_location_t, optimize_anchor_location, optimize_anchor_location)
CGAL_add_named_parameter(pca_plane_t, pca_plane, pca_plane)
// output parameters
CGAL_add_named_parameter(face_proxy_map_t, face_proxy_map, face_proxy_map)
CGAL_add_named_parameter(proxies_t, proxies, proxies)
CGAL_add_named_parameter(anchors_t, anchors, anchors)
CGAL_add_named_parameter(triangles_t, triangles, triangles)

View File

@ -441,17 +441,17 @@ put(boost::vertex_point_t p, OPEN_MESH_CLASS& g,
} // namespace OpenMesh
// dynamic properties
namespace boost {
template <typename K, typename V>
struct property_map<OPEN_MESH_CLASS, CGAL::dynamic_vertex_property_t<V> >
struct property_map<OPEN_MESH_CLASS, CGAL::dynamic_vertex_property_t<V> >
{
typedef OPEN_MESH_CLASS SM;
typedef typename boost::graph_traits<SM>::vertex_descriptor vertex_descriptor;
typedef CGAL::OM_pmap<SM,vertex_descriptor, V> SMPM;
typedef CGAL::internal::Dynamic<SM, SMPM> type;
typedef type const_type;
typedef CGAL::internal::Dynamic_with_index<vertex_descriptor, V> const_type;
};
template <typename K, typename V>
@ -461,7 +461,7 @@ struct property_map<OPEN_MESH_CLASS, CGAL::dynamic_halfedge_property_t<V> >
typedef typename boost::graph_traits<SM>::halfedge_descriptor halfedge_descriptor;
typedef CGAL::OM_pmap<SM,halfedge_descriptor, V> SMPM;
typedef CGAL::internal::Dynamic<SM, SMPM> type;
typedef type const_type;
typedef CGAL::internal::Dynamic_with_index<halfedge_descriptor, V> const_type;
};
template <typename K, typename V>
@ -471,7 +471,7 @@ struct property_map<OPEN_MESH_CLASS, CGAL::dynamic_edge_property_t<V> >
typedef typename boost::graph_traits<SM>::edge_descriptor edge_descriptor;
typedef CGAL::OM_pmap<SM,edge_descriptor, V> SMPM;
typedef CGAL::internal::Dynamic<SM, SMPM> type;
typedef type const_type;
typedef CGAL::internal::Dynamic_with_index<edge_descriptor, V> const_type;
};
template <typename K, typename V>
@ -481,7 +481,7 @@ struct property_map<OPEN_MESH_CLASS, CGAL::dynamic_face_property_t<V> >
typedef typename boost::graph_traits<SM>::face_descriptor face_descriptor;
typedef CGAL::OM_pmap<SM,face_descriptor, V> SMPM;
typedef CGAL::internal::Dynamic<SM, SMPM> type;
typedef type const_type;
typedef CGAL::internal::Dynamic_with_index<face_descriptor, V> const_type;
};
} // namespace boost
@ -489,46 +489,84 @@ struct property_map<OPEN_MESH_CLASS, CGAL::dynamic_face_property_t<V> >
namespace OpenMesh {
// get function for dynamic properties of mutable graph
template <typename K, typename V>
typename boost::property_map<OPEN_MESH_CLASS, CGAL::dynamic_vertex_property_t<V> >::const_type
typename boost::property_map<OPEN_MESH_CLASS, CGAL::dynamic_vertex_property_t<V> >::type
get(CGAL::dynamic_vertex_property_t<V>, OPEN_MESH_CLASS& om)
{
typedef OPEN_MESH_CLASS OM;
typedef typename boost::property_map<OM, CGAL::dynamic_vertex_property_t<V> >::SMPM SMPM;
typedef typename boost::property_map<OM, CGAL::dynamic_vertex_property_t<V> >::const_type DPM;
typedef typename boost::property_map<OM, CGAL::dynamic_vertex_property_t<V> >::type DPM;
return DPM(om, new SMPM(om));
}
template <typename K, typename V>
typename boost::property_map<OPEN_MESH_CLASS, CGAL::dynamic_halfedge_property_t<V> >::const_type
typename boost::property_map<OPEN_MESH_CLASS, CGAL::dynamic_halfedge_property_t<V> >::type
get(CGAL::dynamic_halfedge_property_t<V>, OPEN_MESH_CLASS& om)
{
typedef OPEN_MESH_CLASS OM;
typedef typename boost::property_map<OM, CGAL::dynamic_halfedge_property_t<V> >::SMPM SMPM;
typedef typename boost::property_map<OM, CGAL::dynamic_halfedge_property_t<V> >::const_type DPM;
typedef typename boost::property_map<OM, CGAL::dynamic_halfedge_property_t<V> >::type DPM;
return DPM(om, new SMPM(om));
}
template <typename K, typename V>
typename boost::property_map<OPEN_MESH_CLASS, CGAL::dynamic_edge_property_t<V> >::const_type
typename boost::property_map<OPEN_MESH_CLASS, CGAL::dynamic_edge_property_t<V> >::type
get(CGAL::dynamic_edge_property_t<V>, OPEN_MESH_CLASS& om)
{
typedef OPEN_MESH_CLASS OM;
typedef typename boost::property_map<OM, CGAL::dynamic_edge_property_t<V> >::SMPM SMPM;
typedef typename boost::property_map<OM, CGAL::dynamic_edge_property_t<V> >::const_type DPM;
typedef typename boost::property_map<OM, CGAL::dynamic_edge_property_t<V> >::type DPM;
return DPM(om, new SMPM(om));
}
template <typename K, typename V>
typename boost::property_map<OPEN_MESH_CLASS, CGAL::dynamic_face_property_t<V> >::const_type
typename boost::property_map<OPEN_MESH_CLASS, CGAL::dynamic_face_property_t<V> >::type
get(CGAL::dynamic_face_property_t<V>, OPEN_MESH_CLASS& om)
{
typedef OPEN_MESH_CLASS OM;
typedef typename boost::property_map<OM, CGAL::dynamic_face_property_t<V> >::SMPM SMPM;
typedef typename boost::property_map<OM, CGAL::dynamic_face_property_t<V> >::const_type DPM;
typedef typename boost::property_map<OM, CGAL::dynamic_face_property_t<V> >::type DPM;
return DPM(om, new SMPM(om));
}
// get function for dynamic properties of const graph
template <typename K, typename V>
typename boost::property_map<OPEN_MESH_CLASS, CGAL::dynamic_vertex_property_t<V> >::const_type
get(CGAL::dynamic_vertex_property_t<V>, const OPEN_MESH_CLASS& om)
{
typedef OPEN_MESH_CLASS OM;
typedef typename boost::property_map<OM, CGAL::dynamic_vertex_property_t<V> >::const_type DPM;
return DPM(num_vertices(om));
}
template <typename K, typename V>
typename boost::property_map<OPEN_MESH_CLASS, CGAL::dynamic_halfedge_property_t<V> >::const_type
get(CGAL::dynamic_halfedge_property_t<V>, const OPEN_MESH_CLASS& om)
{
typedef OPEN_MESH_CLASS OM;
typedef typename boost::property_map<OM, CGAL::dynamic_halfedge_property_t<V> >::const_type DPM;
return DPM(num_halfedges(om));
}
template <typename K, typename V>
typename boost::property_map<OPEN_MESH_CLASS, CGAL::dynamic_edge_property_t<V> >::const_type
get(CGAL::dynamic_edge_property_t<V>, const OPEN_MESH_CLASS& om)
{
typedef OPEN_MESH_CLASS OM;
typedef typename boost::property_map<OM, CGAL::dynamic_edge_property_t<V> >::const_type DPM;
return DPM(num_edges(om));
}
template <typename K, typename V>
typename boost::property_map<OPEN_MESH_CLASS, CGAL::dynamic_face_property_t<V> >::const_type
get(CGAL::dynamic_face_property_t<V>, const OPEN_MESH_CLASS& om)
{
typedef OPEN_MESH_CLASS OM;
typedef typename boost::property_map<OM, CGAL::dynamic_face_property_t<V> >::const_type DPM;
return DPM(num_faces(om));
}
// implementation detail: required by Dynamic_property_map_deleter
template <typename Pmap, typename K>
void remove_property(Pmap pm, OPEN_MESH_CLASS& om)

View File

@ -97,6 +97,8 @@ create_single_source_cgal_program( "test_graph_traits.cpp" )
create_single_source_cgal_program( "test_Properties.cpp" )
create_single_source_cgal_program( "test_wrl.cpp" )
if(OpenMesh_FOUND)
target_link_libraries( test_clear PRIVATE ${OPENMESH_LIBRARIES})
target_link_libraries( test_Euler_operations PRIVATE ${OPENMESH_LIBRARIES})

View File

@ -132,7 +132,7 @@ int main()
assert(CGAL::is_triangle_mesh(m));
assert(CGAL::is_valid_polygon_mesh(m));
m.clear();
hd = CGAL::make_hexahedron(a,b,c,d,aa,bb,cc,dd,m);
hd = CGAL::make_hexahedron(a,b,c,d,dd,aa,bb,cc,m);
assert(CGAL::is_hexahedron(hd,m));
assert(CGAL::is_quad_mesh(m));
assert(CGAL::is_valid_polygon_mesh(m));

18
BGL/test/BGL/test_wrl.cpp Normal file
View File

@ -0,0 +1,18 @@
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/boost/graph/helpers.h>
#include <CGAL/boost/graph/io.h>
#include <iostream>
typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_3 Point;
typedef CGAL::Surface_mesh<Point> Mesh;
int main()
{
Mesh sm;
CGAL::make_tetrahedron(Point(0,0,0), Point(1,0,0), Point(1,1,0), Point(0,0,1), sm);
CGAL::write_wrl(std::cout, sm);
return 0;
}

View File

@ -74,7 +74,7 @@ polygon vertices is referred to as the polygon <B>(outer) boundary</B>.
<LI>A polygon whose curves are pairwise disjoint in their interior, and whose vertices' degree equals two is defined as a <B>Simple polygon</B>. Such a polygon has a well-defined interior and exterior and is topologically equivalent to a disk. Note that while traversing the edges of the relatively simple polygon illustrated above (B), no curve is crossed over.
<LI>A <B>Relatively simple</B> polygon allows vertices with a degree\f$\gt 2\f$, but all of its edges are disjoint in their interior. Furthermore, it must be an orientable polygon. Namely when it is inserted into an arrangement and its outer boundary is traversed, the same face is adjacent to all of the halfedges (no crossing over any curve during the traversal).
<LI>A <B>Relatively simple</B> polygon allows vertices with a degree\f$> 2\f$, but all of its edges are disjoint in their interior. Furthermore, it must be an orientable polygon. Namely when it is inserted into an arrangement and its outer boundary is traversed, the same face is adjacent to all of the halfedges (no crossing over any curve during the traversal).
Note that while polygon C has the same curves as polygon B, traversal of the curves leads to crossing over a previously traversed curve, and is therefore neither simple nor relatively simple.
<LI>A polygon in our context must be relatively simple and its outer boundary vertices must be ordered in a counterclockwise direction around the interior of the polygon.

View File

@ -13,28 +13,28 @@ x\in\E^d \mid x^T E x + x^T e + \eta\leq 0 \}\f$, where \f$ E\f$ is some
positive definite matrix from the set \f$ \mathbb{R}^{d\times d}\f$, \f$ e\f$ is some
real \f$ d\f$-vector, and \f$ \eta\in\mathbb{R}\f$. A pointset \f$ P\subseteq \E^d\f$ is
called <I>full-dimensional</I> if its affine hull has dimension \f$ d\f$.
For a finite, full-dimensional pointset \f$ P\f$ we denote by \f$ \mel(P)\f$ the
For a finite, full-dimensional pointset \f$ P\f$ we denote by \f$ (P)\f$ the
smallest ellipsoid that contains all points of \f$ P\f$; this ellipsoid
exists and is unique.
For a given finite and full-dimensional pointset \f$ P\subset \E^d\f$ and a
real number \f$ \epsilon\ge 0\f$, we say that an ellipsoid \f$ {\cal
E}\subset\E^d\f$ is an <I>\f$ (1+\epsilon)\f$-appoximation</I> to \f$ \mel(P)\f$ if
\f$ P\subset {\cal E}\f$ and \f$ \vol({\cal E}) \leq (1+\epsilon)
\vol(\mel(P))\f$. In other words, an \f$ (1+\epsilon)\f$-approximation to
\f$ \mel(P)\f$ is an enclosing ellipsoid whose volume is by at most a
E}\subset\E^d\f$ is an <I>\f$ (1+\epsilon)\f$-appoximation</I> to \f$ (P)\f$ if
\f$ P\subset {\cal E}\f$ and \f$ ({\cal E}) \leq (1+\epsilon)
((P))\f$. In other words, an \f$ (1+\epsilon)\f$-approximation to
\f$ (P)\f$ is an enclosing ellipsoid whose volume is by at most a
factor of \f$ 1+\epsilon\f$ larger than the volume of the smallest
enclosing ellipsoid of \f$ P\f$.
Given this notation, an object of class `Approximate_min_ellipsoid_d` represents an
\f$ (1+\epsilon)\f$-approximation to \f$ \mel(P)\f$ for a given finite and
\f$ (1+\epsilon)\f$-approximation to \f$ (P)\f$ for a given finite and
full-dimensional multiset of points \f$ P\subset\E^d\f$ and a real constant
\f$ \epsilon>0\f$.\cgalFootnote{A <I>multiset</I> is a set where elements may have multiplicity greater than \f$ 1\f$.} When an
`Approximate_min_ellipsoid_d<Traits>` object is constructed, an
iterator over the points \f$ P\f$ and the number \f$ \epsilon\f$ have to be
specified; the number \f$ \epsilon\f$ defines the <I>desired
approximation ratio</I> \f$ 1+\epsilon\f$. The underlying algorithm will then
try to compute an \f$ (1+\epsilon)\f$-approximation to \f$ \mel(P)\f$, and one of
try to compute an \f$ (1+\epsilon)\f$-approximation to \f$ (P)\f$, and one of
the following two cases takes place.
<UL>
<LI>The algorithm determines that \f$ P\f$ is not full-dimensional (see
@ -44,7 +44,7 @@ the following two cases takes place.
in all cases decide correctly whether \f$ P\f$ is full-dimensional or
not. If `is_full_dimensional()` returns `false`, the points
lie in such a "thin" subspace of \f$ \E^d\f$ that the algorithm is
incapable of computing an approximation to \f$ \mel(P)\f$. More
incapable of computing an approximation to \f$ (P)\f$. More
precisely, if `is_full_dimensional()` returns `false`, there
exist two parallel hyperplanes in \f$ \E^d\f$ with the points \f$ P\f$ in
between so that the distance \f$ \delta\f$ between the hyperplanes is
@ -55,7 +55,7 @@ If \f$ P\f$ is not full-dimensional, linear algebra techniques should be
used to determine an affine subspace \f$ S\f$ of \f$ \E^d\f$ that contains the
points \f$ P\f$ as a (w.r.t.\ \f$ S\f$) full-dimensional pointset; once \f$ S\f$ is
determined, the algorithm can be invoked again to compute an
approximation to (the lower-dimensional) \f$ \mel(P)\f$ in \f$ S\f$. Since
approximation to (the lower-dimensional) \f$ (P)\f$ in \f$ S\f$. Since
`is_full_dimensional()` might (due to rounding errors, see
above) return `false` even though \f$ P\f$ is full-dimensional, the
lower-dimensional subspace \f$ S\f$ containing \f$ P\f$ need not exist.
@ -66,7 +66,7 @@ ellipsoid of the projected points within \f$ H\f$; the fitting can be
done for instance using the `linear_least_squares_fitting()`
function from the \cgal package `Principal_component_analysis`.
<LI>The algorithm determines that \f$ P\f$ is full-dimensional. In this
case, it provides an approximation \f$ {\cal E}\f$ to \f$ \mel(P)\f$, but
case, it provides an approximation \f$ {\cal E}\f$ to \f$ (P)\f$, but
depending on the input problem (i.e., on the pair \f$ (P,\epsilon)\f$),
it may not have achieved the desired approximation ratio but merely
some <I>worse</I> approximation ratio \f$ 1+\epsilon'>1+\epsilon\f$. The
@ -126,7 +126,7 @@ Cholesky-decomposition. The algorithm's running time is
To illustrate the usage of `Approximate_min_ellipsoid_d` we give two examples in 2D. The
first program generates a random set \f$ P\subset\E^2\f$ and outputs the
points and a \f$ 1.01\f$-approximation of \f$ \mel(P)\f$ as an EPS-file, which
points and a \f$ 1.01\f$-approximation of \f$ (P)\f$ as an EPS-file, which
you can view using <TT>gv</TT>, for instance. (In both examples you can
change the variables `n` and `d` to experiment with the code.)
@ -204,7 +204,7 @@ typedef unspecified_type Axis_direction_iterator;
/*!
initializes `ame` to an \f$ (1+\epsilon)\f$-approximation of
\f$ \mel(P)\f$ with \f$ P\f$ being the set of points in the range
\f$ (P)\f$ with \f$ P\f$ being the set of points in the range
[`first`,`last`). The number \f$ \epsilon\f$ in this will
be at most `eps`, if possible. However, due to the
limited precision in the algorithm's underlying arithmetic, it
@ -260,7 +260,7 @@ unsigned int number_of_points( ) const;
returns a number
\f$ \epsilon'\f$ such that the computed approximation is (under exact
arithmetic) guaranteed to be an \f$ (1+\epsilon')\f$-approximation to
\f$ \mel(P)\f$.
\f$ (P)\f$.
\pre `ame.is_full_dimensional() == true`.
\post \f$ \epsilon'>0\f$.
*/
@ -404,7 +404,7 @@ bool is_full_dimensional( ) const;
/// An object `ame` is valid iff <UL> <LI>`ame` contains all points of
/// its defining set \f$ P\f$, <LI>`ame` is an \f$
/// (1+\epsilon')\f$-approximation to the smallest ellipsoid \f$
/// \mel(P)\f$ of \f$ P\f$, <LI>The ellipsoid represented by `ame`
/// (P)\f$ of \f$ P\f$, <LI>The ellipsoid represented by `ame`
/// fulfills the inclusion ( \ref eqapproximate_min_ellipsoid_incl
/// ). </UL>
/// @{
@ -426,7 +426,7 @@ bool is_valid( bool verbose = false) const;
/*!
Writes the points \f$ P\f$ and the computed approximation to
\f$ \mel(P)\f$ as an EPS-file under pathname `name`. \pre The dimension of points \f$ P\f$ must be \f$ 2\f$.
\f$ (P)\f$ as an EPS-file under pathname `name`. \pre The dimension of points \f$ P\f$ must be \f$ 2\f$.
<I>Note:</I> this
routine is provided as a debugging routine; future version of
\cgal might not provide it anymore.

View File

@ -42,6 +42,7 @@
#include <CGAL/boost/iterator/counting_iterator.hpp>
#include <CGAL/boost/iterator/transform_iterator.hpp>
#include <boost/functional.hpp>
#include <CGAL/NT_converter.h>
// here is how it works. We have d+2 variables:
// R (big radius), r (small radius), c (center). The problem is
@ -466,7 +467,8 @@ public:
{ CGAL_optimisation_precondition(
is_empty() || tco.access_dimension_d_object()( p) == d);
ET sqr_d = sqr_dist( p);
ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d];
ET h_p_sqr(da_coord(p)[d]);
h_p_sqr *= h_p_sqr;
return ( ( sqr_d < h_p_sqr * sqr_i_rad_numer) ||
( h_p_sqr * sqr_o_rad_numer < sqr_d)); }
@ -623,9 +625,10 @@ private:
inner_indices.push_back( 0);
outer_indices.push_back( 0);
center_coords.resize( d+1);
std::copy( da_coord( points[ 0]),
da_coord( points[ 0])+d+1,
center_coords.begin());
std::transform( da_coord( points[ 0]),
da_coord( points[ 0])+d+1,
center_coords.begin(),
NT_converter<RT,ET>());
sqr_i_rad_numer = ET( 0);
sqr_o_rad_numer = ET( 0);
sqr_rad_denom = ET( 1);
@ -748,7 +751,8 @@ is_valid( bool verbose, int level) const
// all inner support points on inner boundary?
Inner_support_point_iterator i_pt_it = inner_support_points_begin();
for ( ; i_pt_it != inner_support_points_end(); ++i_pt_it) {
ET h_p_sqr = da_coord (*i_pt_it)[d] * da_coord (*i_pt_it)[d];
ET h_p_sqr(da_coord (*i_pt_it)[d]);
h_p_sqr *= h_p_sqr;
if ( sqr_dist( *i_pt_it) != h_p_sqr * sqr_i_rad_numer)
return CGAL::_optimisation_is_valid_fail( verr,
"annulus does not have all inner support points on its inner boundary");
@ -757,7 +761,8 @@ is_valid( bool verbose, int level) const
// all outer support points on outer boundary?
Outer_support_point_iterator o_pt_it = outer_support_points_begin();
for ( ; o_pt_it != outer_support_points_end(); ++o_pt_it) {
ET h_p_sqr = da_coord (*o_pt_it)[d] * da_coord (*o_pt_it)[d];
ET h_p_sqr(da_coord (*o_pt_it)[d]);
h_p_sqr *= h_p_sqr;
if ( sqr_dist( *o_pt_it) != h_p_sqr * sqr_o_rad_numer)
return CGAL::_optimisation_is_valid_fail( verr,
"annulus does not have all outer support points on its outer boundary");

View File

@ -360,7 +360,20 @@ class Min_ellipse_2 {
// default constructor
inline
Min_ellipse_2( const Traits& traits = Traits())
Min_ellipse_2()
: n_support_points( 0)
{
// allocate support points' array
support_points = new Point[ 5];
// initialize ellipse
tco.ellipse.set();
CGAL_optimisation_postcondition( is_empty());
}
inline
Min_ellipse_2( const Traits& traits )
: tco( traits), n_support_points( 0)
{
// allocate support points' array

View File

@ -68,6 +68,19 @@ struct I_Infinity_distance_2
: public CGAL::cpp98::binary_function<
Point_2< R >, Point_2< R >, typename R::FT >
{
// Added as workaround for VC2017 with /arch:AVX to fix
// https://cgal.geometryfactory.com/CGAL/testsuite/CGAL-4.14-I-95/Rectangular_p_center_2_Examples/TestReport_afabri_x64_Cygwin-Windows10_MSVC2017-Release-64bits.gz
I_Infinity_distance_2()
{}
I_Infinity_distance_2(const I_Infinity_distance_2&)
{}
I_Infinity_distance_2& operator=(const I_Infinity_distance_2&)
{
return *this;
}
typename R::FT
operator()(const Point_2< R >& q1, const Point_2< R >& q2) const {
return (std::max)(CGAL_NTS abs(q1.x() - q2.x()),

View File

@ -27,14 +27,18 @@ struct Util {
int numBoxes, numDim;
int boxNum, dim;
std::fscanf(infile, "%d %d\n", &numBoxes, &numDim);
int n = std::fscanf(infile, "%d %d\n", &numBoxes, &numDim);
assert(n == 2); CGAL_USE(n);
std::vector< int > minc( numDim ), maxc( numDim );
/* Read boxes */
for(boxNum = 0; boxNum < numBoxes; boxNum++) {
for(dim = 0; dim < numDim; dim++)
std::fscanf( infile, "[%d, %d) ", &minc[dim], &maxc[dim] );
for(dim = 0; dim < numDim; dim++) {
n = std::fscanf( infile, "[%d, %d) ", &minc[dim], &maxc[dim] );
assert( n == 2);
}
boxes.push_back( Box( &minc[0], &maxc[0] ) );
std::fscanf(infile, "\n");
n = std::fscanf(infile, "\n");
assert(n == 0);
}
}

View File

@ -47,11 +47,13 @@
#if !defined CGAL_CFG_NO_CPP0X_ISFINITE
#define CGAL_CORE_finite(x) std::isfinite(x)
#define CGAL_CORE_ilogb(x) ilogb(x)
#elif defined (_MSC_VER) || defined (__MINGW32__) // add support for MinGW
#define CGAL_CORE_finite(x) _finite(x)
#define ilogb(x) (int)_logb(x)
#define CGAL_CORE_ilogb(x) (int)_logb(x)
#else
#define CGAL_CORE_finite(x) finite(x)
#define CGAL_CORE_ilogb(x) ilogb(x)
#endif
#if defined(sun) || defined(__sun)
@ -126,11 +128,11 @@ public:
ilogb(x) is floor(log_2(|x|)).
Also, ilogb(0) = -INT_MAX. ilogb(NaN) = ilogb(+/-Inf) = INT_MAX */
extLong lMSB() const {
return extLong(ilogb(core_abs(fpVal)-maxAbs*ind*CORE_EPS));
return extLong(CGAL_CORE_ilogb(core_abs(fpVal)-maxAbs*ind*CORE_EPS));
}
/// upper bound on MSB
extLong uMSB() const {
return extLong(ilogb(core_abs(fpVal)+maxAbs*ind*CORE_EPS));
return extLong(CGAL_CORE_ilogb(core_abs(fpVal)+maxAbs*ind*CORE_EPS));
}
//@}

View File

@ -168,7 +168,7 @@ unsigned int ImageIO_limit_len(size_t to_be_read)
CGAL_INLINE_FUNCTION
size_t ImageIO_write(const _image *im, const void *buf, size_t len) {
size_t to_be_written = len;
int l = -1;
std::ptrdiff_t l = -1;
char *b = (char*)buf;
switch(im->openMode) {

View File

@ -73,14 +73,23 @@ struct Indicator_factory
class CGAL_IMAGEIO_EXPORT Image_3
{
class Image_deleter {
const bool own_the_data;
public:
Image_deleter(bool own_the_data) : own_the_data(own_the_data) {}
struct Image_deleter {
void operator()(_image* image)
{
if(!own_the_data && image != 0) {
image->data = 0;
}
::_freeImage(image);
}
};
public:
enum Own { OWN_THE_DATA, DO_NOT_OWN_THE_DATA };
typedef boost::shared_ptr<_image> Image_shared_ptr;
typedef Image_shared_ptr Pointer;
@ -88,7 +97,7 @@ protected:
Image_shared_ptr image_ptr;
// implementation in src/CGAL_ImageIO/Image_3.cpp
bool private_read(_image* im);
bool private_read(_image* im, Own own_the_data = OWN_THE_DATA);
public:
Image_3()
@ -102,9 +111,9 @@ public:
// std::cerr << "Image_3::copy_constructor\n";
}
Image_3(_image* im)
Image_3(_image* im, Own own_the_data = OWN_THE_DATA)
{
private_read(im);
private_read(im, own_the_data);
}
~Image_3()

View File

@ -25,12 +25,12 @@
#define CGAL_INLINE_FUNCTION
#endif
#include <CGAL/basic.h>
#include <CGAL/assertions.h>
namespace CGAL {
CGAL_INLINE_FUNCTION
bool Image_3::private_read(_image* im)
bool Image_3::private_read(_image* im, Own own)
{
if(im != 0)
{
@ -38,7 +38,7 @@ bool Image_3::private_read(_image* im)
{
::_freeImage(image());
}
image_ptr = Image_shared_ptr(im, Image_deleter());
image_ptr = Image_shared_ptr(im, Image_deleter(own == OWN_THE_DATA));
// std::cerr <<
// boost::format("image=%1% (xdim=%2%, ydim=%3%, zdim=%4%)\n")

View File

@ -55,7 +55,7 @@ static const VTK_to_ImageIO_type_mapper VTK_to_ImageIO_type[VTK_ID_TYPE] =
inline
Image_3
read_vtk_image_data(vtkImageData* vtk_image)
read_vtk_image_data(vtkImageData* vtk_image, Image_3::Own owning = Image_3::OWN_THE_DATA)
{
if(!vtk_image)
return Image_3();
@ -63,6 +63,7 @@ read_vtk_image_data(vtkImageData* vtk_image)
_image* image = ::_initImage();
const int* dims = vtk_image->GetDimensions();
const double* spacing = vtk_image->GetSpacing();
const double* offset = vtk_image->GetOrigin();
image->vectMode = VM_SCALAR;
image->xdim = dims[0];
image->ydim = dims[1];
@ -71,6 +72,9 @@ read_vtk_image_data(vtkImageData* vtk_image)
image->vx = spacing[0];
image->vy = spacing[1];
image->vz = spacing[2];
image->tx = offset[0];
image->ty = offset[1];
image->tz = offset[2];
image->endianness = ::_getEndianness();
int vtk_type = vtk_image->GetScalarType();
if(vtk_type == VTK_SIGNED_CHAR) vtk_type = VTK_CHAR;
@ -81,16 +85,21 @@ read_vtk_image_data(vtkImageData* vtk_image)
image->wdim = imageio_type.wdim;
image->wordKind = imageio_type.wordKind;
image->sign = imageio_type.sign;
image->data = ::ImageIO_alloc(dims[0]*dims[1]*dims[2]*image->wdim);
std::cerr << "GetNumberOfTuples()=" << vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples()
<< "\nimage->size()=" << dims[0]*dims[1]*dims[2]
<< "\nwdim=" << image->wdim << '\n';
CGAL_assertion(vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples() == dims[0]*dims[1]*dims[2]);
vtk_image->GetPointData()->GetScalars()->ExportToVoidPointer(image->data);
if(owning == Image_3::OWN_THE_DATA) {
image->data = ::ImageIO_alloc(dims[0]*dims[1]*dims[2]*image->wdim);
// std::cerr << "GetNumberOfTuples()=" << vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples()
// << "\nimage->size()=" << dims[0]*dims[1]*dims[2]
// << "\nwdim=" << image->wdim << '\n';
vtk_image->GetPointData()->GetScalars()->ExportToVoidPointer(image->data);
} else {
image->data = vtk_image->GetPointData()->GetScalars()->GetVoidPointer(0);
}
return Image_3(image);
return Image_3(image, owning);
}
} // namespace CGAL
#endif // CGAL_READ_VTK_IMAGE_DATA_H

View File

@ -81,7 +81,7 @@ public:
CGAL_kernel_assertion((p.a() * center.x() +
p.b() * center.y() +
p.c() * center.z() +
p.d()) == CGAL::ZERO);
p.d()) == 0);
CGAL_kernel_assertion(squared_r >= FT(0));
base = Rep(Sphere_3(center,squared_r), p);
}

View File

@ -28,6 +28,7 @@
#include <CGAL/determinant.h>
#include <CGAL/number_utils.h>
#include <boost/type_traits/is_integral.hpp>
namespace CGAL {
@ -284,7 +285,16 @@ line_get_pointC2(const FT &a, const FT &b, const FT &c, int i,
{
if (CGAL_NTS is_zero(b))
{
x = (-b-c)/a + i * b;
// Laurent Rineau, 2018/12/07: I add this CGAL_assume to calm
// down a warning from MSVC 2017:
// > include\cgal\constructions\kernel_ftc2.h(287) :
// > warning C4723: potential divide by 0
// The test `!boost::is_integral<FT>::value` is there to avoid
// that `a != 0` is tested on anything but integral types, for
// performance reasons.
CGAL_assume(!boost::is_integral<FT>::value || a != FT(0));
x = -c/a;
y = 1 - i * a;
}
else

View File

@ -191,7 +191,7 @@ namespace internal {
// the circles intersect
const std::pair<typename CK::Circular_arc_point_2, unsigned>*
result = CGAL::internal::intersect_get< std::pair<typename CK::Circular_arc_point_2, unsigned> >(*it);
result = CGAL::Intersections::internal::intersect_get< std::pair<typename CK::Circular_arc_point_2, unsigned> >(*it);
if ( result->second == 2 ){ // double solution
_begin = result->first;
_end = result->first;
@ -202,7 +202,7 @@ namespace internal {
_end = result->first;
if (!(b_1 && b_2)) {
++it;
result = CGAL::internal::intersect_get< std::pair<typename CK::Circular_arc_point_2, unsigned> >(*it);
result = CGAL::Intersections::internal::intersect_get< std::pair<typename CK::Circular_arc_point_2, unsigned> >(*it);
if (!b_1)
_begin = result->first;
if (!b_2)

View File

@ -92,13 +92,13 @@ public:
// the circles intersect
const std::pair<typename CK::Circular_arc_point_2, unsigned>*
result = CGAL::internal::intersect_get<std::pair<typename CK::Circular_arc_point_2, unsigned> >(*it);
result = CGAL::Intersections::internal::intersect_get<std::pair<typename CK::Circular_arc_point_2, unsigned> >(*it);
// get must have succeeded
if ( result->second == 2 ) // double solution
return result->first;
if (b) return result->first;
++it;
result = CGAL::internal::intersect_get<std::pair<typename CK::Circular_arc_point_2, unsigned> >(*it);
result = CGAL::Intersections::internal::intersect_get<std::pair<typename CK::Circular_arc_point_2, unsigned> >(*it);
return result->first;
}
@ -136,14 +136,14 @@ public:
CGAL_kernel_precondition(do_intersect(support, l2));
//typedef typename Root_of_2::RT RT_2;
typename Intersection_traits<CK, Line_2, Line_2>::result_type
v = CGAL::internal::intersection(support, l1, CK());
v = CGAL::Intersections::internal::intersection(support, l1, CK());
CGAL_assertion(bool(v));
const Point_2 *pt = CGAL::internal::intersect_get<Point_2>(v);
const Point_2 *pt = CGAL::Intersections::internal::intersect_get<Point_2>(v);
CGAL_assertion(pt != NULL);
_begin = Circular_arc_point_2(*pt);
v = CGAL::internal::intersection(support, l2, CK());
const Point_2 *pt2 = CGAL::internal::intersect_get<Point_2>(v);
v = CGAL::Intersections::internal::intersection(support, l2, CK());
const Point_2 *pt2 = CGAL::Intersections::internal::intersect_get<Point_2>(v);
CGAL_assertion(pt2 != NULL);
_end = Circular_arc_point_2(*pt2);
reset_flags();

View File

@ -508,7 +508,7 @@ namespace CircularFunctors {
template <class T1, class T2>
result_type
operator()(const T1& t1, const T2& t2) const
{ return internal::do_intersect(t1, t2, CK()); }
{ return Intersections::internal::do_intersect(t1, t2, CK()); }
};
template < class CK >

View File

@ -54,7 +54,7 @@ circle_intersect( const typename CK::Circle_2 & c1,
// the circles intersect
const std::pair<typename CK::Circular_arc_point_2, unsigned>*
result = internal::intersect_get<std::pair<typename CK::Circular_arc_point_2, unsigned> > (*it);
result = Intersections::internal::intersect_get<std::pair<typename CK::Circular_arc_point_2, unsigned> > (*it);
if ( result->second == 2 ) // double solution
return result->first;
@ -63,7 +63,7 @@ circle_intersect( const typename CK::Circle_2 & c1,
return result->first;
++it;
result = internal::intersect_get<std::pair<typename CK::Circular_arc_point_2, unsigned> > (*it);
result = Intersections::internal::intersect_get<std::pair<typename CK::Circular_arc_point_2, unsigned> > (*it);
return result->first;
}

View File

@ -488,10 +488,10 @@ namespace CircularFunctors {
}
typename Intersection_traits<CK, typename CK::Line_2, typename CK::Line_2>::result_type
v = CGAL::internal::intersection(a1.supporting_line(), a2.supporting_line(), CK());
v = CGAL::Intersections::internal::intersection(a1.supporting_line(), a2.supporting_line(), CK());
if(!v) return res;
const Point_2 *pt = CGAL::internal::intersect_get<Point_2>(v);
const Point_2 *pt = CGAL::Intersections::internal::intersect_get<Point_2>(v);
if(pt == NULL) return res;
Circular_arc_point_2 intersect_point = Circular_arc_point_2(*pt);
// (Root_for_circles_2_2(Root_of_2(pt->x()),Root_of_2(pt->y())));

View File

@ -48,7 +48,8 @@ intersection(const A <K> &c1, const B <K> &c2, OutputIterator res) \
{ \
return typename K::Intersect_2()(c1, c2, res); \
} \
namespace internal { \
namespace Intersections { \
namespace internal { \
template <class K> \
inline \
bool \
@ -59,6 +60,7 @@ namespace internal { \
return !res.empty(); \
} \
} \
} \
template <class K> \
inline \
bool \

View File

@ -30,7 +30,6 @@
#include <CGAL/Algebraic_kernel_for_circles_2_2.h>
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
#include <CGAL/Circular_kernel_2/function_objects_polynomial_circular.h>
#include <CGAL/Circular_kernel_2/Circular_arc_2.h>
#include <CGAL/Circular_kernel_2/Line_arc_2.h>
#include <CGAL/Exact_circular_kernel_2.h>

View File

@ -282,7 +282,15 @@ namespace CGAL {
const double dz = z2-z1;
const double d_sq = dx*dx + dy*dy + dz*dz;
const double r_sq = to_double(squared_radius());
const double ap_ang = 2.0 * std::asin(0.5 * std::sqrt(d_sq / r_sq));
const double s = 0.5 * std::sqrt(d_sq / r_sq);
double ap_ang;
if(std::abs(s)<=1) {
ap_ang = 2.0 * std::asin(s);
} else {
// We only allow a small rounding error
CGAL_assertion(std::abs(s)<=1.0001);
ap_ang = (s < 0) ? -CGAL_PI : CGAL_PI;
}
if(sign_cross_product() == NEGATIVE) return 2.0 * CGAL_PI - ap_ang;
else return ap_ang;
}

View File

@ -70,7 +70,7 @@ struct Trait_for_cmp_tgt_theta_0{
typename SK::FT
unsigned_tkz_coeff_normal( const typename SK::Point_3& C,const typename SK::FT& gamma_k) const
{
return - CGAL_NTS sign(gamma_k)*C.y();
return - (int)CGAL_NTS sign(gamma_k)*C.y();
}
Tk_type

View File

@ -130,8 +130,8 @@ namespace CGAL {
intersect_3<SK>(circle,plane,std::back_inserter(inters));
CGAL_kernel_precondition(inters.size()==2);
const std::pair<typename SK::Circular_arc_point_3,unsigned>* pt[2]={NULL,NULL};
pt[0]=CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0]);
pt[1]=CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[1]);
pt[0]=CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0]);
pt[1]=CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[1]);
CGAL_kernel_precondition(pt[0]!=NULL);
CGAL_kernel_precondition(pt[1]!=NULL);

View File

@ -103,12 +103,12 @@ namespace CGAL {
std::back_inserter(solutions) );
if(solutions.size() == 0) return res;
if(solutions.size() == 1) {
const Solution& sol=*CGAL::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
if(SK().has_on_3_object()(ca,sol.first,true))
*res++ = solutions[0];
} else {
const Solution& sol1=*CGAL::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol2=*CGAL::internal::intersect_get<Solution>(solutions[1]);
const Solution& sol1=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol2=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[1]);
if(SK().has_on_3_object()(ca,sol1.first,true))
*res++ = solutions[0];
if(SK().has_on_3_object()(ca,sol2.first,true))
@ -140,12 +140,12 @@ namespace CGAL {
std::back_inserter(solutions) );
if(solutions.size() == 0) return res;
if(solutions.size() == 1) {
const Solution& sol=*CGAL::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
if(SK().has_on_3_object()(ca,sol.first,true))
*res++ = solutions[0];
} else {
const Solution& sol1=*CGAL::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol2=*CGAL::internal::intersect_get<Solution>(solutions[1]);
const Solution& sol1=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol2=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[1]);
if(SK().has_on_3_object()(ca,sol1.first,true))
*res++ = solutions[0];
if(SK().has_on_3_object()(ca,sol2.first,true))
@ -178,12 +178,12 @@ namespace CGAL {
std::back_inserter(solutions) );
if(solutions.size() == 0) return res;
if(solutions.size() == 1) {
const Solution& sol=*CGAL::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
if(SK().has_on_3_object()(c,sol.first,true))
*res++ = solutions[0];
} else {
const Solution& sol1=*CGAL::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol2=*CGAL::internal::intersect_get<Solution>(solutions[1]);
const Solution& sol1=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol2=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[1]);
if(SK().has_on_3_object()(c,sol1.first,true))
*res++ = solutions[0];
if(SK().has_on_3_object()(c,sol2.first,true))
@ -215,12 +215,12 @@ namespace CGAL {
std::back_inserter(solutions) );
if(solutions.size() == 0) return res;
if(solutions.size() == 1) {
const Solution& sol=*CGAL::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
if(SK().has_on_3_object()(ca,sol.first,true))
*res++ = CGAL::internal::sk3_intersection_return<result_type>(sol);
} else {
const Solution& sol1=*CGAL::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol2=*CGAL::internal::intersect_get<Solution>(solutions[1]);
const Solution& sol1=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol2=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[1]);
if(SK().has_on_3_object()(ca,sol1.first,true))
*res++ = CGAL::internal::sk3_intersection_return<result_type>(sol1);
if(SK().has_on_3_object()(ca,sol2.first,true))
@ -247,13 +247,13 @@ namespace CGAL {
std::back_inserter(solutions) );
if(solutions.size() == 0) return res;
if(solutions.size() == 1) {
const Solution& sol=*CGAL::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
if(SK().has_on_3_object()(ca,sol.first,true) &&
SK().has_on_3_object()(la,sol.first,true))
*res++ = solutions[0];
} else {
const Solution& sol1=*CGAL::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol2=*CGAL::internal::intersect_get<Solution>(solutions[1]);
const Solution& sol1=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol2=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[1]);
if(SK().has_on_3_object()(ca,sol1.first,true) &&
SK().has_on_3_object()(la,sol1.first,true))
*res++ = solutions[0];
@ -359,13 +359,13 @@ namespace CGAL {
std::back_inserter(solutions) );
if(solutions.size() == 0) return res;
if(solutions.size() == 1) {
const Solution& sol=*CGAL::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
if(SK().has_on_3_object()(a1,sol.first,true) &&
SK().has_on_3_object()(a2,sol.first,true))
*res++ = solutions[0];
} else {
const Solution& sol1=*CGAL::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol2=*CGAL::internal::intersect_get<Solution>(solutions[1]);
const Solution& sol1=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol2=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[1]);
if(SK().has_on_3_object()(a1,sol1.first,true) &&
SK().has_on_3_object()(a2,sol1.first,true))
*res++ = solutions[0];
@ -481,8 +481,8 @@ namespace CGAL {
//one endpoint is extremal: just split the arc
if (nb_extrem==1){
const std::pair<typename SK::Circular_arc_point_3,unsigned>* pt[2]={NULL,NULL};
pt[0]=CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0]);
pt[1]=CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[1]);
pt[0]=CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0]);
pt[1]=CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[1]);
CGAL_kernel_precondition(pt[0]!=NULL);
CGAL_kernel_precondition(pt[1]!=NULL);
const typename SK::Circular_arc_point_3& midpt=(arc.source()==pt[0]->first || arc.target()==pt[0]->first)?pt[1]->first:pt[0]->first;
@ -496,7 +496,7 @@ namespace CGAL {
//only one intersection points
if (inters.size()==1){
const std::pair<typename SK::Circular_arc_point_3,unsigned>* midpt=NULL;
midpt=CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0]);
midpt=CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0]);
CGAL_kernel_precondition(midpt!=NULL);
*out_it++=typename SK::Circular_arc_3(arc.supporting_circle(),arc.source(),midpt->first);
*out_it++=typename SK::Circular_arc_3(arc.supporting_circle(),midpt->first,arc.target());
@ -505,8 +505,8 @@ namespace CGAL {
//three arcs are defined by two intersection points
const std::pair<typename SK::Circular_arc_point_3,unsigned>* pt[2]={NULL,NULL};
pt[0]=CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0]);
pt[1]=CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[1]);
pt[0]=CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0]);
pt[1]=CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[1]);
CGAL_kernel_precondition(pt[0]!=NULL);
CGAL_kernel_precondition(pt[1]!=NULL);
@ -590,16 +590,16 @@ namespace CGAL {
CGAL_kernel_precondition(!inters.empty());
if (inters.size()==1){
const typename SK::Circular_arc_point_3& pt=
CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0])->first;
CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0])->first;
return pt;
}
CGAL_kernel_precondition(classify_circle_3<SK>(arc.supporting_circle(),sphere)!=NORMAL);
const typename SK::Circular_arc_point_3& pts1 =
CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0])->first;
CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0])->first;
const typename SK::Circular_arc_point_3& pts2 =
CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[1])->first;
CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[1])->first;
//either a polar (1 pole + 1 pt) or a threaded circle (2 pts with theta-coord = +/- pi)

View File

@ -101,12 +101,12 @@ namespace CGAL {
if(!o)
return res;
if(const Point_3* inters_p = CGAL::internal::intersect_get<Point_3>(o)) {
if(const Point_3* inters_p = CGAL::Intersections::internal::intersect_get<Point_3>(o)) {
Circular_arc_point_3 p = *inters_p;
if(!SK().has_on_3_object()(l1,p,true)) return res;
if(!SK().has_on_3_object()(l2,p,true)) return res;
*res++ = CGAL::internal::sk3_intersection_return<result_type>(std::make_pair(p,1u));
} else if( CGAL::internal::intersect_get<Line_3>(o) ) {
} else if( CGAL::Intersections::internal::intersect_get<Line_3>(o) ) {
if(SK().compare_xyz_3_object()(l1.lower_xyz_extremity(),
l2.lower_xyz_extremity()) < 0) {
int comparison =
@ -167,9 +167,9 @@ namespace CGAL {
if(!o)
return res;
if(const Line_3* inters_l = CGAL::internal::intersect_get<Line_3>(o)) {
if(const Line_3* inters_l = CGAL::Intersections::internal::intersect_get<Line_3>(o)) {
*res++ = CGAL::internal::sk3_intersection_return<result_type>(la);
} else if(const Point_3* inters_p = CGAL::internal::intersect_get<Point_3>(o)) {
} else if(const Point_3* inters_p = CGAL::Intersections::internal::intersect_get<Point_3>(o)) {
Circular_arc_point_3 p = *inters_p;
if(!SK().has_on_3_object()(la,p,true)) return res;
*res++ = CGAL::internal::sk3_intersection_return<result_type>(std::make_pair(p,1u));
@ -195,12 +195,12 @@ namespace CGAL {
std::back_inserter(solutions) );
if(solutions.size() == 0) return res;
if(solutions.size() == 1) {
const Solution* sol = CGAL::internal::intersect_get<Solution>(solutions[0]);
const Solution* sol = CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
if(SK().has_on_3_object()(l,(*sol).first,true))
*res++ = solutions[0];
} else {
const Solution* sol1 = CGAL::internal::intersect_get<Solution>(solutions[0]);
const Solution* sol2 = CGAL::internal::intersect_get<Solution>(solutions[1]);
const Solution* sol1 = CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
const Solution* sol2 = CGAL::Intersections::internal::intersect_get<Solution>(solutions[1]);
if(SK().has_on_3_object()(l,(*sol1).first,true))
*res++ = solutions[0];
@ -226,12 +226,12 @@ namespace CGAL {
std::back_inserter(solutions) );
if(solutions.size() == 0) return res;
if(solutions.size() == 1) {
const Solution* sol = CGAL::internal::intersect_get<Solution>(solutions[0]);
const Solution* sol = CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
if(SK().has_on_3_object()(l,(*sol).first,true))
*res++ = solutions[0];
} else {
const Solution* sol1 = CGAL::internal::intersect_get<Solution>(solutions[0]);
const Solution* sol2 = CGAL::internal::intersect_get<Solution>(solutions[1]);
const Solution* sol1 = CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
const Solution* sol2 = CGAL::Intersections::internal::intersect_get<Solution>(solutions[1]);
if(SK().has_on_3_object()(l,(*sol1).first,true))
*res++ = solutions[0];
if(SK().has_on_3_object()(l,(*sol2).first,true))
@ -257,7 +257,7 @@ namespace CGAL {
if(!o)
return res;
if((sol = CGAL::internal::intersect_get<Point_3>(o))) {
if((sol = CGAL::Intersections::internal::intersect_get<Point_3>(o))) {
if(!SK().has_on_3_object()(l,*sol)) return res;
Circular_arc_point_3 point = sol;
*res++ = result_type(std::make_pair(point,1u));

View File

@ -336,7 +336,7 @@ namespace CGAL {
typename Intersection_traits<SK, Sphere_3, Sphere_3>::result_type v =
SK().intersect_3_object()(s1, s2);
if(!v) return res;
if(const Point_3* p = CGAL::internal::intersect_get<Point_3>(v)) {
if(const Point_3* p = CGAL::Intersections::internal::intersect_get<Point_3>(v)) {
if(SK().has_on_3_object()(s3, *p)) {
#if CGAL_INTERSECTION_VERSION < 2
*res++ = make_object(std::make_pair(Circular_arc_point_3(*p),2u));
@ -346,7 +346,7 @@ namespace CGAL {
}
return res;
}
if(const Circle_3* c = CGAL::internal::intersect_get<Circle_3>(v)) {
if(const Circle_3* c = CGAL::Intersections::internal::intersect_get<Circle_3>(v)) {
if(SK().has_on_3_object()(s3, *c)) {
#if CGAL_INTERSECTION_VERSION < 2
*res++ = make_object(*c);

View File

@ -38,6 +38,14 @@
namespace CGAL {
#define CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_JUST_INTERSECTION_2_(A,B) \
template < class OutputIterator, class K > \
OutputIterator \
intersection(const A <K> &c1, const B <K> &c2, OutputIterator res) \
{ \
return typename K::Intersect_3()(c1, c2, res); \
}
#define CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_2_(A,B) \
template < class OutputIterator, class K > \
OutputIterator \
@ -68,8 +76,8 @@ do_intersect(const A <K> &c1, const B <K> &c2, const C <K> &c3) \
return typename K::Do_intersect_3()(c1, c2, c3); \
}
CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_2_(Sphere_3, Line_3)
CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_2_(Line_3, Sphere_3)
CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_JUST_INTERSECTION_2_(Sphere_3, Line_3)
CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_JUST_INTERSECTION_2_(Line_3, Sphere_3)
CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_3_(Sphere_3, Sphere_3, Sphere_3)
CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_3_(Sphere_3, Sphere_3, Plane_3)
CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_3_(Plane_3, Sphere_3, Sphere_3)

View File

@ -87,7 +87,7 @@ void _test_spherical_kernel_compute(SK sk)
cp[i] = theConstruct_circular_arc_point_3(rt[i]);
}
const double pi = std::acos(-1.);
const double pi = CGAL_PI;
const Polynomials_for_circle_3 pcc_test =
std::make_pair(Polynomial_for_spheres_2_3(0,0,0,1),

View File

@ -38,6 +38,7 @@
# pragma warning(disable:4267)
# pragma warning(disable:4275)
# pragma warning(disable:4251)
# pragma warning(disable:4996)
#endif
#include <CGAL/Classification/internal/auxiliary/random-forest/node-gini.hpp>

View File

@ -32,7 +32,7 @@
namespace CGAL {
/*
#include <CGAL/Segment_2_Segment_2_intersection.h>
#include <CGAL/Intersections_2/Segment_2_Segment_2.h>
template <class ForwardIterator, class OutputIterator, class R>
OutputIterator
si_brute_force(ForwardIterator first, ForwardIterator last,

View File

@ -14,3 +14,4 @@ Number_types
Profiling_tools
STL_Extension
Stream_support
Distance_3

View File

@ -93,7 +93,7 @@ function(configure_doxygen_package CGAL_PACKAGE_NAME)
file(APPEND ${CGAL_DOC_PACKAGE_DEFAULTS} "STRIP_FROM_INC_PATH = ${CGAL_PACKAGE_DOC_DIR}/\n")
file(APPEND ${CGAL_DOC_PACKAGE_DEFAULTS} "STRIP_FROM_INC_PATH += ${CGAL_PACKAGE_DIR}/include/\n")
file(APPEND ${CGAL_DOC_PACKAGE_DEFAULTS} "ALIASES += \"cgalPkgDescriptionBegin{2}=\\details \"\n")
file(APPEND ${CGAL_DOC_PACKAGE_DEFAULTS} "ALIASES += \"cgalPkgManuals{2}=<BR>\"\n")
file(APPEND ${CGAL_DOC_PACKAGE_DEFAULTS} "ALIASES += \"cgalPkgManuals{2}=<div class=\\\"PkgManuals\\\"></div>\"\n")
file(APPEND ${CGAL_DOC_PACKAGE_DEFAULTS} "INPUT = ${CGAL_PACKAGE_DOC_DIR}\n")
if(NOT EXISTS "${CGAL_PACKAGE_DOC_DIR}/CGAL")
# This package has in-source documentation.

View File

@ -23,6 +23,7 @@ Generator
Geomview
GraphicsView
HalfedgeDS
Heat_method_3
BGL
Combinatorial_map
Generalized_map
@ -97,3 +98,4 @@ Surface_mesh_shortest_path
Polygon_mesh_processing
Set_movable_separability_2
Classification
Surface_mesh_approximation

View File

@ -116,6 +116,7 @@ h1 {
\package_listing{Surface_mesh_parameterization}
\package_listing{Surface_mesh_shortest_path}
\package_listing{Surface_mesh_skeletonization}
\package_listing{Surface_mesh_approximation}
\package_listing{Ridges_3}
\package_listing{Jet_fitting_3}
\package_listing{Point_set_3}
@ -123,7 +124,7 @@ h1 {
\package_listing{Point_set_shape_detection_3}
\package_listing{Stream_lines_2}
\package_listing{Classification}
\package_listing{Heat_method_3}
\section PartSearchStructures Spatial Searching and Sorting

View File

@ -299,6 +299,17 @@ Boissonnat}
,update = "98.01 schirra"
}
@inproceedings{cgal:cad-vsa-04,
title={Variational shape approximation},
author={Cohen-Steiner, David and Alliez, Pierre and Desbrun, Mathieu},
booktitle={ACM Transactions on Graphics (TOG)},
volume={23},
number={3},
pages={905--914},
year={2004},
organization={ACM}
}
@inproceedings{cgal::c-mssbo-04,
author={Chen, L.},
title={{Mesh Smoothing Schemes based on Optimal Delaunay Triangulations}},
@ -464,6 +475,30 @@ note="Conference version: Symp. on Geometry Processing 2003"
,update = "97.08 kettner"
}
@article{cgal:cww-ghnac-13,
author = {Crane, Keenan and Weischedel, Clarisse and Wardetzky, Max},
title = {Geodesics in Heat: A New Approach to Computing Distance Based on Heat Flow},
journal = {ACM Trans. Graph.},
issue_date = {September 2013},
volume = {32},
number = {5},
month = oct,
year = {2013},
issn = {0730-0301},
pages = {152:1--152:11},
articleno = {152},
numpages = {11},
url = {http://doi.acm.org/10.1145/2516971.2516977},
doi = {10.1145/2516971.2516977},
acmid = {2516977},
publisher = {ACM},
address = {New York, NY, USA},
keywords = {Digital geometry processing, discrete differential geometry, distance transform, geodesic distance, heat kernel},
}
@PhdThesis{ cgal:d-ccccg-10,
author = {Damiand, G.},
title = {Contributions aux Cartes Combinatoires et Cartes G\'en\'eralis\'ees : Simplification, Mod\`eles, Invariants Topologiques et Applications},
@ -715,6 +750,23 @@ Teillaud"
,update = "95.09 mitchell"
}
@inproceedings{cgal:fsbs-acidt-06,
author = {Fisher, Matthew and Springborn, Boris and Bobenko, Alexander I. and Schroder, Peter},
title = {An Algorithm for the Construction of Intrinsic Delaunay Triangulations with Applications to Digital Geometry Processing},
booktitle = {ACM SIGGRAPH 2006 Courses},
series = {SIGGRAPH '06},
year = {2006},
isbn = {1-59593-364-6},
location = {Boston, Massachusetts},
pages = {69--74},
numpages = {6},
url = {http://doi.acm.org/10.1145/1185657.1185668},
doi = {10.1145/1185657.1185668},
acmid = {1185668},
publisher = {ACM},
address = {New York, NY, USA},
}
@InCollection{ cgal:fh-survey-05,
author = {M. S. Floater and K. Hormann},
title = {Surface Parameterization: a Tutorial and Survey},
@ -1089,6 +1141,17 @@ Teillaud"
,pages = "307--320"
}
@article{ cgal:l-lsqp-82,
title={Least squares quantization in PCM},
author={Lloyd, Stuart},
journal={IEEE transactions on information theory},
volume={28},
number={2},
pages={129--137},
year={1982},
publisher={IEEE}
}
@book{ cgal:l-mrfmi-09,
author = {Li, Stan Z.},
title = {Markov Random %Field Modeling in Image Analysis},
@ -1096,7 +1159,7 @@ Teillaud"
isbn = {9781848002784},
edition = {3rd},
publisher = {Springer Publishing Company, Incorporated}
}
}
@inproceedings { cgal:l-nmdgp-05,
AUTHOR = {Bruno Levy},
@ -1320,6 +1383,17 @@ Voronoi diagram"
,update = "97.04 kettner"
}
@article{cgal:l-lsqp-82,
title={Least squares quantization in PCM},
author={Lloyd, Stuart},
journal={IEEE transactions on information theory},
volume={28},
number={2},
pages={129--137},
year={1982},
publisher={IEEE}
}
@InProceedings{ cgal:lprm-lscm-02,
author = {Bruno L{\'e}vy and Sylvain Petitjean and Nicolas Ray
and J{\'e}rome Maillot},
@ -2140,6 +2214,16 @@ location = {Salt Lake City, Utah, USA}
Geodesy and Photogrammetry)},
url = {https://www.prs.igp.ethz.ch/research/Source_code_and_datasets.html},
year = 2014
@inproceedings{ cgal:wk-srhvs-05,
title={Structure recovery via hybrid variational surface approximation},
author={Wu, Jianhua and Kobbelt, Leif},
booktitle={Computer Graphics Forum},
volume={24},
number={3},
pages={277--284},
year={2005},
organization={Wiley Online Library}
}
@book{cgal:ww-smgd-02
@ -2177,6 +2261,17 @@ location = {Salt Lake City, Utah, USA}
address = {New York, NY, USA},
}
@article{cgal:ywly-vmsqs-12,
title={Variational mesh segmentation via quadric surface fitting},
author={Yan, Dong-Ming and Wang, Wenping and Liu, Yang and Yang, Zhouwang},
journal={Computer-Aided Design},
volume={44},
number={11},
pages={1072--1082},
year={2012},
publisher={Elsevier}
}
@article{ cgal:ze-fsbi-02
,author = "Afra Zomorodian and Herbert Edelsbrunner"
,title = "Fast Software for Box Intersection"

View File

@ -250,9 +250,9 @@ ALIASES = "sc{1}=<span style=\"font-variant: small-caps;\">\1</sp
"cgalFigureBegin{8}=\anchor fig__\1 \n <CENTER> <TABLE border=0> <TR> <TD> \image html \2 \n \image latex \2 \"\" width=2.1cm \n </TD> <TD> \image html \3 \n \image latex \3 \"\" width=2.1cm \n </TD> <TD> \image html \4 \n \image latex \4 \"\" width=2.1cm \n </TD> <TD> \image html \5 \n \image latex \5 \"\" width=2.1cm \n </TD> <TD> \image html \6 \n \image latex \6 \"\" width=2.1cm \n </TD> <TD> \image html \7 \n \image latex \7 \"\" width=2.1cm \n </TD> <TD> \image html \8 \n \image latex \8 \"\" width=2.1cm \n </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly \n \latexonly \n \endlatexonly \ref fig__\1" \
"cgalFigureBegin{9}=\anchor fig__\1 \n <CENTER> <TABLE border=0> <TR> <TD> \image html \2 \n \image latex \2 \"\" width=1.9cm \n </TD> <TD> \image html \3 \n \image latex \3 \"\" width=1.9cm \n </TD> <TD> \image html \4 \n \image latex \4 \"\" width=1.9cm \n </TD> <TD> \image html \5 \n \image latex \5 \"\" width=1.9cm \n </TD> <TD> \image html \6 \n \image latex \6 \"\" width=1.9cm \n </TD> <TD> \image html \7 \n \image latex \7 \"\" width=1.9cm \n </TD> <TD> \image html \8 \n \image latex \8 \"\" width=1.9cm \n </TD> <TD> \image html \9 \n \image latex \9 \"\" width=1.9cm \n </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly \n \latexonly \n \endlatexonly \ref fig__\1" \
"cgalFigureBegin{10}=\anchor fig__\1 \n <CENTER> <TABLE border=0> <TR> <TD> \image html \2 \n \image latex \2 \"\" width=1.6cm \n </TD> <TD> \image html \3 \n \image latex \3 \"\" width=1.6cm \n </TD> <TD> \image html \4 \n \image latex \4 \"\" width=1.6cm \n </TD> <TD> \image html \5 \n \image latex \5 \"\" width=1.6cm \n </TD> <TD> \image html \6 \n \image latex \6 \"\" width=1.6cm \n </TD> <TD> \image html \7 \n \image latex \7 \"\" width=1.6cm \n </TD> <TD> \image html \8 \n \image latex \8 \"\" width=1.6cm \n </TD> <TD> \image html \9 \n \image latex \9 \"\" width=1.6cm \n </TD> <TD> \image html \10 \n \image latex \10 \"\" width=1.6cm \n </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly \n \latexonly \n \endlatexonly \ref fig__\1" \
"cgalFigureEnd=\htmlonly </div> \endhtmlonly <br>" \
"cgalFigureEnd=\htmlonly </div> <br> \endhtmlonly" \
"cgalFigureCaptionBegin{1}=\htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly \ref fig__\1" \
"cgalFigureCaptionEnd=\htmlonly </div> \endhtmlonly <br>" \
"cgalFigureCaptionEnd=\htmlonly </div> <br> \endhtmlonly" \
"cgalConcept=\details <div id=\"CGALConcept\"></div>\n \brief" \
"cgalConceptNamespace=\details <div id=\"CGALConceptNS\"></div>\n \brief" \
"cgalRefines=\xrefitem refines \"Refines\" \"Refinement Relationships\"" \

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>

View File

@ -1,5 +1,5 @@
<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/png" href="$relpath$../Manual/g-196x196-doc.png"/>

View File

@ -1,5 +1,5 @@
<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/png" href="$relpath$../Manual/g-196x196-doc.png" />

View File

@ -242,29 +242,29 @@ ALIASES = "sc{1}=<span style=\"font-variant: small-caps;\">\1</sp
"cgalExample{1}=<br><b>File</b> \ref \1 \include \1" \
"cgalFigureAnchor{1}=\anchor fig__\1" \
"cgalFigureRef{1}=\ref fig__\1" \
"cgalFigureBegin{2}=\anchor fig__\1 ^^ \image html \2 ^^ \image latex \2 \"\" width=15cm ^^ \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly \latexonly ^^ \endlatexonly ^^ \ref fig__\1" \
"cgalFigureBegin{3}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=7.5cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=7.5cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{4}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=5cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=5cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=5cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{5}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=3.75cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=3.75cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=3.75cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=3.75cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{6}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=3cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=3cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=3cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=3cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=3cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{7}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=2.5cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=2.5cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=2.5cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=2.5cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=2.5cm ^^ </TD> <TD> \image html \7 ^^ \image latex \7 \"\" width=2.5cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{8}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=2.1cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=2.1cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=2.1cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=2.1cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=2.1cm ^^ </TD> <TD> \image html \7 ^^ \image latex \7 \"\" width=2.1cm ^^ </TD> <TD> \image html \8 ^^ \image latex \8 \"\" width=2.1cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{9}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=1.9cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=1.9cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=1.9cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=1.9cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=1.9cm ^^ </TD> <TD> \image html \7 ^^ \image latex \7 \"\" width=1.9cm ^^ </TD> <TD> \image html \8 ^^ \image latex \8 \"\" width=1.9cm ^^ </TD> <TD> \image html \9 ^^ \image latex \9 \"\" width=1.9cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{10}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=1.6cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=1.6cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=1.6cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=1.6cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=1.6cm ^^ </TD> <TD> \image html \7 ^^ \image latex \7 \"\" width=1.6cm ^^ </TD> <TD> \image html \8 ^^ \image latex \8 \"\" width=1.6cm ^^ </TD> <TD> \image html \9 ^^ \image latex \9 \"\" width=1.6cm ^^ </TD> <TD> \image html \10 ^^ \image latex \10 \"\" width=1.6cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureEnd=\htmlonly </div> \endhtmlonly <br>" \
"cgalFigureCaptionBegin{1}=\htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly \ref fig__\1" \
"cgalFigureCaptionEnd=\htmlonly </div> \endhtmlonly <br>" \
"cgalFigureBegin{2}=\anchor fig__\1 ^^ \image html \2 ^^ \image latex \2 \"\" width=15cm ^^ \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly \latexonly ^^ \endlatexonly ^^ \ref fig__\1" \
"cgalFigureBegin{3}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=7.5cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=7.5cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{4}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=5cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=5cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=5cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{5}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=3.75cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=3.75cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=3.75cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=3.75cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{6}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=3cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=3cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=3cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=3cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=3cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{7}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=2.5cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=2.5cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=2.5cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=2.5cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=2.5cm ^^ </TD> <TD> \image html \7 ^^ \image latex \7 \"\" width=2.5cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{8}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=2.1cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=2.1cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=2.1cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=2.1cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=2.1cm ^^ </TD> <TD> \image html \7 ^^ \image latex \7 \"\" width=2.1cm ^^ </TD> <TD> \image html \8 ^^ \image latex \8 \"\" width=2.1cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{9}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=1.9cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=1.9cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=1.9cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=1.9cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=1.9cm ^^ </TD> <TD> \image html \7 ^^ \image latex \7 \"\" width=1.9cm ^^ </TD> <TD> \image html \8 ^^ \image latex \8 \"\" width=1.9cm ^^ </TD> <TD> \image html \9 ^^ \image latex \9 \"\" width=1.9cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{10}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=1.6cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=1.6cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=1.6cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=1.6cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=1.6cm ^^ </TD> <TD> \image html \7 ^^ \image latex \7 \"\" width=1.6cm ^^ </TD> <TD> \image html \8 ^^ \image latex \8 \"\" width=1.6cm ^^ </TD> <TD> \image html \9 ^^ \image latex \9 \"\" width=1.6cm ^^ </TD> <TD> \image html \10 ^^ \image latex \10 \"\" width=1.6cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureEnd=\htmlonly[block] </div> \endhtmlonly <br>" \
"cgalFigureCaptionBegin{1}=\htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly \ref fig__\1" \
"cgalFigureCaptionEnd=\htmlonly[block] </div> \endhtmlonly <br>" \
"cgalConcept=\details <div id=\"CGALConcept\"></div>^^ \brief" \
"cgalConceptNamespace=\details <div id=\"CGALConceptNS\"></div>^^ \brief" \
"cgalRefines=\xrefitem refines \"Refines\" \"Refinement Relationships\"" \
"cgalModels=\xrefitem models \"Is Model Of\" \"Is Model Relationships\"" \
"cgalGeneralizes=\xrefitem generalizes \"Generalizes\" \"Generalization Relationships\"" \
"cgalHasModel=\xrefitem hasModels \"Has Models\" \"Has Model Relationships\"" \
"cgalDebugBegin=\htmlonly <div class=\"CGALDebug\"> <div>Debugging Support</div> \endhtmlonly ^^" \
"cgalDebugEnd=\htmlonly </div> \endhtmlonly" \
"cgalDebugBegin=\htmlonly[block] <div class=\"CGALDebug\"> <div>Debugging Support</div> \endhtmlonly ^^" \
"cgalDebugEnd=\htmlonly[block] </div> \endhtmlonly" \
"cgalDebugFunction=This is a function for debugging purpose." \
"cgalAdvancedBegin=\htmlonly <div class=\"CGALAdvanced\"> <div>Advanced</div> \endhtmlonly ^^" \
"cgalAdvancedEnd=\htmlonly </div> \endhtmlonly" \
"cgalAdvancedBegin=\htmlonly[block] <div class=\"CGALAdvanced\"> <div>Advanced</div> \endhtmlonly ^^" \
"cgalAdvancedEnd=\htmlonly[block] </div> \endhtmlonly" \
"cgalAdvancedFunction=This is an advanced function." \
"cgalAdvancedClass=This is an advanced class." \
"cgalRequiresCPP11=\warning This function requires a C++11 compiler." \
@ -287,11 +287,11 @@ ALIASES = "sc{1}=<span style=\"font-variant: small-caps;\">\1</sp
"cgalModifEnd=\htmlonly </div> \endhtmlonly \latexonly END MODIFICATIONS \endlatexonly" \
"cgalPkgBib{1}=<B>BibTeX:</B> <a href=\"../Manual/how_to_cite_cgal.html#\1-${CGAL_RELEASE_YEAR_ID}\">\1-${CGAL_RELEASE_YEAR_ID}</a><BR>" \
"cgalFootnote{1}=<span class=\"footnote\">\1</span>" \
"cgalAutoToc=\htmlonly <div id=\"autotoc\" class=\"toc\"></div> \endhtmlonly" \
"cgalAutoToc=\htmlonly[block] <div id=\"autotoc\" class=\"toc\"></div> \endhtmlonly" \
"cgalTagTrue=\link CGAL::Tag_true `CGAL::Tag_true`\endlink" \
"cgalTagFalse=\link CGAL::Tag_false `CGAL::Tag_false`\endlink" \
"cgalHeading{1}= <B>\1</B><BR>" \
"cgalClassifedRefPages=\htmlonly <h2 class=\"groupheader\">Classified Reference Pages</h2> \endhtmlonly" \
"cgalClassifedRefPages=\htmlonly[block] <h2 class=\"groupheader\">Classified Reference Pages</h2> \endhtmlonly" \
"cgalCite{1}=<!-- -->\cite \1"
# This tag can be used to specify a number of word-keyword mappings (TCL only).

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>

View File

@ -1,5 +1,5 @@
<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/png" href="$relpath$../Manual/g-196x196-doc.png"/>

View File

@ -1,5 +1,5 @@
<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/png" href="$relpath$../Manual/g-196x196-doc.png"/>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/png" href="$relpath$../Manual/g-196x196-doc.png"/>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/png" href="$relpath$../Manual/g-196x196-doc.png"/>

View File

@ -62,7 +62,7 @@ def conceptify_ns(d):
def write_out_html(d, fn):
f = codecs.open(fn, 'w', encoding='utf-8')
# this is the normal doxygen doctype, which is thrown away by pyquery
f.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n')
f.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n')
f.write('<html xmlns=\"http://www.w3.org/1999/xhtml\">')
f.write(d.html())
f.write('\n')

View File

@ -69,19 +69,19 @@ public:
result_type
operator()(const Segment_2 &s, const Segment_2& t) const
{
return internal::do_intersect(s,t, SFK());
return Intersections::internal::do_intersect(s,t, SFK());
}
result_type
operator()(const Point_2 &p, const Segment_2& t) const
{
return internal::do_intersect(p,t, SFK());
return Intersections::internal::do_intersect(p,t, SFK());
}
result_type
operator()(const Segment_2& t, const Point_2 &p) const
{
return internal::do_intersect(p,t, SFK());
return Intersections::internal::do_intersect(p,t, SFK());
}
};

View File

@ -30,7 +30,7 @@
#include <CGAL/internal/Static_filters/Static_filter_error.h>
#include <CGAL/internal/Static_filters/tools.h>
#include <CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h>
#include <CGAL/Intersections_3/Bbox_3_Segment_3.h>
// for CGAL::internal::do_intersect_bbox_segment_aux
#include <iostream>
@ -89,13 +89,13 @@ public:
result_type
operator()(const Segment_3 &s, const Triangle_3& t) const
{
return internal::do_intersect(t,s, SFK());
return Intersections::internal::do_intersect(t,s, SFK());
}
result_type
operator()(const Triangle_3& t, const Segment_3 &s) const
{
return internal::do_intersect(t,s, SFK());
return Intersections::internal::do_intersect(t,s, SFK());
}
result_type
@ -124,7 +124,7 @@ public:
CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
const Uncertain<result_type> ub =
do_intersect_bbox_segment_aux
Intersections::internal::do_intersect_bbox_segment_aux
<double,
true, // bounded at t=0
true, // bounded at t=1
@ -167,7 +167,7 @@ public:
CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
const Uncertain<result_type> ub =
do_intersect_bbox_segment_aux
Intersections::internal::do_intersect_bbox_segment_aux
<double,
true, // bounded at t=0
false,// not bounded at t=1

View File

@ -277,7 +277,7 @@ triangle (2D and 3D) and in tetrahedra (3D). Basically, in order to generate
a random point in a \f$N\f$-simplex (a triangle for \f$N = 2\f$, and tetrahedron
for \f$N = 3\f$), we generate numbers \f$a_1,a_2,\ldots,a_N\f$ identically and independently
uniformly distributed in \f$(0,1)\f$, we sort them, we let \f$a_0 = 0\f$ and \f$a_{N+1} = 1\f$,
and then \f$a_{i+1}a_i\f$, for \f$i = 1,\ldots,N\f$ becomes its
and then \f$a_{i+1}-a_i\f$, for \f$i = 1,\ldots,N\f$ becomes its
barycentric coordinates with respect to the simplex.
Maxime Gimemo introduced the random generators on 2D and 3D triangle meshes.

View File

@ -151,6 +151,7 @@ void
Random_points_in_cube_d<P>::
generate_point() {
typedef typename Kernel_traits<P>::Kernel::RT RT;
CGAL_assume(dimension>0);
std::vector<RT> coord(dimension);
for(int i=0; i<dimension; ++i)
coord[i]=RT(this->d_range * ( 2 * this->_rnd.get_double() - 1.0));

View File

@ -288,8 +288,10 @@ int main()
Polyhedron polyhedron;
// A cube
make_hexahedron(Point_3(-0.5,-0.5,-0.5), Point_3(0.5,-0.5,-0.5), Point_3(0.5,0.5,-0.5), Point_3(-0.5,0.5,-0.5),
Point_3(-0.5,0.5,0.5), Point_3(-0.5,-0.5,0.5), Point_3(0.5,-0.5,0.5), Point_3(0.5,0.5,0.5),
make_hexahedron(
Point_3(-0.5,-0.5,-0.5), Point_3(0.5,-0.5,-0.5), Point_3(0.5,0.5,-0.5),
Point_3(-0.5,0.5,-0.5), Point_3(-0.5,0.5,0.5), Point_3(-0.5,-0.5,0.5),
Point_3(0.5,-0.5,0.5), Point_3(0.5,0.5,0.5),
polyhedron);
boost::graph_traits<Polyhedron>::halfedge_descriptor facets[6];

View File

@ -363,19 +363,6 @@ operator<<(Geomview_stream& gs, const Bbox_2& b);
Geomview_stream&
operator<<(Geomview_stream& gs, const Bbox_3& b);
/*!
Inserts the bounding box `b` into the stream `gs`.
\relates Geomview_stream
*/
Geomview_stream&
operator<<(Geomview_stream& gs, const Bbox_3& b);
/*!
Inserts the bounding box `b` into the stream `gs`.
\relates Geomview_stream
*/
Geomview_stream&
operator<<(Geomview_stream& gs, const Bbox_3& b);
/// @}

View File

@ -85,8 +85,8 @@ public:
FT delta_x = pp2->x() - pp1->x();
FT delta_y = pp2->y() - pp1->y();
FT sign_x = CGAL::sign(delta_x);
FT sign_y = CGAL::sign(delta_y);
FT sign_x = (int)CGAL::sign(delta_x);
FT sign_y = (int)CGAL::sign(delta_y);
FT abs_x = CGAL::abs(delta_x);
FT abs_y = CGAL::abs(delta_y);

View File

@ -0,0 +1,70 @@
/*!
\ingroup PkgHeatMethodConcepts
\cgalConcept
The concept `HeatMethodTraits_3` describes the types,
predicates, and constructions required by the traits class parameter of
`CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3`.
\cgalHasModel All the \cgal kernels
*/
class HeatMethodTraits_3
{
public:
/// \name Types
/// @{
// The number type. It must be `CopyConstructible` and `DefaultConstructible`,
// and be constructible from `double`.
typedef unspecified_type FT;
/// The 3D point type. It must be `CopyConstructible` and `DefaultConstructible`,
/// and have a constructor with three parameters of a type constructibe from `double`.
typedef unspecified_type Point_3;
/// The 3D vector type. It must be `CopyConstructible` and `DefaultConstructible`,
/// and have a constructor with three parameters of a type constructibe from `double`.
typedef unspecified_type Vector_3;
/// Functor with operator: `Vector_3 operator()(const Point_3& from, const Point_3& to) const`, which constructs the vector from `to - from` .
typedef unspecified_type Construct_vector_3;
/// Functor with operator: `Vector_3 operator()(const Vector_3& v, const Vector_3& w) const`, which constructs the vector `v + w`.
typedef unspecified_type Construct_sum_of_vectors_3;
/// Functor with operator: `Vector_3 operator()(const Vector_3& v, double d) const`, which constructs the vector `d * v`.
typedef unspecified_type Construct_scaled_vector_3;
/// Functor with operator: `Vector_3 operator()(const Vector_3& v, const Vector_3& w) const`, which constructs the cross product of `v` and `w`.
typedef unspecified_type Construct_cross_product_vector_3;
/// Functor with operator: `FT operator()(const Vector_3& v, const Vector_3& w) const, which constructs the scalar product of `v` and `w`.
typedef unspecified_type Compute_scalar_product_3;
/// Functor with operator: `FT operator()(const Point_3& p, const Point_3& q) const` which computes the squared distance between `p` and `q`.
typedef unspecified_type Compute_squared_distance_3;
/// @}
/*! \name Operations
For each of the above function object types,
`Func_obj_type`, a function must exist with the name
`func_obj_type_object` that creates an instance of the function or
predicate object type. For example:
*/
/// @{
/*!
*/
Construct_vector_3 construct_vector_3_object();
/// @}
};

View File

@ -0,0 +1,2 @@
@INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS}
PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - The Heat Method"

View File

@ -0,0 +1,256 @@
namespace CGAL {
/*!
\mainpage User Manual
\anchor Chapter_HeatMethod
\cgalAutoToc
\author Christina Vaz, Keenan Crane, Andreas Fabri
\image html octopus.png
\section sec_HM_introduction Introduction
The <em>heat method</em> is an algorithm that solves the single- or
multiple-source shortest path problem by returning an approximation of the
<em>geodesic distance</em> for all vertices of a triangle mesh to the closest vertex in a given set of
source vertices. The geodesic distance between two vertices of a mesh
is the distance when walking on the surface, potentially through the interior of faces.
Two vertices that are close in 3D space may be far away on the surface, for example
on neighboring arms of the octopus. In the figures we color code the distance
as a gradient red/green corresponding to close/far from the source vertices.
The heat method is highly efficient, since the algorithm
boils down to two standard sparse linear algebra problems. It is especially
useful in situations where one wishes to perform repeated distance queries
on a fixed domain, since precomputation done for the first query can be re-used.
As a rule of thumb, the method works well on triangle meshes, which are
Delaunay, though in practice may also work fine for meshes that are far from
Delaunay. In order to ensure good behavior, we enable a
preprocessing step that constructs an <em>intrinsic Delaunay triangulation
(iDT)</em>; this triangulation does not change the input geometry, but
generally improves the quality of the solution. The cost of this preprocessing
step roughly doubles the overall preprocessing cost.
\cgalFigureBegin{landscape_meshes, landscape.jpg}
Isolines placed on a mesh without and with iDT remeshing.
\cgalFigureEnd
In the next section we give some examples. Section \ref sec_HM_definitions presents
the mathematical theory of the Heat method. The last section is about the \ref sec_HM_history.
Note that this package depends on the third party \ref thirdpartyEigen library (3.3 or greater), or another
model of the concept `SparseLinearAlgebraWithFactorTraits_d`.
This implementation is based on \cgalCite{cgal:cww-ghnac-13} and \cgalCite{cgal:fsbs-acidt-06}
This package is related to the package \ref PkgSurfaceMeshShortestPath. Both deal with geodesic distances.
The heat method package computes for every vertex of a mesh an approximate distance to one or several source vertices.
The geodesic shortest path package computes the exact shortest path between any two points on the surface.
\section sec_HM_examples Examples
We give examples for the free function `CGAL::Heat_method_3::estimate_geodesic_distances()`,
for the class template `CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3`, with and without the use
of intrinsic Delaunay triangulation.
\subsection HM_example_Free_function Using a Free Function
The first example calls the free function `Heat_method_3::estimate_geodesic_distances()`,
which computes for all vertices of a triangle mesh the distances to a single source vertex.
The distances are written into an internal property map of the surface mesh.
\cgalExample{Heat_method_3/heat_method.cpp}
For a `Polyhedron_3` you can either add a data field to the vertex type, or, as shown
in the following example, create a `boost::unordered_map` and pass it to the function
`boost::make_assoc_property_map()`, which generates a vertex distance property map.
\cgalExample{Heat_method_3/heat_method_polyhedron.cpp}
\subsection HM_example_Class Using the Heat Method Class
The following example shows the heat method class. It can be used
when one adds and removes source vertices. It performs a precomputation,
which depend only on the input mesh and not the particular
set of source vertices. In the example we compute the distances to one
source, add the farthest vertex as a second source vertex, and then compute
the distances with respect to these two sources.
\cgalExample{Heat_method_3/heat_method_surface_mesh.cpp}
\subsection HM_example_Intrinsic Switching off the Intrinsic Delaunay Triangulation
The following example shows the heat method on a triangle mesh without using the
intrinsic Delaunay triangulation (iDT) algorithm, for example because by construction
your meshes have a good quality (Poor quality in this case means that the input
is far from Delaunay, though even in this case one may still get good results without iDT,
depending on the specific geometry of the surface). The iDT algorithm is switched off
by the template parameter `Heat_method_3::Direct`.
\cgalExample{Heat_method_3/heat_method_surface_mesh_direct.cpp}
\section sec_HM_definitions Theoretical Background
Section \ref Subsection_HM_Definitions_Intro gives an overview of the theory needed by the Heat method.
Section \ref Subsection_HM_IDT_Definitions gives the background needed for the Intrinsic Delaunay triangulation.
\subsection Subsection_HM_Definitions_Intro The Heat Method Algorithm
For a detailed overview of the heat method, the reader may consult
\cgalCite{cgal:cww-ghnac-13} to read the original article. In the
sequel, we introduce the basic notions so as to explain our
algorithms. In general, the heat method is applicable to any setting
if there exists a gradient operator \f$ \nabla\f$, a divergence
operator \f$\nabla \cdot\f$ and a Laplace operator \f$\Delta = \nabla \cdot
\nabla\f$, which are standard derivatives from vector calculus.
The Heat Method consists of three main steps:
-# Integrate the heat flow \f$ \dot u = \Delta u\f$ for some fixed time \f$t\f$.
-# Evaluate the vector field \f$ X = -\nabla u_t / |\nabla u_t| \f$.
-# Solve the Poisson Equation \f$ \Delta \phi = \nabla \cdot X \f$.
The function \f$ \phi \f$ is an approximation of the distance to the given source set and approaches the true distance as t goes to zero.
The algorithm must then be translated in to a discrete algorithm by replacing the derivatives in space and time with approximations.
The heat equation can be discretized in time using a single backward Euler step. This means the following equation must be solved:
\f$(id-t\Delta)u_t = \delta_{\gamma}(x) \f$ where \f$\delta_{\gamma}(x)\f$ is a Dirac delta encoding an "infinite" spike of heat (1 if x is in the source set \f$\gamma\f$, 0 otherwise), where id is the identity operator.
The spatial discretization depends on the choice of discrete surface representation.
For this package, we use triangle meshes exclusively.
Let \f$ u \in \R^{|V|}\f$ specify a piecewise linear function on a
triangulated surface with vertices \f$V\f$, edges \f$E\f$ and faces
\f$F\f$. A standard discretization of the Laplacian at vertex \f$i\f$
is:
\f$ {Lu}_i = \frac{1}{2A_i} \sum_{j}(cot \alpha_{ij} + cot \beta_{ij})(u_j-u_i)\f$ where \f$A_i\f$ is one third the area of all triangles incident on vertex \f$i\f$.
The sum is taken over all of the neighboring vertices
\f$j\f$. Further, \f$\alpha_{ij}\f$ and \f$\beta_{ij}\f$ are the
angles opposing the corresponding edge \f$ij\f$. We express this
operation via a matrix \f$L = M^{-1}L_c\f$ where \f$M \in
R^{|V|x|V|}\f$ is a diagonal matrix containing the vertex areas and
\f$L_c \in R^{|V|x|V|} \f$ is the cotan operator representing the
remaining sum.
From this, the symmetric positive-definite system
\f$(M-tL_C)u = \delta_{\gamma}\f$ can be solved to find
\f$u\f$ where \f$\delta_{\gamma}\f$ is the Kronecker delta over \f$\gamma\f$.
Next, the gradient in a given triangle can be expressed as
\f$\nabla u = \frac{1}{2 A_f} \sum_i u_i ( N \times e_i ) \f$
where \f$A_f\f$ is the area of the triangle, \f$N\f$ is its outward unit normal, \f$e_i\f$ is the \f$i\f$th edge vector (oriented counter-clockwise), and \f$u_i\f$ is the value of \f$u\f$ at the opposing vertex. The integrated divergence associated with vertex \f$i\f$ can be written as
\f$\nabla \cdot X = \frac{1}{2} \sum_j cot\theta_1 (e_1 \cdot X_j) + cot \theta_2 (e_2 \cdot X_j)\f$
where the sum is taken over incident triangles \f$j\f$ each with a vector \f$X_j\f$,
\f$e_1\f$ and \f$e_2\f$ are the two edge vectors of triangle \f$j\f$
containing \f$i\f$ and \f$\theta_1\f$, \f$\theta_2\f$ are the opposing angles.
Finally, let \f$b \in R^{|V|}\f$ be the integrated divergences of the normalized vector field X.
Thus, solving the symmetric Poisson problem \f$ L_c \phi = b\f$ computes the final distance function.
\subsection Subsection_HM_IDT_Definitions Intrinsic Delaunay Triangulation
The standard discretization of the cotan Laplace operator uses the cotangents of the angles in the triangle mesh.
The intrinsic Delaunay algorithm constructs an alternative triangulation of the same polyhedral surface, which
in turn yields a different (typically more accurate) cotan Laplace operator. Conceptually, the edges of the iDT
still connect pairs of vertices from the original (input) surface, but are now allowed to be geodesic paths along
the polyhedron and do not have to correspond to edges of the input triangulation. These paths are not stored
explicitly; instead, we simply keep track of their lengths as the triangulation is updated. These lengths are
sufficient to determine areas and angles of the intrinsic triangles, and in turn, the new cotan Laplace matrix.
An edge of a mesh is locally Delaunay if the sum of opposite angles is not smaller than pi, or equivalently,
if the cotangents of the opposing angles are non-negative. A mesh is Delaunay if all of its edges are locally Delaunay.
A standard algorithm to convert a given planar triangulation into a Delaunay triangulation is
to flip non-Delaunay edges in a mesh until the mesh is Delaunay.
Similarly, the intrinsic Delaunay triangulation of a simplicial surface
is constructed by performing intrinsic edge flips.
Let \f$ K = (V,E,T) \f$ be a 2-manifold triangle mesh, where \f$V\f$ is the vertex set,
\f$ E \f$ is the edge set and \f$ T \f$ is the face set (triangle set).
Let \f$ L \f$ be the set of Euclidean distances, where \f$ L(e_{ij}) = l_{ij} = || p_i - p_j || \f$ ,
where \f$ p_i \f$ and \f$ p_j \f$ are the point positions \f$ \in R^3 \f$ of vertices \f$ i \f$ and \f$ j \f$ respectively.
Then, let the pair \f$ (K,L) \f$ be the input to the iDT algorithm, which returns the pair \f$(\tilde K, \tilde L)\f$,
which are the intrinsic Delaunay mesh and the intrinsic lengths.
The algorithm is as follows:
\code
for all edge e in E : Mark(e)
Stack s <-- E
while !Empty(s) do
edge(ij) = Pop(s) and Unmark(edge(ij))
if !Delaunay(edge(ij)) then
edge(kl) = Flip(edge(ij)) and compute the new length length(kl) using the Cosine Theorem
for all edge e in {edge(kj), edge(jl), edge(li), edge(ik)} do
if !Mark(e) then
Mark(e) and Push(s,e)
end if
end for
end if
end while
return (~K,~L)
\endcode
The new \f$(\tilde K, \tilde L)\f$ are then used to implement the heat method as usual.
We already in the beginning gave an example where the intrinsic Delaunay triangulation improves the results.
The mesh was obtained by giving elevation to a 2D triangulation, which lead to highly elongated triangles.
The situation is similar for any triangle mesh that has faces with very small angles as can be seen in the figures below.
\cgalFigureBegin{circle_box, red_circle_box_without_idt_bottom.png}
Isolines placed on a mesh without iDT remeshing
\cgalFigureEnd
\cgalFigureBegin{circle_box_idt, red_circle_box_with_idt_bottom.png}
Isolines placed on a mesh with iDT remeshing
\cgalFigureEnd
\section sec_HM_Performance Performance
The time complexity of the algorithm is determined primarily by the
choice of linear solver. In the current implementation, Cholesky
prefactorization is roughly \f$ O(N^{1.5})\f$ and computation of distances is
roughly \f$ O(N)\f$, where \f$ N\f$ is the number of vertices in the triangulation.
The algorithm uses two \f$ N \times N\f$ matrices, both with the same pattern of
non-zeros (in average 7 non-zeros
per row/column). The cost of computation is independent of the size
of the source set. Primitive operations include sparse numerical
linear algebra (in double precision), and basic arithmetic operations
(including square roots).
We perform the benchmark on an Intel Core i7-7700HQ, 2.8HGz, and compiled with Visual Studio 2013.
<center>
Number of triangles | Initialization iDT (sec) | Distance computation iDT (sec) | Initialization Direct (sec) | Distance computation Direct (sec)
--------------------:| ----------- : | ---------------- : | ------------------: | --------------:
30,000 | 0.18 | 0.02 | 0.12 | 0.01
200,000 | 1.82 | 1.31 | 1.32 | 0.11
500,000 | 10.45 | 0.75 | 8.07 | 0.55
1,800,000 | 38.91 | 2.24 | 35.68 | 1.1
</center>
\section sec_HM_history Implementation History
This package was developed by Christina Vaz, Keenan Crane and Andreas
Fabri as a project of the Google Summer of Code 2018.
*/
} /* namespace CGAL */

View File

@ -0,0 +1,48 @@
// The Heat Method
/// \defgroup PkgHeatMethod Heat Method Reference
/// \defgroup PkgHeatMethodConcepts Concepts
/// \ingroup PkgHeatMethod
/*!
\addtogroup PkgHeatMethod
\cgalPkgDescriptionBegin{The Heat Method,PkgHeatMethodSummary}
\cgalPkgPicture{heat-method-small.png}
\cgalPkgSummaryBegin
\cgalPkgAuthors{Keenan Crane, Christina Vaz, Andreas Fabri}
\cgalPkgDesc{The package provides an algorithm that solves the single- or
multiple-source shortest path problem by returning an approximation of the geodesic distance
for all vertices of a triangle mesh to the closest vertex in a given set of
source vertices. }
\cgalPkgManuals{Chapter_HeatMethod,PkgHeatMethod}
\cgalPkgSummaryEnd
\cgalPkgShortInfoBegin
\cgalPkgSince{4.14}
\cgalPkgDependsOn{ \ref PkgSolverInterface}
\cgalPkgBib{cgal:cvf-hm3}
\cgalPkgLicense{\ref licensesGPL "GPL"}
\cgalPkgDemo{Polyhedron demo,polyhedron_3.zip}
\cgalPkgShortInfoEnd
\cgalPkgDescriptionEnd
\cgalClassifedRefPages
## Concepts ##
- `HeatMethodTraits_3`
## Classes ##
- `CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3`
- `CGAL::Heat_method_3::Direct`
- `CGAL::Heat_method_3::Intrinsic_Delaunay`
## Functions ##
- `CGAL::Heat_method_3::estimate_geodesic_distances()`
*/

View File

@ -0,0 +1,11 @@
Manual
Kernel_23
STL_Extension
Algebraic_foundations
Circulator
Stream_support
Surface_mesh
Surface_mesh_shortest_path
Solver_interface
BGL
Polyhedron

View File

@ -0,0 +1,6 @@
/*!
\example Heat_method_3/heat_method.cpp
\example Heat_method_3/heat_method_polyhedron.cpp
\example Heat_method_3/heat_method_surface_mesh.cpp
\example Heat_method_3/heat_method_surface_mesh_direct.cpp
*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View File

@ -0,0 +1,59 @@
# Created by the script cgal_create_CMakeLists
# This is the CMake script for compiling a set of CGAL applications.
project( Heat_method_3_Examples )
cmake_minimum_required(VERSION 2.8.11)
# CGAL and its components
find_package( CGAL QUIET COMPONENTS )
if ( NOT CGAL_FOUND )
message(STATUS "This project requires the CGAL library, and will not be compiled.")
return()
endif()
# include helper file
include( ${CGAL_USE_FILE} )
# Boost and its components
find_package( Boost REQUIRED )
if ( NOT Boost_FOUND )
message(STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
find_package(Eigen3 3.3.0)
if (EIGEN3_FOUND)
include( ${EIGEN3_USE_FILE} )
else()
message(STATUS "This project requires the Eigen library (3.3 or greater), and will not be compiled.")
return()
endif()
# include for local directory
include_directories( BEFORE include )
# Creating entries for all C++ files with "main" routine
# ##########################################################
include( CGAL_CreateSingleSourceCGALProgram )
create_single_source_cgal_program( "heat_method.cpp" )
create_single_source_cgal_program( "heat_method_polyhedron.cpp" )
create_single_source_cgal_program( "heat_method_surface_mesh.cpp" )
create_single_source_cgal_program( "heat_method_surface_mesh_direct.cpp" )

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,41 @@
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h>
#include <iostream>
#include <fstream>
#include <boost/foreach.hpp>
typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_3 Point_3;
typedef CGAL::Surface_mesh<Point_3> Triangle_mesh;
typedef boost::graph_traits<Triangle_mesh>::vertex_descriptor vertex_descriptor;
typedef Triangle_mesh::Property_map<vertex_descriptor,double> Vertex_distance_map;
int main(int argc, char* argv[])
{
Triangle_mesh tm;
const char* filename = (argc > 1) ? argv[1] : "./data/elephant.off";
std::ifstream input(filename);
if (!input || !(input >> tm) || tm.is_empty()) {
std::cerr << "Not a valid off file." << std::endl;
return 1;
}
//property map for the distance values to the source set
Vertex_distance_map vertex_distance = tm.add_property_map<vertex_descriptor, double>("v:distance", 0).first;
vertex_descriptor source = *(vertices(tm).first);
CGAL::Heat_method_3::estimate_geodesic_distances(tm, vertex_distance, source) ;
std::cout << "Source vertex " << source << " at: " << tm.point(source) << std::endl;
BOOST_FOREACH(vertex_descriptor vd , vertices(tm)){
std::cout << vd << " ("<< tm.point(vd) << ")"
<< " is at distance " << get(vertex_distance, vd) << std::endl;
}
return 0;
}

View File

@ -0,0 +1,41 @@
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h>
#include <fstream>
#include <iostream>
#include <boost/unordered_map.hpp>
#include <boost/foreach.hpp>
typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_3 Point_3;
typedef CGAL::Polyhedron_3<Kernel> Triangle_mesh;
typedef boost::graph_traits<Triangle_mesh>::vertex_descriptor vertex_descriptor;
int main(int argc, char* argv[])
{
Triangle_mesh tm;
const char* filename = (argc > 1) ? argv[1] : "./data/elephant.off";
std::ifstream input(filename);
if (!input || !(input >> tm) || tm.is_empty()) {
std::cerr << "Not a valid off file." << std::endl;
return 1;
}
// map for the distance values to the source set
boost::unordered_map<vertex_descriptor, double> vertex_distance;
vertex_descriptor source = *(vertices(tm).first);
CGAL::Heat_method_3::estimate_geodesic_distances(tm,
boost::make_assoc_property_map(vertex_distance),
source) ;
std::cout << "Source vertex at: " << source->point() << std::endl;
BOOST_FOREACH(vertex_descriptor vd , vertices(tm)){
std::cout << vd->point() << " is at distance " << vertex_distance[vd] << std::endl;
}
return 0;
}

View File

@ -0,0 +1,64 @@
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h>
#include <fstream>
#include <iostream>
#include <boost/foreach.hpp>
typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_3 Point_3;
typedef CGAL::Surface_mesh<Point_3> Triangle_mesh;
typedef boost::graph_traits<Triangle_mesh>::vertex_descriptor vertex_descriptor;
typedef Triangle_mesh::Property_map<vertex_descriptor,double> Vertex_distance_map;
typedef CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3<Triangle_mesh> Heat_method;
int main(int argc, char* argv[])
{
Triangle_mesh tm;
const char* filename = (argc > 1) ? argv[1] : "./data/sphere.off";
std::ifstream input(filename);
if (!input || !(input >> tm) || tm.is_empty()) {
std::cerr << "Not a valid off file." << std::endl;
return 1;
}
//property map for the distance values to the source set
Vertex_distance_map vertex_distance = tm.add_property_map<vertex_descriptor, double>("v:distance", 0).first;
Heat_method hm(tm);
//add the first vertex as the source set
vertex_descriptor source = *(vertices(tm).first);
hm.add_source(source);
hm.estimate_geodesic_distances(vertex_distance);
Point_3 sp = tm.point(source);
std::cout << "source: " << sp << " " << source << std::endl;
vertex_descriptor far;
double sdistance = 0;
BOOST_FOREACH(vertex_descriptor vd , vertices(tm)){
std::cout << vd << " is at distance " << get(vertex_distance, vd) << " to " << source << std::endl;
if(get(vertex_distance, vd) > sdistance){
far = vd;
sdistance = get(vertex_distance, vd);
}
}
std::cout << "far: " << tm.point(far) << " " << far << std::endl;
hm.add_source(far);
hm.estimate_geodesic_distances(vertex_distance);
BOOST_FOREACH(vertex_descriptor vd , vertices(tm)){
std::cout << vd << " is at distance " << get(vertex_distance, vd) << "to the set of two sources" << std::endl;
}
std::cout << "done" << std::endl;
return 0;
}

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