1 // Copyright (c) 2010 GeometryFactory (France).
2 // All rights reserved.
3 //
4 // This file is part of CGAL (www.cgal.org)
5 //
6 // $URL: https://github.com/CGAL/cgal/blob/v5.3/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Iso_cuboid_3.h $
7 // $Id: Bbox_3_Iso_cuboid_3.h 90d2e03 2020-01-15T13:32:11+01:00 Maxime Gimeno
8 // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
9 //
10 //
11 // Author(s)     : Sebastien Loriot
12 //
13 
14 #ifndef CGAL_INTERSECTIONS_3_BBOX_3_ISO_CUBOID_3_H
15 #define CGAL_INTERSECTIONS_3_BBOX_3_ISO_CUBOID_3_H
16 
17 #include <CGAL/Bbox_3.h>
18 #include <CGAL/Iso_cuboid_3.h>
19 
20 #include <CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_do_intersect.h>
21 #include <CGAL/Intersections_3/internal/intersection_3_1_impl.h>
22 
23 namespace CGAL {
24 
25 template<typename K>
do_intersect(const CGAL::Bbox_3 & a,const Iso_cuboid_3<K> & b)26 bool do_intersect(const CGAL::Bbox_3& a,
27                   const Iso_cuboid_3<K>& b) {
28   return K().do_intersect_3_object()(a, b);
29 }
30 
31 template<typename K>
do_intersect(const Iso_cuboid_3<K> & a,const CGAL::Bbox_3 & b)32 bool do_intersect(const Iso_cuboid_3<K>& a,
33                   const CGAL::Bbox_3& b) {
34   return K().do_intersect_3_object()(b, a);
35 }
36 
37 template<typename K>
38 typename Intersection_traits<K, typename K::Iso_cuboid_3, Bbox_3>::result_type
intersection(const CGAL::Bbox_3 & a,const Iso_cuboid_3<K> & b)39 intersection(const CGAL::Bbox_3& a,
40              const Iso_cuboid_3<K>& b) {
41   return K().intersect_3_object()(a, b);
42 }
43 
44 template<typename K>
45 typename Intersection_traits<K, typename K::Iso_cuboid_3, Bbox_3>::result_type
intersection(const Iso_cuboid_3<K> & a,const CGAL::Bbox_3 & b)46 intersection(const Iso_cuboid_3<K>& a,
47              const CGAL::Bbox_3& b) {
48   return K().intersect_3_object()(a, b);
49 }
50 } // namespace CGAL
51 
52 #endif // CGAL_INTERSECTIONS_3_BBOX_3_ISO_CUBOID_3_H
53