mirror of https://github.com/CGAL/cgal
constness problems with CGAL::Polyhedron_3. The problem with edges(G) persists :<
This commit is contained in:
parent
9f99e88cbc
commit
84208ee628
|
|
@ -465,6 +465,11 @@ struct vertex_property_type<CGAL::Polyhedron_3<Gt,I,HDS,A> >
|
||||||
typedef CGAL::vertex_point_t type;
|
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
|
} // namespace boost
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,10 @@ sdf_values( const Polyhedron& polyhedron,
|
||||||
bool postprocess = true,
|
bool postprocess = true,
|
||||||
GeomTraits traits = GeomTraits())
|
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>
|
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,
|
return algorithm.calculate_sdf_values(cone_angle, number_of_rays,
|
||||||
sdf_values_map, postprocess);
|
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;
|
typedef boost::property_map<Polyhedron, boost::vertex_point_t>::type VPMap;
|
||||||
internal::Surface_mesh_segmentation<Polyhedron, GeomTraits, VPMap> algorithm(
|
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,
|
return algorithm.partition(number_of_clusters, smoothing_lambda, sdf_values_map,
|
||||||
segment_ids, !output_cluster_ids);
|
segment_ids, !output_cluster_ids);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue