print values on one line in the examples

This commit is contained in:
Sébastien Loriot 2013-09-05 10:31:07 +02:00
parent 6665a1247d
commit b5c08b31ed
4 changed files with 12 additions and 7 deletions

View File

@ -34,6 +34,7 @@ int main()
// print segment-ids
for(Polyhedron::Facet_const_iterator facet_it = mesh.facets_begin();
facet_it != mesh.facets_end(); ++facet_it) {
std::cout << segment_property_map[facet_it] << std::endl;
std::cout << segment_property_map[facet_it] << " ";
}
}
std::cout << std::endl;
}

View File

@ -60,8 +60,9 @@ int main()
// access SDF values (with constant-complexity)
for(Polyhedron::Facet_const_iterator facet_it = mesh.facets_begin();
facet_it != mesh.facets_end(); ++facet_it) {
std::cout << sdf_property_map[facet_it] << std::endl;
std::cout << sdf_property_map[facet_it] << " ";
}
std::cout << std::endl;
// create a property-map for segment-ids
std::vector<int> segment_ids(mesh.size_of_facets());
@ -72,6 +73,7 @@ int main()
// access segment-ids (with constant-complexity)
for(Polyhedron::Facet_const_iterator facet_it = mesh.facets_begin();
facet_it != mesh.facets_end(); ++facet_it) {
std::cout << segment_property_map[facet_it] << std::endl;
std::cout << segment_property_map[facet_it] << " ";
}
std::cout << std::endl;
}

View File

@ -46,6 +46,7 @@ int main()
// print SDF values
for(Polyhedron::Facet_const_iterator facet_it = mesh.facets_begin();
facet_it != mesh.facets_end(); ++facet_it) {
std::cout << sdf_property_map[facet_it] << std::endl;
std::cout << sdf_property_map[facet_it] << " ";
}
std::cout << std::endl;
}

View File

@ -43,8 +43,9 @@ int main()
for(Polyhedron::Facet_const_iterator facet_it = mesh.facets_begin();
facet_it != mesh.facets_end(); ++facet_it) {
// ids are between [0, number_of_segments -1]
std::cout << segment_property_map[facet_it] << std::endl;
std::cout << segment_property_map[facet_it] << " ";
}
std::cout << std::endl;
const int number_of_clusters = 4; // use 4 clusters in soft clustering
const double smoothing_lambda = 0.3; // importance of surface features, suggested to be in-between [0,1]
@ -53,4 +54,4 @@ int main()
// This feature becomes important when we want to segment the mesh several times with different parameters.
CGAL::segment_from_sdf_values(
mesh, sdf_property_map, segment_property_map, number_of_clusters, smoothing_lambda);
}
}