CGAL 4.13.1 - Intersecting Sequences of dD Iso-oriented Boxes
|
#include <CGAL/Box_intersection_d/Box_d.h>
Box_d
is a generic iso-oriented bounding box in dimension \( D\).
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 iso-oriented boxes. For degeneracy handling, the boxes need to provide a unique id
-number. The policy parameter IdPolicy
offers several choices. The template parameters have to comply with the following requirements:
NT | is the number type for the box boundaries. It must meet the requierements of the concepts Assignable and LessThanComparable . |
D | is an integer and the dimension of the box. |
IdPolicy | specifies how the id -number will be provided and can be one of the following types, where ID_EXPLICIT 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_d () | |
Default constructor. More... | |
Box_d (bool complete) | |
Constructor initialized to the complete or the empty space. More... | |
Box_d (NT lo[D], NT hi[D]) | |
initializes the box intervals to [lo[i] ,hi[i] ], \( 0 \leq i < D\). More... | |
Box_d (const Bbox_2 &bbox) | |
constructs from bbox . More... | |
Box_d (const Bbox_3 &bbox) | |
constructs from bbox . More... | |
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 . | |
static int | dimension () |
returns \( D\), the dimension of the box. | |
Access Functions | |
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 More... | |
NT | max_coord (int d) const |
returns the upper boundary in dimension d More... | |
const Bbox_2 & | bbox () const |
returns the bounding box Requirements: \( D=2\) and NT \( \equiv\)double | |
const Bbox_3 & | bbox () const |
returns the bounding box Requirements: \( D=3\) and NT \( \equiv\)double | |
void | extend (NT p[N]) |
extends box to the smallest box that additionally contains the point represented by coordinates in p . | |
void | extend (std::pair< NT, NT > p[N]) |
extends box to the smallest box that additionally contains the point represented by coordinate intervals in p . | |
typedef unspecified_type CGAL::Box_intersection_d::Box_d< NT, D, IdPolicy >::NT |
number type to represent the box boundaries.
Allowed are the built-in types int
, unsigned int
, float
, and double
.
CGAL::Box_intersection_d::Box_d< NT, D, IdPolicy >::Box_d | ( | ) |
Default constructor.
No particular initialization.
CGAL::Box_intersection_d::Box_d< NT, D, IdPolicy >::Box_d | ( | bool | complete | ) |
Constructor initialized to the complete or the empty space.
If empty, all interval starting(end) points will be set to positive(negative) infinity.
CGAL::Box_intersection_d::Box_d< NT, D, IdPolicy >::Box_d | ( | NT | lo[D], |
NT | hi[D] | ||
) |
initializes the box intervals to [lo[i]
,hi[i]
], \( 0 \leq i < D\).
lo[i]
\( <\) hi[i]
for \( 0 \leq i < D\). CGAL::Box_intersection_d::Box_d< NT, D, IdPolicy >::Box_d | ( | const Bbox_2 & | bbox | ) |
constructs from bbox
.
Requirements: \( D=2\) and NT
\( \equiv\)double
.
CGAL::Box_intersection_d::Box_d< NT, D, IdPolicy >::Box_d | ( | const Bbox_3 & | bbox | ) |
constructs from bbox
.
Requirements: \( D=3\) and NT
\( \equiv\)double
.
std::size_t CGAL::Box_intersection_d::Box_d< NT, D, IdPolicy >::id | ( | ) |
returns a unique box id, see the IdPolicy
template parameter above for the different choices.
<tt>IdPolicy</tt> | \( \neq\)ID_NONE |
void CGAL::Box_intersection_d::Box_d< NT, D, 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.
NT CGAL::Box_intersection_d::Box_d< NT, D, IdPolicy >::max_coord | ( | int | d | ) | const |
returns the upper boundary in dimension d
d
\( < D\). NT CGAL::Box_intersection_d::Box_d< NT, D, IdPolicy >::min_coord | ( | int | d | ) | const |
returns the lower boundary in dimension d
d
\( < D\).