mirror of https://github.com/CGAL/cgal
renamed params
This commit is contained in:
parent
68b86a47b0
commit
1524a0f48f
|
|
@ -40,20 +40,20 @@ int main(int argc, char *argv[]) {
|
|||
assert(is_default_input && point_set_2.size() == 3634);
|
||||
|
||||
// Default parameter values for the data file point_set_2.xyz.
|
||||
const FT search_sphere_radius = FT(5);
|
||||
const FT max_distance_to_line = FT(45) / FT(10);
|
||||
const FT max_accepted_angle = FT(45);
|
||||
const std::size_t min_region_size = 5;
|
||||
const FT sphere_radius = FT(5);
|
||||
const FT max_distance = FT(45) / FT(10);
|
||||
const FT max_angle = FT(45);
|
||||
const std::size_t min_region_size = 5;
|
||||
|
||||
// Create instances of the classes Neighbor_query and Region_type.
|
||||
Neighbor_query neighbor_query(
|
||||
point_set_2, CGAL::parameters::sphere_radius(search_sphere_radius));
|
||||
point_set_2, CGAL::parameters::sphere_radius(sphere_radius));
|
||||
|
||||
Region_type region_type(
|
||||
point_set_2,
|
||||
CGAL::parameters::
|
||||
max_distance(max_distance_to_line).
|
||||
max_angle(max_accepted_angle).
|
||||
max_distance(max_distance).
|
||||
max_angle(max_angle).
|
||||
min_region_size(min_region_size));
|
||||
|
||||
// Create an instance of the region growing class.
|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@ int main(int argc, char *argv[]) {
|
|||
assert(is_default_input && input_range.size() == 8075);
|
||||
|
||||
// Default parameter values for the data file point_set_3.xyz.
|
||||
const std::size_t k = 12;
|
||||
const FT max_distance_to_plane = FT(2);
|
||||
const FT max_accepted_angle = FT(20);
|
||||
const std::size_t min_region_size = 50;
|
||||
const std::size_t k = 12;
|
||||
const FT max_distance = FT(2);
|
||||
const FT max_angle = FT(20);
|
||||
const std::size_t min_region_size = 50;
|
||||
|
||||
// Create instances of the classes Neighbor_query and Region_type.
|
||||
Neighbor_query neighbor_query(
|
||||
|
|
@ -54,8 +54,8 @@ int main(int argc, char *argv[]) {
|
|||
Region_type region_type(
|
||||
input_range,
|
||||
CGAL::parameters::
|
||||
max_distance(max_distance_to_plane).
|
||||
max_angle(max_accepted_angle).
|
||||
max_distance(max_distance).
|
||||
max_angle(max_angle).
|
||||
min_region_size(min_region_size).
|
||||
point_map(input_range.point_map()).
|
||||
normal_map(input_range.normal_map()));
|
||||
|
|
|
|||
|
|
@ -47,9 +47,9 @@ int main(int argc, char *argv[]) {
|
|||
assert(is_default_input && face_range.size() == 32245);
|
||||
|
||||
// Default parameter values for the data file polygon_mesh.off.
|
||||
const FT max_distance_to_plane = FT(1);
|
||||
const FT max_accepted_angle = FT(45);
|
||||
const std::size_t min_region_size = 5;
|
||||
const FT max_distance = FT(1);
|
||||
const FT max_angle = FT(45);
|
||||
const std::size_t min_region_size = 5;
|
||||
|
||||
// Create instances of the classes Neighbor_query and Region_type.
|
||||
Neighbor_query neighbor_query(polygon_mesh);
|
||||
|
|
@ -57,8 +57,8 @@ int main(int argc, char *argv[]) {
|
|||
Region_type region_type(
|
||||
polygon_mesh,
|
||||
CGAL::parameters::
|
||||
max_distance(max_distance_to_plane).
|
||||
max_angle(max_accepted_angle).
|
||||
max_distance(max_distance).
|
||||
max_angle(max_angle).
|
||||
min_region_size(min_region_size));
|
||||
|
||||
// Sort face indices.
|
||||
|
|
|
|||
|
|
@ -51,16 +51,16 @@ int main(int argc, char *argv[]) {
|
|||
assert(is_default_input && polyline_3.size() == 249);
|
||||
|
||||
// Default parameter values for the data file polyline_3.polylines.txt.
|
||||
const FT max_distance_to_line = FT(45) / FT(10);
|
||||
const FT max_accepted_angle = FT(45);
|
||||
const FT max_distance = FT(45) / FT(10);
|
||||
const FT max_angle = FT(45);
|
||||
|
||||
// Setting up the 3D polyline algorithm.
|
||||
Neighbor_query_3 neighbor_query_3(polyline_3);
|
||||
Region_type_3 region_type_3(
|
||||
polyline_3,
|
||||
CGAL::parameters::
|
||||
max_distance(max_distance_to_line).
|
||||
max_angle(max_accepted_angle));
|
||||
max_distance(max_distance).
|
||||
max_angle(max_angle));
|
||||
Region_growing_3 region_growing_3(
|
||||
polyline_3, neighbor_query_3, region_type_3);
|
||||
|
||||
|
|
@ -96,8 +96,8 @@ int main(int argc, char *argv[]) {
|
|||
Region_type_2 region_type_2(
|
||||
polyline_2,
|
||||
CGAL::parameters::
|
||||
max_distance(max_distance_to_line).
|
||||
max_angle(max_accepted_angle));
|
||||
max_distance(max_distance).
|
||||
max_angle(max_angle));
|
||||
Region_growing_2 region_growing_2(
|
||||
polyline_2, neighbor_query_2, region_type_2);
|
||||
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ bool test_region_growing_on_polyline(int argc, char *argv[]) {
|
|||
using Region_growing_3 = SD::Region_growing<Polyline_3, Neighbor_query_3, Region_type_3>;
|
||||
|
||||
// Default parameter values.
|
||||
const FT max_distance_to_line = FT(45) / FT(10);
|
||||
const FT max_accepted_angle = FT(45);
|
||||
const FT distance_threshold = FT(45) / FT(10);
|
||||
const FT angle_threshold = FT(45);
|
||||
|
||||
// Load data.
|
||||
std::ifstream in(argc > 1 ? argv[1] : "data/polyline_3.polylines.txt");
|
||||
|
|
@ -67,8 +67,8 @@ bool test_region_growing_on_polyline(int argc, char *argv[]) {
|
|||
Region_type_3 region_type_3(
|
||||
polyline_3,
|
||||
CGAL::parameters::
|
||||
max_distance(max_distance_to_line).
|
||||
max_angle(max_accepted_angle));
|
||||
max_distance(distance_threshold).
|
||||
max_angle(angle_threshold));
|
||||
|
||||
// Run 3D region growing.
|
||||
Region_growing_3 region_growing_3(
|
||||
|
|
@ -104,8 +104,8 @@ bool test_region_growing_on_polyline(int argc, char *argv[]) {
|
|||
Region_type_2 region_type_2(
|
||||
polyline_2,
|
||||
CGAL::parameters::
|
||||
max_distance(max_distance_to_line).
|
||||
max_angle(max_accepted_angle));
|
||||
max_distance(distance_threshold).
|
||||
max_angle(angle_threshold));
|
||||
|
||||
// Run 2D region growing.
|
||||
Region_growing_2 region_growing_2(
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ using Region_growing_3 = SD::Region_growing<Polyline_3, Neighbor_query_3, Region
|
|||
int main(int argc, char *argv[]) {
|
||||
|
||||
// Default parameter values.
|
||||
const FT max_distance_to_line = FT(45) / FT(10);
|
||||
const FT max_accepted_angle = FT(45);
|
||||
const FT distance_threshold = FT(45) / FT(10);
|
||||
const FT angle_threshold = FT(45);
|
||||
|
||||
// Load data.
|
||||
std::ifstream in(argc > 1 ? argv[1] : "data/polyline_3.polylines.txt");
|
||||
|
|
@ -68,8 +68,8 @@ int main(int argc, char *argv[]) {
|
|||
Region_type_3 region_type_3(
|
||||
polyline_3,
|
||||
CGAL::parameters::
|
||||
max_distance(max_distance_to_line).
|
||||
max_angle(max_accepted_angle));
|
||||
max_distance(distance_threshold).
|
||||
max_angle(angle_threshold));
|
||||
|
||||
// Sort indices.
|
||||
Sorting_3 sorting_3(
|
||||
|
|
@ -96,8 +96,8 @@ int main(int argc, char *argv[]) {
|
|||
SD::internal::region_growing_polylines(
|
||||
polyline_3, std::back_inserter(regions),
|
||||
CGAL::parameters::
|
||||
max_distance(max_distance_to_line).
|
||||
max_angle(max_accepted_angle));
|
||||
max_distance(distance_threshold).
|
||||
max_angle(angle_threshold));
|
||||
assert(regions.size() == 15);
|
||||
}
|
||||
|
||||
|
|
@ -121,8 +121,8 @@ int main(int argc, char *argv[]) {
|
|||
Region_type_2 region_type_2(
|
||||
polyline_2,
|
||||
CGAL::parameters::
|
||||
max_distance(max_distance_to_line).
|
||||
max_angle(max_accepted_angle));
|
||||
max_distance(distance_threshold).
|
||||
max_angle(angle_threshold));
|
||||
|
||||
// Sort indices.
|
||||
Sorting_2 sorting_2(
|
||||
|
|
@ -149,8 +149,8 @@ int main(int argc, char *argv[]) {
|
|||
SD::internal::region_growing_polylines(
|
||||
polyline_2, std::back_inserter(regions),
|
||||
CGAL::parameters::
|
||||
max_distance(max_distance_to_line).
|
||||
max_angle(max_accepted_angle));
|
||||
max_distance(distance_threshold).
|
||||
max_angle(angle_threshold));
|
||||
assert(regions.size() == 5);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue