CGAL 6.2 - 3D Convex Hulls: Intersection Test Functions

CGAL 6.2 - 3D Convex Hulls

Loading...
Searching...
No Matches
Classes | Functions
Intersection Test Functions
Reference Manual

##

## Classes
struct | CGAL::Convex_hull_hierarchy_3< PolygonMesh >
| This class stores a convex hull in a data structure optimized for fast intersection tests. More...

## 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 whether two 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 whether two 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_3` 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_3` for more details).

Template Parameters

  Convex_1 | is one of the following types: a model of `ConstRange` a model of `VertexListGraph` and `AdjacencyGraph` an instance of `CGAL::Convex_hull_hierarchy_3`
  Convex_2 | same as `Convex_1`
  NamedParameters_1 | a sequence of Named Parameters
  NamedParameters_2 | a sequence of Named Parameters

Parameters

  ch1 | the first convex hull
  ch2 | the second convex hull
  np1 | an optional sequence of Named Parameters among the ones listed below
  np2 | an optional sequence of Named Parameters among the ones listed below

Optional Named Parameters

  when `ch1` (`ch2`) is a range, it is a property map associating points to its elements Type: a model of `ReadablePropertyMap` whose value types are the same for `ch1` and `ch2` Default: `CGAL::Identity_property_map` Extra: used only if `ch1` (`ch2`) is model of `ConstRange` |
  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_3`

Examples
  Convex_hull_3/do_intersect_ch3.cpp.