mirror of https://github.com/CGAL/cgal
Small corrections on examples
This commit is contained in:
parent
166034aac6
commit
a743b4d572
|
|
@ -50,5 +50,4 @@ int main(int argc, char **argv)
|
|||
{
|
||||
std::cout << sdf_property_map[facet_it] - sdf_property_map_2[facet_it] << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -20,7 +20,7 @@ int main(int argc, char **argv)
|
|||
std::ifstream(argv[1]) >> mesh;
|
||||
|
||||
// create a property-map for segment-ids (it is an adaptor for this case)
|
||||
typedef std::map<Polyhedron::Facet_const_iterator, int> Facet_int_map;
|
||||
typedef std::map<Polyhedron::Facet_const_handle, int> Facet_int_map;
|
||||
Facet_int_map internal_segment_map;
|
||||
boost::associative_property_map<Facet_int_map> segment_property_map(internal_segment_map);
|
||||
|
||||
|
|
@ -33,5 +33,4 @@ int main(int argc, char **argv)
|
|||
{
|
||||
std::cout << segment_property_map[facet_it] << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -28,7 +28,7 @@ int main(int argc, char **argv)
|
|||
CGAL::sdf_values_computation(mesh, sdf_property_map);
|
||||
|
||||
// create a property-map for segment-ids (it is an adaptor for this case)
|
||||
typedef std::map<Polyhedron::Facet_const_iterator, int> Facet_int_map;
|
||||
typedef std::map<Polyhedron::Facet_const_handle, int> Facet_int_map;
|
||||
Facet_int_map internal_segment_map;
|
||||
boost::associative_property_map<Facet_int_map> segment_property_map(internal_segment_map);
|
||||
|
||||
|
|
@ -49,5 +49,4 @@ int main(int argc, char **argv)
|
|||
// This feature becomes important when we want to segment the mesh several times with different parameters.
|
||||
CGAL::surface_mesh_segmentation_from_sdf_values(
|
||||
mesh, sdf_property_map, segment_property_map, number_of_levels, smoothing_lambda);
|
||||
|
||||
}
|
||||
|
|
@ -89,9 +89,15 @@ void surface_mesh_segmentation(const Polyhedron& polyhedron,
|
|||
double smoothing_lambda = CGAL_DEFAULT_SMOOTHING_LAMBDA)
|
||||
{
|
||||
|
||||
Surface_mesh_segmentation<Polyhedron> algorithm(polyhedron);
|
||||
algorithm.calculate_sdf_values(cone_angle, number_of_rays);
|
||||
algorithm.partition(segment_ids, number_of_levels, smoothing_lambda);
|
||||
typedef std::map<Polyhedron::Facet_const_handle, double> Facet_double_map;
|
||||
Facet_double_map internal_sdf_map;
|
||||
boost::associative_property_map<Facet_double_map> sdf_property_map(
|
||||
internal_sdf_map);
|
||||
|
||||
sdf_values_computation(polyhedron, sdf_property_map, cone_angle,
|
||||
number_of_rays);
|
||||
surface_mesh_segmentation_from_sdf_values(
|
||||
polyhedron, sdf_property_map, segment_ids, number_of_levels, smoothing_lambda);
|
||||
}
|
||||
|
||||
}//namespace CGAL
|
||||
|
|
|
|||
Loading…
Reference in New Issue