CGAL 5.1  Intersecting Sequences of dD Isooriented Boxes

#include <CGAL/Box_intersection_d/Box_with_handle_d.h>
Box_with_handle_d
is a generic isooriented bounding box in dimension \( D\) that stores additionally a handle to some underlying geometric object.
It provides in each dimension an interval with lower and upper endpoints represented with the number type NT
. This class is designed to work smoothly with the algorithms for intersecting sequences of isooriented boxes. For degeneracy handling, the boxes need to provide a unique id
number. The policy parameter IdPolicy
offers several choices.
NT  number type for the box boundaries, needs to be a model of the Assignable and the LessThanComparable concept. 
D  the dimension of the box. 
Handle  Handle concept, e.g., a pointer, an iterator, or a circulator. 
IdPolicy  specifies how the id number will be provided and can be one of the following types, where ID_FROM_HANDLE is the default for this parameter:

Types  
typedef unspecified_type  NT 
number type to represent the box boundaries. More...  
typedef std::size_t  ID 
type for the box id number.  
Creation  
Box_with_handle_d ()  
Default constructor. More...  
Box_with_handle_d (bool complete, Handle h)  
initializes to the complete or the empty space. More...  
Box_with_handle_d (NT lo[D], NT hi[D], Handle h)  
initializes the box intervals to [lo[i] ,hi[i] ], \( 0 \leq i < D\) and sets the handle to \( h\). More...  
Box_with_handle_d (const Bbox_2 &bbox, Handle h)  
constructs from bbox and sets the handle to \( h\), exists iff \( D=2\) and NT \( \equiv\)double .  
Box_with_handle_d (const Bbox_3 &bbox, Handle h)  
constructs from bbox and sets the handle to \( h\), exists iff \( D=3\) and NT \( \equiv\)double .  
Modifiers  
void  init (bool complete=false) 
initializes to the complete or the empty space. More...  
void  extend (NT point[D]) 
extend box to contain the old box and point .  
Access Functions  
Handle  handle () const 
returns the handle stored in box .  
std::size_t  id () 
returns a unique box id, see the IdPolicy template parameter above for the different choices. More...  
NT  min_coord (int d) const 
returns the lower boundary in dimension d , \( 0 \leq\)d \( < D\).  
NT  max_coord (int d) const 
returns the upper boundary in dimension d , \( 0 \leq\)d \( < D\).  
const Bbox_2 &  bbox () const 
returns the bounding box iff \( D=2\) and NT \( \equiv\)double .  
const Bbox_3 &  bbox () const 
returns the bounding box iff \( D=3\) and NT \( \equiv\)double .  
static int  dimension () 
returns \( D\), the dimension of the box.  
typedef unspecified_type CGAL::Box_intersection_d::Box_with_handle_d< NT, D, Handle, IdPolicy >::NT 
number type to represent the box boundaries.
Allowed are the builtin types int
, unsigned int
, float
, and double
.
CGAL::Box_intersection_d::Box_with_handle_d< NT, D, Handle, IdPolicy >::Box_with_handle_d  (  ) 
Default constructor.
No particular initialization.
CGAL::Box_intersection_d::Box_with_handle_d< NT, D, Handle, IdPolicy >::Box_with_handle_d  (  bool  complete, 
Handle  h  
) 
initializes to the complete or the empty space.
If empty, all interval starting (end) points will be set to positive (negative) infinity, sets handle to \( h\).
CGAL::Box_intersection_d::Box_with_handle_d< NT, D, Handle, IdPolicy >::Box_with_handle_d  (  NT  lo[D], 
NT  hi[D],  
Handle  h  
) 
initializes the box intervals to [lo[i]
,hi[i]
], \( 0 \leq i < D\) and sets the handle to \( h\).
lo[i]
\( <\) hi[i]
for \( 0 \leq i < D\). std::size_t CGAL::Box_intersection_d::Box_with_handle_d< NT, D, Handle, IdPolicy >::id  (  ) 
returns a unique box id, see the IdPolicy
template parameter above for the different choices.
Does not exist if ID_NONE
has been chosen for the IdPolicy
.
void CGAL::Box_intersection_d::Box_with_handle_d< NT, D, Handle, IdPolicy >::init  (  bool  complete = false  ) 
initializes to the complete or the empty space.
If empty, all interval starting(end) points will be set to positive(negative) infinity.