CGAL 6.2 - 3D Convex Hulls
Loading...
Searching...
No Matches
CGAL::Convex_hull_hierarchy< PolygonMesh > Struct Template Reference

#include <CGAL/Convex_hull_hierarchy.h>

Definition

template<class PolygonMesh>
struct CGAL::Convex_hull_hierarchy< PolygonMesh >

This class stores a convex hull with a data structure optimized for finding the extreme point of the convex hull in a given direction.

In particular, this operation is called by CGAL::Convex_hull_3::do_intersect() and therefore, this class is optimized for fast intersection tests.

Template Parameters
PolygonMeshThe polygon mesh used to construct each level of the hierarchy. Must be a model of MutableFaceGraph. An internal property map for CGAL::vertex_point_t must be available, with a value type that is a model of Kernel::Point_3.
Examples
Convex_hull_3/do_intersect_ch3.cpp.

Public Types

using Mesh = PolygonMesh
 The mesh type.
 

Public Member Functions

template<typename Graph , typename NamedParameters = parameters::Default_named_parameters>
 Convex_hull_hierarchy (const Graph &g, const NamedParameters &np=parameters::default_values())
 constructor taking the points associated to the vertices of g.
 
template<typename RangeIterator , typename Traits = Convex_hull_traits_3<GT , Mesh>>
 Convex_hull_hierarchy (RangeIterator begin, RangeIterator end, const Traits &traits=Traits())
 constructor taking the points in the range [first, last).
 
template<typename Direction_3 , typename NamedParameters = parameters::Default_named_parameters>
Kernel_traits< Direction_3 >::Kernel::Point_3 extreme_point_3 (const Direction_3 &dir, const NamedParameters &np=parameters::default_values) const
 constructs the furthest point of the convex hull along the direction.
 

Constructor & Destructor Documentation

◆ Convex_hull_hierarchy() [1/2]

template<class PolygonMesh >
template<typename Graph , typename NamedParameters = parameters::Default_named_parameters>
CGAL::Convex_hull_hierarchy< PolygonMesh >::Convex_hull_hierarchy ( const Graph &  g,
const NamedParameters &  np = parameters::default_values() 
)

constructor taking the points associated to the vertices of g.

Template Parameters
VertexListGrapha model of VertexListGraph
NamedParametersa sequence of named parameters
Parameters
gthe graph
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
Optional Named Parameters
  • Define the seed used by
  • Type: unsigned int
  • Default: The seed used by CGAL::get_default_random().

◆ Convex_hull_hierarchy() [2/2]

template<class PolygonMesh >
template<typename RangeIterator , typename Traits = Convex_hull_traits_3<GT , Mesh>>
CGAL::Convex_hull_hierarchy< PolygonMesh >::Convex_hull_hierarchy ( RangeIterator  begin,
RangeIterator  end,
const Traits &  traits = Traits() 
)

constructor taking the points in the range [first, last).

Template Parameters
RangeIteratormust be an input iterator with a value type equivalent to Traits::Point_3
Traitsmust be a model of the concept ConvexHullTraits_3. For the purposes of checking the postcondition that the convex hull is valid, Traits must also be a model of the concept IsStronglyConvexTraits_3. Furthermore, Traits must define a type PolygonMesh that is a model of MutableFaceGraph.

Member Function Documentation

◆ extreme_point_3()

template<class PolygonMesh >
template<typename Direction_3 , typename NamedParameters = parameters::Default_named_parameters>
Kernel_traits< Direction_3 >::Kernel::Point_3 CGAL::Convex_hull_hierarchy< PolygonMesh >::extreme_point_3 ( const Direction_3 dir,
const NamedParameters &  np = parameters::default_values 
) const

constructs the furthest point of the convex hull along the direction.

Template Parameters
Direction_3model of Kernel::Direction_3. The kernel does not require to be the same as the one used by the Mesh
NamedParametersa sequence of Named Parameters
Parameters
dirthe direction
npan optional sequence of Named Parameters among the ones listed below
Returns
a Point_3 using the same kernel as the direction.