Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CGAL/include/CGAL/Bbox_3.h File Reference
#include <CGAL/basic.h>
#include <CGAL/cartesian_classes.h>
#include <CGAL/Sixtuple.h>
Include dependency graph for CGAL/include/CGAL/Bbox_3.h:

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)
 

Function Documentation

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

Definition at line 132 of file CGAL/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().

133 {
134  // check for emptiness ??
135  if (bb1.xmax() < bb2.xmin() || bb2.xmax() < bb1.xmin())
136  return false;
137  if (bb1.ymax() < bb2.ymin() || bb2.ymax() < bb1.ymin())
138  return false;
139  if (bb1.zmax() < bb2.zmin() || bb2.zmax() < bb1.zmin())
140  return false;
141  return true;
142 }
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:

std::ostream& operator<< ( std::ostream &  os,
const Bbox_3 b 
)
inline

Definition at line 146 of file CGAL/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().

147 {
148  switch(os.iword(IO::mode))
149  {
150  case IO::ASCII :
151  return os << b.xmin() << ' ' << b.ymin() << ' ' << b.zmin();
152  case IO::BINARY :
153  write(os, b.xmin());
154  write(os, b.ymin());
155  write(os, b.zmin());
156  write(os, b.xmax());
157  write(os, b.ymax());
158  write(os, b.zmax());
159  return os;
160  default:
161  os << "Bbox_3((" << b.xmin()
162  << ", " << b.ymin()
163  << ", " << b.zmin() << "), (";
164  os << b.xmax()
165  << ", " << b.ymax()
166  << ", " << b.zmax() << "))";
167  return os;
168  }
169 }
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 177 of file CGAL/include/CGAL/Bbox_3.h.

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

178 {
179  double xmin, ymin, zmin, xmax, ymax, zmax;
180 
181  switch(is.iword(IO::mode))
182  {
183  case IO::ASCII :
184  is >> xmin >> ymin >> xmax >> ymax;
185  break;
186  case IO::BINARY :
187  read(is, xmin);
188  read(is, ymin);
189  read(is, zmin);
190  read(is, xmax);
191  read(is, ymax);
192  read(is, zmax);
193  break;
194  }
195  b = Bbox_3(xmin, ymin, zmin, xmax, ymax, zmax);
196  return is;
197 }
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: