CGAL 6.2 - 3D Convex Hulls
Loading...
Searching...
No Matches
Intersection Test Functions

Functions

template<class Convex1 , class Convex2 , class NamedParameters_1 = parameters::Default_named_parameters, class NamedParameters_2 = parameters::Default_named_parameters>
bool CGAL::Convex_hull_3::do_intersect (const Convex1 &ch1, const Convex2 &ch2, const NamedParameters_1 &np1=parameters::default_values(), const NamedParameters_2 &np2=parameters::default_values())
 checks if the convex hulls intersect or not.
 

Function Documentation

◆ do_intersect()

template<class Convex1 , class Convex2 , class NamedParameters_1 = parameters::Default_named_parameters, class NamedParameters_2 = parameters::Default_named_parameters>
bool CGAL::Convex_hull_3::do_intersect ( const Convex1 &  ch1,
const Convex2 &  ch2,
const NamedParameters_1 &  np1 = parameters::default_values(),
const NamedParameters_2 &  np2 = parameters::default_values() 
)

#include <CGAL/Convex_hull_3/do_intersect.h>

checks if the convex hulls intersect or not.

each input can be provided as a range, a mesh, or as the specialized structure CGAL::Convex_hull_hierarchy. They are not required to use the same input type.

Template Parameters
Convex_1is a model of ConstRange or a model of VertexListGraph and AdjacencyGraph or an instance of CGAL::Convex_hull_hierarchy
Convex_1same as Convex_2
NamedParameters_1a sequence of Named Parameters
NamedParameters_2a sequence of Named Parameters
Parameters
ch1the first convex hull
ch2the second convex hull
np1an optional sequence of Named Parameters among the ones listed below
np2an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • when ch1 (ch2) is a mesh, it is a property map associating points to its vertices
  • Type: a model of ReadablePropertyMap whose value types are the same for ch1 and ch2
  • Default: boost::get(CGAL::vertex_point, g)
  • Extra: used only if ch1 (ch2) is model of VertexListGraph and AdjacencyGraph. If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in Convex_1 (Convex_2).
  • An instance of a geometric traits class
  • Type: a class model of Kernel
  • Default: a CGAL kernel deduced from the point type of the input, using CGAL::Kernel_traits
  • Extra: np1 only
  • if not 0 (no limit), indicates the maximum number of iterations performed by the algorithm. If this value is not 0, then an intersection might be reported even if the convex hulls does not intersect. However, if the convex hulls are reported not to intersect, this is guaranteed.
  • Type: a positive integer convertible to std::size_t
  • Extra: np1 only
  • Default: 0
See also
CGAL::Convex_hull_hierarchy
Examples
Convex_hull_3/do_intersect_ch3.cpp.