constness problems with CGAL::Polyhedron_3. The problem with edges(G) persists :<

This commit is contained in:
Andreas Fabri 2014-06-05 16:12:03 +02:00
parent 9f99e88cbc
commit 84208ee628
2 changed files with 9 additions and 3 deletions

View File

@ -465,6 +465,11 @@ struct vertex_property_type<CGAL::Polyhedron_3<Gt,I,HDS,A> >
typedef CGAL::vertex_point_t type;
};
template<class Gt, class I, CGAL_HDS_PARAM_, class A>
struct vertex_property_type<const CGAL::Polyhedron_3<Gt,I,HDS,A> >
{
typedef CGAL::vertex_point_t type;
};
} // namespace boost

View File

@ -42,9 +42,10 @@ sdf_values( const Polyhedron& polyhedron,
bool postprocess = true,
GeomTraits traits = GeomTraits())
{
typedef boost::property_map<Polyhedron, boost::vertex_point_t>::type VPMap;
typedef boost::property_map<Polyhedron, vertex_point_t>::type VPMap;
VPMap vpm = get(vertex_point,const_cast<Polyhedron&>(polyhedron));
internal::Surface_mesh_segmentation<Polyhedron, GeomTraits, VPMap,Fast_sdf_calculation_mode>
algorithm(polyhedron, traits, get(vertex_point,polyhedron));
algorithm(polyhedron, traits,vpm);
return algorithm.calculate_sdf_values(cone_angle, number_of_rays,
sdf_values_map, postprocess);
}
@ -177,7 +178,7 @@ segmentation_from_sdf_values( const Polyhedron& polyhedron,
{
typedef boost::property_map<Polyhedron, boost::vertex_point_t>::type VPMap;
internal::Surface_mesh_segmentation<Polyhedron, GeomTraits, VPMap> algorithm(
polyhedron, traits, get(vertex_point,polyhedron));
polyhedron, traits, get(vertex_point,const_cast<Polyhedron&>(polyhedron)));
return algorithm.partition(number_of_clusters, smoothing_lambda, sdf_values_map,
segment_ids, !output_cluster_ids);
}