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

Functions

template<class Convex_1 , class Convex_2 , class NamedParameters_1 = parameters::Default_named_parameters, class NamedParameters_2 = parameters::Default_named_parameters>
bool CGAL::Convex_hull_3::do_intersect (const Convex_1 &ch1, const Convex_2 &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 Convex_1 , class Convex_2 , class NamedParameters_1 = parameters::Default_named_parameters, class NamedParameters_2 = parameters::Default_named_parameters>
bool CGAL::Convex_hull_3::do_intersect ( const Convex_1 &  ch1,
const Convex_2 &  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.

Input hulls can be provided as a range of points or as a graph, and may be of different types. Furthermore, when many intersection queries use the same object, one should wrap that input in the class CGAL::Convex_hull_hierarchy as to construct an optimized view of the convex hull and accelerate intersection tests. This is especially true when the convex hull is made of a large number of vertices (see CGAL::Convex_hull_hierarchy for more details).

Template Parameters
Convex_1is one of the following types:
Convex_2same as Convex_1
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.
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in Convex_1 (Convex_2).
See also
CGAL::Convex_hull_hierarchy
Examples
Convex_hull_3/do_intersect_ch3.cpp.