mirror of https://github.com/CGAL/cgal
use Default for template parameters
This commit is contained in:
parent
c5123bcd29
commit
3cc96b3c3c
|
|
@ -741,26 +741,71 @@ struct Base_helper<TriangleMesh, Traits, Intrinsic_Delaunay, LA, VertexPointMap>
|
||||||
* \tparam VertexPointMap a model of `ReadablePropertyMap` with
|
* \tparam VertexPointMap a model of `ReadablePropertyMap` with
|
||||||
* `boost::graph_traits<TriangleMesh>::%vertex_descriptor` as key and
|
* `boost::graph_traits<TriangleMesh>::%vertex_descriptor` as key and
|
||||||
* `Traits::Point_3` as value type.
|
* `Traits::Point_3` as value type.
|
||||||
* The default is `typename boost::property_map<TriangleMesh, vertex_point_t>::%type`.
|
* The default is `typename boost::property_map< TriangleMesh, vertex_point_t>::%const_type`.
|
||||||
* \tparam LA a model of `SparseLinearAlgebraWithFactorTraits_d`.
|
* \tparam LA a model of `SparseLinearAlgebraWithFactorTraits_d`. If `CGAL_EIGEN3_ENABLED` is defined
|
||||||
* \tparam Traits a model of `HeatMethodTraits_3`
|
* `Eigen_solver_traits<Eigen::SimplicialLDLT<typename Eigen_sparse_matrix<double>::%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 <typename TriangleMesh,
|
template <typename TriangleMesh,
|
||||||
typename Mode = Direct,
|
typename Mode = Direct,
|
||||||
typename VertexPointMap = typename boost::property_map< TriangleMesh, vertex_point_t>::const_type,
|
typename VertexPointMap = Default,
|
||||||
#ifdef CGAL_EIGEN3_ENABLED
|
|
||||||
typename LA = Eigen_solver_traits<Eigen::SimplicialLDLT<typename Eigen_sparse_matrix<double>::EigenType > >,
|
|
||||||
#else
|
|
||||||
typename LA = Default,
|
typename LA = Default,
|
||||||
#endif
|
typename Traits = Default >
|
||||||
typename Traits = typename Kernel_traits< typename boost::property_traits<VertexPointMap>::value_type>::Kernel >
|
|
||||||
class Surface_mesh_geodesic_distances_3
|
class Surface_mesh_geodesic_distances_3
|
||||||
#ifndef DOXYGEN_RUNNING
|
#ifndef DOXYGEN_RUNNING
|
||||||
: public internal::Base_helper<TriangleMesh, Traits, Mode, LA, VertexPointMap>
|
: public
|
||||||
|
internal::Base_helper<
|
||||||
|
TriangleMesh,
|
||||||
|
typename Default::Get<Traits,
|
||||||
|
typename Kernel_traits<
|
||||||
|
typename boost::property_traits<
|
||||||
|
typename Default::Get<
|
||||||
|
VertexPointMap,
|
||||||
|
typename boost::property_map< TriangleMesh, vertex_point_t>::const_type
|
||||||
|
>::type
|
||||||
|
>::value_type
|
||||||
|
>::Kernel
|
||||||
|
>::type,
|
||||||
|
Mode,
|
||||||
|
#ifdef CGAL_EIGEN3_ENABLED
|
||||||
|
typename Default::Get<
|
||||||
|
LA,
|
||||||
|
Eigen_solver_traits<Eigen::SimplicialLDLT<typename Eigen_sparse_matrix<double>::EigenType > >
|
||||||
|
>::type,
|
||||||
|
#else
|
||||||
|
LA,
|
||||||
|
#endif
|
||||||
|
typename Default::Get<
|
||||||
|
VertexPointMap,
|
||||||
|
typename boost::property_map< TriangleMesh, vertex_point_t>::const_type
|
||||||
|
>::type
|
||||||
|
>
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
typedef internal::Base_helper<TriangleMesh, Traits, Mode, LA, VertexPointMap> Base_helper;
|
// extract real types from Default
|
||||||
|
#ifdef CGAL_EIGEN3_ENABLED
|
||||||
|
typedef typename Default::Get<
|
||||||
|
LA,
|
||||||
|
Eigen_solver_traits<Eigen::SimplicialLDLT<typename Eigen_sparse_matrix<double>::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<Traits,
|
||||||
|
typename Kernel_traits<
|
||||||
|
typename boost::property_traits<Vertex_point_map>::value_type
|
||||||
|
>::Kernel
|
||||||
|
>::type Traits_type;
|
||||||
|
|
||||||
|
typedef internal::Base_helper<TriangleMesh, Traits_type, Mode, LA_type, Vertex_point_map> Base_helper;
|
||||||
|
|
||||||
const typename Base_helper::type& base() const
|
const typename Base_helper::type& base() const
|
||||||
{
|
{
|
||||||
|
|
@ -782,6 +827,8 @@ public:
|
||||||
#else
|
#else
|
||||||
/// a model of `ConstRange` with an iterator that is model of `ForwardIterator` with `vertex_descriptor` as value type.
|
/// a model of `ConstRange` with an iterator that is model of `ForwardIterator` with `vertex_descriptor` as value type.
|
||||||
typedef unspecified_type Vertex_range;
|
typedef unspecified_type Vertex_range;
|
||||||
|
/// Vertex point map type
|
||||||
|
typedef unspecified_type Vertex_point_map;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -794,7 +841,7 @@ public:
|
||||||
/*!
|
/*!
|
||||||
\brief Constructor
|
\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)
|
: Base_helper(tm, vpm)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
@ -875,9 +922,10 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(DOXYGEN_RUNNING) || defined(CGAL_EIGEN3_ENABLED)
|
||||||
/// \ingroup PkgHeatMethod
|
/// \ingroup PkgHeatMethod
|
||||||
/// computes for each vertex of the triangle mesh `tm` the estimated geodesic distance to a given source vertex.
|
/// 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`.
|
/// \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
|
/// 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`
|
/// \tparam VertexDistanceMap a property map model of `WritablePropertyMap`
|
||||||
|
|
@ -916,6 +964,7 @@ estimate_geodesic_distances(const TriangleMesh& tm,
|
||||||
|
|
||||||
/// \ingroup PkgHeatMethod
|
/// \ingroup PkgHeatMethod
|
||||||
/// computes for each vertex of the triangle mesh `tm` the estimated geodesic distance to a given set of source vertices.
|
/// 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`
|
/// \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
|
/// 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`
|
/// \tparam VertexDistanceMap a property map model of `WritablePropertyMap`
|
||||||
|
|
@ -937,7 +986,7 @@ estimate_geodesic_distances(const TriangleMesh& tm,
|
||||||
hm.add_sources(sources);
|
hm.add_sources(sources);
|
||||||
hm.estimate_geodesic_distances(vdm);
|
hm.estimate_geodesic_distances(vdm);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace Heat_method_3
|
} // namespace Heat_method_3
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue