Loading src/csg/cgal_helper_polyhedron.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ #include <CGAL/boost/graph/graph_traits_Polyhedron_3.h> #include <CGAL/convex_hull_3.h> #include <CGAL/point_generators_3.h> #include <CGAL/Random.h> namespace { Loading Loading @@ -110,11 +111,14 @@ create_polyhedron_from_hull(const std::tuple<double, double, double> &cube_size, auto p = std::make_shared<Polyhedron>(); // Use a fixed seed random function to ensure reproducibility auto rand = CGAL::Random(0); std::list<cgal_helper::CK::Point_3> points; CGAL::Random_points_on_sphere_3<cgal_helper::CK::Point_3> s(sphere_radius); CGAL::Random_points_on_sphere_3<cgal_helper::CK::Point_3> s(sphere_radius, rand); std::copy_n(s, NUM_SAMPLING_PTS, std::back_inserter(points)); CGAL::Random_points_in_cube_3<cgal_helper::CK::Point_3> c(1.0); CGAL::Random_points_in_cube_3<cgal_helper::CK::Point_3> c(1.0, rand); std::list<cgal_helper::CK::Point_3> points_c; std::copy_n(c, NUM_SAMPLING_PTS, std::back_inserter(points_c)); Loading Loading
src/csg/cgal_helper_polyhedron.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ #include <CGAL/boost/graph/graph_traits_Polyhedron_3.h> #include <CGAL/convex_hull_3.h> #include <CGAL/point_generators_3.h> #include <CGAL/Random.h> namespace { Loading Loading @@ -110,11 +111,14 @@ create_polyhedron_from_hull(const std::tuple<double, double, double> &cube_size, auto p = std::make_shared<Polyhedron>(); // Use a fixed seed random function to ensure reproducibility auto rand = CGAL::Random(0); std::list<cgal_helper::CK::Point_3> points; CGAL::Random_points_on_sphere_3<cgal_helper::CK::Point_3> s(sphere_radius); CGAL::Random_points_on_sphere_3<cgal_helper::CK::Point_3> s(sphere_radius, rand); std::copy_n(s, NUM_SAMPLING_PTS, std::back_inserter(points)); CGAL::Random_points_in_cube_3<cgal_helper::CK::Point_3> c(1.0); CGAL::Random_points_in_cube_3<cgal_helper::CK::Point_3> c(1.0, rand); std::list<cgal_helper::CK::Point_3> points_c; std::copy_n(c, NUM_SAMPLING_PTS, std::back_inserter(points_c)); Loading