diff --git a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h index 82bef468273..0d93faf3000 100644 --- a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h +++ b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h @@ -739,28 +739,73 @@ struct Base_helper * If `Intrinsic_Delaunay` the type `TriangleMesh` must have an internal property for `vertex_point` * and its value type must be the same as the value type of `VertexPointMap`. * \tparam VertexPointMap a model of `ReadablePropertyMap` with - * `boost::graph_traits::%vertex_descriptor` as key and - * `Traits::Point_3` as value type. - * The default is `typename boost::property_map::%type`. - * \tparam LA a model of `SparseLinearAlgebraWithFactorTraits_d`. - * \tparam Traits a model of `HeatMethodTraits_3` + * `boost::graph_traits::%vertex_descriptor` as key and + * `Traits::Point_3` as value type. + * The default is `typename boost::property_map< TriangleMesh, vertex_point_t>::%const_type`. + * \tparam LA a model of `SparseLinearAlgebraWithFactorTraits_d`. If `CGAL_EIGEN3_ENABLED` is defined + * `Eigen_solver_traits::%EigenType > >` + * is used as default + * \tparam Traits a model of `HeatMethodTraits_3`. The default is the Kernel of the value type + * of the vertex point map (extracted using `Kernel_traits`). * */ template ::const_type, -#ifdef CGAL_EIGEN3_ENABLED - typename LA = Eigen_solver_traits::EigenType > >, -#else + typename VertexPointMap = Default, typename LA = Default, -#endif - typename Traits = typename Kernel_traits< typename boost::property_traits::value_type>::Kernel > + typename Traits = Default > class Surface_mesh_geodesic_distances_3 #ifndef DOXYGEN_RUNNING - : public internal::Base_helper + : public + internal::Base_helper< + TriangleMesh, + typename Default::Get::const_type + >::type + >::value_type + >::Kernel + >::type, + Mode, + #ifdef CGAL_EIGEN3_ENABLED + typename Default::Get< + LA, + Eigen_solver_traits::EigenType > > + >::type, + #else + LA, + #endif + typename Default::Get< + VertexPointMap, + typename boost::property_map< TriangleMesh, vertex_point_t>::const_type + >::type + > #endif { - typedef internal::Base_helper Base_helper; + // extract real types from Default + #ifdef CGAL_EIGEN3_ENABLED + typedef typename Default::Get< + LA, + Eigen_solver_traits::EigenType > > + >::type LA_type; + #else + typedef LA LA_type; + #endif + + typedef typename Default::Get< + VertexPointMap, + typename boost::property_map< TriangleMesh, vertex_point_t>::const_type>::type Vertex_point_map; + typedef + typename Default::Get::value_type + >::Kernel + >::type Traits_type; + + typedef internal::Base_helper Base_helper; const typename Base_helper::type& base() const { @@ -782,6 +827,8 @@ public: #else /// a model of `ConstRange` with an iterator that is model of `ForwardIterator` with `vertex_descriptor` as value type. typedef unspecified_type Vertex_range; + /// Vertex point map type + typedef unspecified_type Vertex_point_map; #endif /*! @@ -794,7 +841,7 @@ public: /*! \brief Constructor */ - Surface_mesh_geodesic_distances_3(const TriangleMesh& tm, VertexPointMap vpm) + Surface_mesh_geodesic_distances_3(const TriangleMesh& tm, Vertex_point_map vpm) : Base_helper(tm, vpm) {} @@ -875,9 +922,10 @@ public: } }; - +#if defined(DOXYGEN_RUNNING) || defined(CGAL_EIGEN3_ENABLED) /// \ingroup PkgHeatMethod /// computes for each vertex of the triangle mesh `tm` the estimated geodesic distance to a given source vertex. +/// This function is provided only if \ref thirdpartyEigen "Eigen" 3.2 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined. /// \tparam TriangleMesh a triangulated surface mesh, model of `FaceListGraph` and `HalfedgeListGraph`. /// It must have an internal vertex point property map with the value type being a 3D point from a cgal Kernel model /// \tparam VertexDistanceMap a property map model of `WritablePropertyMap` @@ -916,6 +964,7 @@ estimate_geodesic_distances(const TriangleMesh& tm, /// \ingroup PkgHeatMethod /// computes for each vertex of the triangle mesh `tm` the estimated geodesic distance to a given set of source vertices. +/// This function is provided only if \ref thirdpartyEigen "Eigen" 3.2 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined. /// \tparam TriangleMesh a triangulated surface mesh, model of `FaceListGraph` and `HalfedgeListGraph` /// It must have an internal vertex point property map with the value type being a 3D point from a cgal Kernel model /// \tparam VertexDistanceMap a property map model of `WritablePropertyMap` @@ -937,7 +986,7 @@ estimate_geodesic_distances(const TriangleMesh& tm, hm.add_sources(sources); hm.estimate_geodesic_distances(vdm); } - +#endif } // namespace Heat_method_3 } // namespace CGAL