\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.4 - 2D and 3D Linear Geometry Kernel
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Bbox_3 Class Reference

#include <CGAL/Bbox_3.h>

Definition

An object b of the class Bbox_3 is a bounding box in the three-dimensional Euclidean space \( \E^3\).

See Also
CGAL::Bbox_2
bool do_overlap (const Bbox_3 &bb1, const Bbox_3 &bb2)
 returns true iff bb1 and bb2 overlap, i.e., iff their intersection is non-empty.
 
template<class InputIterator >
Bbox_3 bbox_3 (InputIterator begin, InputIterator past_end)
 returns the bounding box of the objects in the range [first,past_end[. More...
 
template<class InputIterator , class Traits >
Bbox_3 bbox_3 (InputIterator begin, InputIterator past_end, const Traits &traits)
 returns the bounding box of the objects in the range [first,past_end[. More...
 

Creation

 Bbox_3 (double x_min, double y_min, double z_min, double x_max, double y_max, double z_max)
 introduces a bounding box b with lexicographically smallest corner point at (xmin, ymin, zmin) lexicographically largest corner point at (xmax, ymax, zmax).
 

Operations

bool operator== (const Bbox_3 &c) const
 Test for equality.
 
bool operator!= (const Bbox_3 &q) const
 Test for inequality.
 
int dimension () const
 Returns 3.
 
double xmin () const
 
double ymin () const
 
double zmin () const
 
double xmax () const
 
double ymax () const
 
double zmax () const
 
double min (int i) const
 Returns xmin() if i==0 or ymin() if i==1 or zmin() if i==2. More...
 
double max (int i) const
 Returns xmax() if i==0 or ymax() if i==1 or zmax() if i==2. More...
 
Bbox_3 operator+ (const Bbox_3 &c) const
 returns a bounding box of b and c.
 
Bbox_3operator+= (const Bbox_3 &c)
 updates b to be the bounding box of b and c and returns itself.
 

Member Function Documentation

double CGAL::Bbox_3::max ( int  i) const

Returns xmax() if i==0 or ymax() if i==1 or zmax() if i==2.

Precondition
i>=0 and i<=2
double CGAL::Bbox_3::min ( int  i) const

Returns xmin() if i==0 or ymin() if i==1 or zmin() if i==2.

Precondition
i>=0 and i<=2