shawn::Box Class Reference

Axis-parallel box (cuboid). More...

#include <box.h>

Collaboration diagram for shawn::Box:

Collaboration graph
[legend]

List of all members.

Public Member Functions

bool operator== (const Box &p) const throw ()
construction / destruction
 Box ()
 Box (const Vec &, const Vec &)
 Box (const Box &)
 Box (const Vec &)
 ~Box ()
modification
Boxoperator= (const Box &) throw ()
Veclower_w (void) throw ()
Vecupper_w (void) throw ()
access
bool contains (const Vec &) const throw ()
bool overlaps (const double &this_p1, const double &this_p2, const double &b1, const double &b2) const throw ()
bool intersects (const Box &b) const throw ()
const Veclower (void) const throw ()
const Vecupper (void) const throw ()

Static Public Attributes

static const Box INFINITE_3D_SPACE
static const Box EMPTY_BOX

Friends

std::ostream & operator<< (std::ostream &, const Box &) throw ()


Detailed Description

Axis-parallel box (cuboid).

Constructor & Destructor Documentation

shawn::Box::Box (  ) 

shawn::Box::Box ( const Vec ,
const Vec  
)

shawn::Box::Box ( const Box  ) 

shawn::Box::Box ( const Vec  )  [explicit]

shawn::Box::~Box (  ) 


Member Function Documentation

Box& shawn::Box::operator= ( const Box  )  throw ()

Vec& shawn::Box::lower_w ( void   )  throw () [inline]

Vec& shawn::Box::upper_w ( void   )  throw () [inline]

bool shawn::Box::contains ( const Vec  )  const throw ()

Returns:
whether the given vector is contained in the box

bool shawn::Box::overlaps ( const double &  this_p1,
const double &  this_p2,
const double &  b1,
const double &  b2 
) const throw ()

Returns:
whether the given coordinates, as there are x, y and z from the vectors p1 & p2 overlap with passed vectors. Furthermore just one coordinate is checked at a time. That is why the method intersects() calls the method overlaps() three times, if necessary, in order to determine, if the the given boxes intersect.

bool shawn::Box::intersects ( const Box b  )  const throw ()

Returns:
whether the given box intersecs with this box

const Vec& shawn::Box::lower ( void   )  const throw () [inline]

const Vec& shawn::Box::upper ( void   )  const throw () [inline]

bool shawn::Box::operator== ( const Box p  )  const throw () [inline]


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const Box  
) throw () [friend]


Member Data Documentation

const Box shawn::Box::EMPTY_BOX [static]


The documentation for this class was generated from the following file:

Generated on Thu Sep 9 00:00:59 2010 for Shawn by  doxygen 1.5.6