From 32c481ac75ed1d34e79a6819bc081d2206278678 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 10 Jan 2025 15:08:08 +0000 Subject: [PATCH] Move Bbox_d.h to NewKernel --- Kernel_23/test/Kernel_23/test_bbox.cpp | 28 ------------- .../include/CGAL/Bbox_d.h | 0 NewKernel_d/test/NewKernel_d/test_bbox_d.cpp | 41 +++++++++++++++++++ 3 files changed, 41 insertions(+), 28 deletions(-) rename {Kernel_d => NewKernel_d}/include/CGAL/Bbox_d.h (100%) create mode 100644 NewKernel_d/test/NewKernel_d/test_bbox_d.cpp diff --git a/Kernel_23/test/Kernel_23/test_bbox.cpp b/Kernel_23/test/Kernel_23/test_bbox.cpp index 4dd1d26b35af..6d9ca730170c 100644 --- a/Kernel_23/test/Kernel_23/test_bbox.cpp +++ b/Kernel_23/test/Kernel_23/test_bbox.cpp @@ -1,7 +1,6 @@ #include #include #include -#include #include @@ -80,31 +79,4 @@ int main() assert( span.z_span() == 8); } - { - //Dimension d - typedef CGAL::Bbox_d> BBox3; - BBox3 bb3(3), bb3a(3,1.0); - assert(bb3.dimension() == 3); - assert(bb3 != bb3a); - bb3 = bb3a; - assert(bb3 == bb3a); - - std::array,3> coord = { std::make_pair(0.0, 0.0), std::make_pair(1.0, 1.1), std::make_pair(1.0, 20.0)}; - - BBox3 bb3b(3,coord.begin(), coord.end()); - - bb3b = bb3b + bb3b; - bb3b += bb3; - bb3b.dilate(15); - assert(CGAL::do_overlap(bb3, bb3b)); - - std::cout << bb3b << std::endl; - - BBox3::Cartesian_const_iterator beg = bb3b.cartesian_begin(); - BBox3::Cartesian_const_iterator end = bb3b.cartesian_end(); - for(; beg != end; ++beg){ - std::cout << *beg << std::endl; - } - - } } diff --git a/Kernel_d/include/CGAL/Bbox_d.h b/NewKernel_d/include/CGAL/Bbox_d.h similarity index 100% rename from Kernel_d/include/CGAL/Bbox_d.h rename to NewKernel_d/include/CGAL/Bbox_d.h diff --git a/NewKernel_d/test/NewKernel_d/test_bbox_d.cpp b/NewKernel_d/test/NewKernel_d/test_bbox_d.cpp new file mode 100644 index 000000000000..a27d66ffeaab --- /dev/null +++ b/NewKernel_d/test/NewKernel_d/test_bbox_d.cpp @@ -0,0 +1,41 @@ +#include +#include +#include + +#include + +int main() +{ + //Dimension d + typedef CGAL::Bbox_d> BBox2; + typedef CGAL::Bbox_d> BBox3; + BBox3 bb3(3), bb3a(3,1.0); + assert(bb3.dimension() == 3); + assert(bb3 != bb3a); + bb3 = bb3a; + assert(bb3 == bb3a); + + std::array,3> coord = { std::make_pair(0.0, 0.0), std::make_pair(1.0, 1.1), std::make_pair(1.0, 20.0)}; + + BBox3 bb3b(3,coord.begin(), coord.end()); + + bb3b = bb3b + bb3b; + bb3b += bb3; + bb3b.dilate(15); + assert(CGAL::do_overlap(bb3, bb3b)); + + std::cout << bb3b << std::endl; + + BBox3::Cartesian_const_iterator beg = bb3b.cartesian_begin(); + BBox3::Cartesian_const_iterator end = bb3b.cartesian_end(); + for(; beg != end; ++beg){ + std::cout << *beg << std::endl; + } + + CGAL::Bbox_2 bb_2(0,0, 1, 1); + BBox2 bb_d2(bb_2); + + CGAL::Bbox_3 bb_3(0,0, 0, 1, 1,1); + BBox3 bb_d3(bb_3); + +}