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