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

Go to the source code of this file.

Classes

class  Bbox_2
 

Functions

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

Function Documentation

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

Definition at line 138 of file include/CGAL/Bbox_2.h.

References Bbox_2::xmax(), Bbox_2::xmin(), Bbox_2::ymax(), and Bbox_2::ymin().

139 {
140  // check for emptiness ??
141  if (bb1.xmax() < bb2.xmin() || bb2.xmax() < bb1.xmin())
142  return false;
143  if (bb1.ymax() < bb2.ymin() || bb2.ymax() < bb1.ymin())
144  return false;
145  return true;
146 }
double ymin() const
double xmax() const
double xmin() const
double ymax() const

Here is the call graph for this function:

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

Definition at line 155 of file include/CGAL/Bbox_2.h.

References Bbox_2::xmax(), Bbox_2::xmin(), Bbox_2::ymax(), and Bbox_2::ymin().

156  {
157  // check for emptiness ??
158  if (bb1.xmax()+eps < bb2.xmin() || bb2.xmax()+eps < bb1.xmin())
159  return false;
160  if (bb1.ymax()+eps < bb2.ymin() || bb2.ymax()+eps < bb1.ymin())
161  return false;
162  return true;
163 }
double ymin() const
double xmax() const
double xmin() const
double ymax() const

Here is the call graph for this function:

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

Definition at line 165 of file include/CGAL/Bbox_2.h.

References Bbox_2::xmax(), Bbox_2::xmin(), Bbox_2::ymax(), and Bbox_2::ymin().

166 {
167  if (bb1.xmax() <= bb2.xmin() || bb2.xmax() <= bb1.xmin())
168  return false;
169  if (bb1.ymax() <= bb2.ymin() || bb2.ymax() <= bb1.ymin())
170  return false;
171  return true;
172 }
double ymin() const
double xmax() const
double xmin() const
double ymax() const

Here is the call graph for this function:

Bbox_2 get_Bbox_2 ( InIter  first,
InIter  last 
)

Definition at line 175 of file include/CGAL/Bbox_2.h.

175  {
176  Bbox_2 box;
177 
178  while (first != last) {
179  box += first->bbox();
180  ++first;
181  }
182  return box;
183 }
KD_tree::Box box
Definition: Overlay_0d.C:47
std::ostream& operator<< ( std::ostream &  os,
const Bbox_2 b 
)
inline

Definition at line 91 of file include/CGAL/Bbox_2.h.

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

92 {
93  switch(os.iword(IO::mode)) {
94  case IO::ASCII :
95  os << b.xmin() << ' ' << b.ymin() << ' '
96  << b.xmax() << ' ' << b.ymax();
97  break;
98  case IO::BINARY :
99  write(os, b.xmin());
100  write(os, b.ymin());
101  write(os, b.xmax());
102  write(os, b.ymax());
103  break;
104  default:
105  os << "Bbox_2(" << b.xmin() << ", " << b.ymin() << ", "
106  << b.xmax() << ", " << b.ymax() << ")";
107  break;
108  }
109  return os;
110 }
double ymin() const
double xmax() const
double xmin() const
Definition: io.h:64
void write(std::ostream &os, const T &t, const io_Read_write &)
Definition: io.h:96
static int mode
Definition: io.h:63
Definition: io.h:64
double ymax() const

Here is the call graph for this function:

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

Definition at line 118 of file include/CGAL/Bbox_2.h.

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

119 {
120  double xmin, ymin, xmax, ymax;
121 
122  switch(is.iword(IO::mode)) {
123  case IO::ASCII :
124  is >> xmin >> ymin >> xmax >> ymax;
125  break;
126  case IO::BINARY :
127  read(is, xmin);
128  read(is, ymin);
129  read(is, xmax);
130  read(is, ymax);
131  break;
132  }
133  b = Bbox_2(xmin, ymin, xmax, ymax);
134  return is;
135 }
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: