mirror of https://github.com/CGAL/cgal
fix warnings and compilation error + add missing overload
This commit is contained in:
parent
63afe3e2f9
commit
991e2a453d
|
|
@ -996,12 +996,35 @@ void
|
||||||
estimate_geodesic_distances(const TriangleMesh& tm,
|
estimate_geodesic_distances(const TriangleMesh& tm,
|
||||||
VertexDistanceMap vdm,
|
VertexDistanceMap vdm,
|
||||||
const VertexConstRange& sources,
|
const VertexConstRange& sources,
|
||||||
Mode)
|
Mode
|
||||||
|
#ifndef DOXYGEN_RUNNING
|
||||||
|
, typename boost::enable_if<
|
||||||
|
typename boost::has_range_const_iterator<VertexConstRange>
|
||||||
|
>::type* = 0
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3<TriangleMesh, Mode> hm(tm);
|
CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3<TriangleMesh, Mode> hm(tm);
|
||||||
hm.add_sources(sources);
|
hm.add_sources(sources);
|
||||||
hm.estimate_geodesic_distances(vdm);
|
hm.estimate_geodesic_distances(vdm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DOXYGEN_RUNNING
|
||||||
|
template <typename TriangleMesh, typename VertexDistanceMap, typename VertexConstRange>
|
||||||
|
void
|
||||||
|
estimate_geodesic_distances(const TriangleMesh& tm,
|
||||||
|
VertexDistanceMap vdm,
|
||||||
|
const VertexConstRange& sources,
|
||||||
|
typename boost::enable_if<
|
||||||
|
typename boost::has_range_const_iterator<VertexConstRange>
|
||||||
|
>::type* = 0)
|
||||||
|
{
|
||||||
|
CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3<TriangleMesh, Direct> hm(tm);
|
||||||
|
hm.add_sources(sources);
|
||||||
|
hm.estimate_geodesic_distances(vdm);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace Heat_method_3
|
} // namespace Heat_method_3
|
||||||
|
|
|
||||||
|
|
@ -17,13 +17,13 @@ typedef boost::graph_traits<Surface_mesh>::vertex_descriptor vertex_descriptor;
|
||||||
typedef Surface_mesh::Property_map<vertex_descriptor,double> Vertex_distance_map;
|
typedef Surface_mesh::Property_map<vertex_descriptor,double> Vertex_distance_map;
|
||||||
typedef CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3<Surface_mesh,
|
typedef CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3<Surface_mesh,
|
||||||
CGAL::Heat_method_3::Intrinsic_Delaunay,
|
CGAL::Heat_method_3::Intrinsic_Delaunay,
|
||||||
CGAL::Eigen_solver_traits<Eigen::SimplicialLDLT<CGAL::Eigen_sparse_matrix<double>::EigenType > >,
|
|
||||||
boost::property_map< Surface_mesh, CGAL::vertex_point_t>::const_type,
|
boost::property_map< Surface_mesh, CGAL::vertex_point_t>::const_type,
|
||||||
|
CGAL::Eigen_solver_traits<Eigen::SimplicialLDLT<CGAL::Eigen_sparse_matrix<double>::EigenType > >,
|
||||||
Kernel> Heat_method;
|
Kernel> Heat_method;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main()
|
||||||
{
|
{
|
||||||
//read in mesh
|
//read in mesh
|
||||||
Surface_mesh sm;
|
Surface_mesh sm;
|
||||||
|
|
@ -38,10 +38,10 @@ int main(int argc, char* argv[])
|
||||||
hm.add_source(source);
|
hm.add_source(source);
|
||||||
hm.estimate_geodesic_distances(heat_intensity);
|
hm.estimate_geodesic_distances(heat_intensity);
|
||||||
|
|
||||||
Point_3 sp = sm.point(source);
|
//Point_3 sp = sm.point(source);
|
||||||
|
|
||||||
vertex_descriptor far;
|
vertex_descriptor far;
|
||||||
double sdistance = 0;
|
// double sdistance = 0;
|
||||||
|
|
||||||
BOOST_FOREACH(vertex_descriptor vd , vertices(sm)){
|
BOOST_FOREACH(vertex_descriptor vd , vertices(sm)){
|
||||||
std::cout << vd << " is at distance " << get(heat_intensity, vd) << " from " << source << std::endl;
|
std::cout << vd << " is at distance " << get(heat_intensity, vd) << " from " << source << std::endl;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue