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

Go to the source code of this file.

Classes

class  Bbox_2
 

Functions

bool do_overlap (const Bbox_2 &bb1, const Bbox_2 &bb2)
 
std::ostream & operator<< (std::ostream &os, const Bbox_2 &b)
 
std::istream & operator>> (std::istream &is, Bbox_2 &b)
 

Function Documentation

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

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

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

Referenced by Segment_2_Segment_2_pair< R >::intersection_type().

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:

Here is the caller graph for this function:

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

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

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

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

179 {
180  double xmin, ymin, xmax, ymax;
181 
182  switch(is.iword(IO::mode)) {
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, xmax);
190  read(is, ymax);
191  break;
192  }
193  b = Bbox_2(xmin, ymin, xmax, ymax);
194  return is;
195 }
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: