Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
include/CGAL/Bbox_3.h File Reference
#include <CGAL/basic.h>
#include <cmath>
#include <CGAL/cgalopt.h>
Include dependency graph for include/CGAL/Bbox_3.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Bbox_3
 

Functions

bool do_overlap (const Bbox_3 &bb1, const Bbox_3 &bb2)
 
std::ostream & operator<< (std::ostream &os, const Bbox_3 &b)
 
std::istream & operator>> (std::istream &is, Bbox_3 &b)
 
bool do_overlap_eps (const Bbox_3 &bb1, const Bbox_3 &bb2, const double eps)
 
bool do_overlap_strict (const Bbox_3 &bb1, const Bbox_3 &bb2)
 
template<class InIter >
Bbox_3 get_Bbox_3 (InIter first, InIter last)
 

Function Documentation

bool do_overlap ( const Bbox_3 bb1,
const Bbox_3 bb2 
)
inline

Definition at line 96 of file include/CGAL/Bbox_3.h.

References Bbox_3::xmax(), Bbox_3::xmin(), Bbox_3::ymax(), Bbox_3::ymin(), Bbox_3::zmax(), and Bbox_3::zmin().

97 {
98  // check for emptiness ??
99  if (bb1.xmax() < bb2.xmin() || bb2.xmax() < bb1.xmin())
100  return false;
101  if (bb1.ymax() < bb2.ymin() || bb2.ymax() < bb1.ymin())
102  return false;
103  if (bb1.zmax() < bb2.zmin() || bb2.zmax() < bb1.zmin())
104  return false;
105  return true;
106 }
double xmax() const
double xmin() const
double zmin() const
double ymax() const
double zmax() const
double ymin() const

Here is the call graph for this function:

bool do_overlap_eps ( const Bbox_3 bb1,
const Bbox_3 bb2,
const double  eps 
)
inline

Definition at line 174 of file include/CGAL/Bbox_3.h.

References Bbox_3::xmax(), Bbox_3::xmin(), Bbox_3::ymax(), Bbox_3::ymin(), Bbox_3::zmax(), and Bbox_3::zmin().

175  {
176  // check for emptiness ??
177  if (bb1.xmax()+eps < bb2.xmin() || bb2.xmax()+eps < bb1.xmin())
178  return false;
179  if (bb1.ymax()+eps < bb2.ymin() || bb2.ymax()+eps < bb1.ymin())
180  return false;
181  if (bb1.zmax()+eps < bb2.zmin() || bb2.zmax()+eps < bb1.zmin())
182  return false;
183  return true;
184 }
double xmax() const
double xmin() const
double zmin() const
double ymax() const
double zmax() const
double ymin() const

Here is the call graph for this function:

bool do_overlap_strict ( const Bbox_3 bb1,
const Bbox_3 bb2 
)
inline

Definition at line 186 of file include/CGAL/Bbox_3.h.

References Bbox_3::xmax(), Bbox_3::xmin(), Bbox_3::ymax(), Bbox_3::ymin(), Bbox_3::zmax(), and Bbox_3::zmin().

187 {
188  // check for emptiness ??
189  if (bb1.xmax() <= bb2.xmin() || bb2.xmax() <= bb1.xmin())
190  return false;
191  if (bb1.ymax() <= bb2.ymin() || bb2.ymax() <= bb1.ymin())
192  return false;
193  if (bb1.zmax() <= bb2.zmin() || bb2.zmax() <= bb1.zmin())
194  return false;
195  return true;
196 }
double xmax() const
double xmin() const
double zmin() const
double ymax() const
double zmax() const
double ymin() const

Here is the call graph for this function:

Bbox_3 get_Bbox_3 ( InIter  first,
InIter  last 
)

Definition at line 199 of file include/CGAL/Bbox_3.h.

199  {
200  Bbox_3 box;
201 
202  while (first != last) {
203  box += first->bbox();
204  ++first;
205  }
206  return box;
207 }
KD_tree::Box box
Definition: Overlay_0d.C:47
std::ostream& operator<< ( std::ostream &  os,
const Bbox_3 b 
)
inline

Definition at line 111 of file include/CGAL/Bbox_3.h.

References IO::ASCII, IO::BINARY, IO::mode, write(), Bbox_3::xmax(), Bbox_3::xmin(), Bbox_3::ymax(), Bbox_3::ymin(), Bbox_3::zmax(), and Bbox_3::zmin().

112 {
113  switch(os.iword(IO::mode))
114  {
115  case IO::ASCII :
116  return os << b.xmin() << ' ' << b.ymin() << ' ' << b.zmin() << ' '
117  << b.xmax() << ' ' << b.ymax() << ' ' << b.zmax();
118  case IO::BINARY :
119  write(os, b.xmin());
120  write(os, b.ymin());
121  write(os, b.zmin());
122  write(os, b.xmax());
123  write(os, b.ymax());
124  write(os, b.zmax());
125  return os;
126  default:
127  os << "Bbox_3((" << b.xmin()
128  << ", " << b.ymin()
129  << ", " << b.zmin() << "), (";
130  os << b.xmax()
131  << ", " << b.ymax()
132  << ", " << b.zmax() << "))";
133  return os;
134  }
135 }
double xmax() const
double xmin() const
double zmin() const
Definition: io.h:64
double ymax() const
void write(std::ostream &os, const T &t, const io_Read_write &)
Definition: io.h:96
double zmax() const
static int mode
Definition: io.h:63
Definition: io.h:64
double ymin() const

Here is the call graph for this function:

std::istream& operator>> ( std::istream &  is,
Bbox_3 b 
)
inline

Definition at line 143 of file include/CGAL/Bbox_3.h.

References IO::ASCII, IO::BINARY, IO::mode, and read().

144 {
145  double xmin, ymin, zmin, xmax, ymax, zmax;
146 
147  switch(is.iword(IO::mode))
148  {
149  case IO::ASCII :
150  is >> xmin >> ymin >> zmin >> xmax >> ymax >> zmax ;
151  break;
152  case IO::BINARY :
153  read(is, xmin);
154  read(is, ymin);
155  read(is, zmin);
156  read(is, xmax);
157  read(is, ymax);
158  read(is, zmax);
159  break;
160  }
161  b = Bbox_3(xmin, ymin, zmin, xmax, ymax, zmax);
162  return is;
163 }
Definition: io.h:64
static int mode
Definition: io.h:63
Definition: io.h:64
void read(std::istream &is, T &t, const io_Read_write &)
Definition: io.h:132

Here is the call graph for this function: