Jafar
|
A BoundingBox is the smallest box that contains an Atom . More...
A BoundingBox is the smallest box that contains an Atom .
Its coordinates are allways defined in the global coordinates.
Definition at line 18 of file BoundingBox.hpp.
#include <BoundingBox.hpp>
Public Member Functions | |
BoundingBox () | |
Create an undefined BoundingBox, it usually means that the objects that created that BoundingBox is of infinite dimension. | |
BoundingBox (const HomogenousVec &corner1, const HomogenousVec &corner2) | |
Creates a bounding box between two coordinates. | |
BoundingBox (const BoundingBox &ref) | |
Copy constructor. | |
bool | operator== (const BoundingBox &_rhs) const |
Equality check. | |
const HomogenousVec & | corner1 () const |
const HomogenousVec & | corner2 () const |
bool | isDefined () const |
void | extend (double size) |
This function increase the size of the bounding box in all directions. | |
bool | contains (const HomogenousVec &_point) const |
bool | strictContains (const HomogenousVec &_point) const |
bool | overlap (const BoundingBox< dimension > &_bb) const |
bool | strictOverlap (const BoundingBox< dimension > &_bb) const |
Private Types | |
typedef boost::numeric::ublas::bounded_vector < double, dimension+1 > | HomogenousVec |
Private Member Functions | |
void | normalize () |
This function makes sure that all coordinates of corner1 are smaller than those of corner2. | |
Private Attributes | |
HomogenousVec | m_corner1 |
HomogenousVec | m_corner2 |
bool | m_defined |
jafar::geom::BoundingBox< dimension >::BoundingBox | ( | const HomogenousVec & | corner1, |
const HomogenousVec & | corner2 | ||
) |
Creates a bounding box between two coordinates.
corner1 | is the "bottom-left coordinates", for all points of the Atom, all the coordinates of |
bool jafar::geom::BoundingBox< dimension >::contains | ( | const HomogenousVec & | _point | ) | const [inline] |
Definition at line 81 of file BoundingBoxImpl.hpp.
const BoundingBox< dimension >::HomogenousVec & jafar::geom::BoundingBox< dimension >::corner1 | ( | ) | const [inline] |
Definition at line 40 of file BoundingBoxImpl.hpp.
Referenced by jafar::geom::BoundingBox< dimension >::overlap(), and jafar::geom::BoundingBox< dimension >::strictOverlap().
const BoundingBox< dimension >::HomogenousVec & jafar::geom::BoundingBox< dimension >::corner2 | ( | ) | const [inline] |
Definition at line 46 of file BoundingBoxImpl.hpp.
Referenced by jafar::geom::BoundingBox< dimension >::overlap(), and jafar::geom::BoundingBox< dimension >::strictOverlap().
void jafar::geom::BoundingBox< dimension >::extend | ( | double | size | ) | [inline] |
This function increase the size of the bounding box in all directions.
size | to increase the bounding box |
Definition at line 52 of file BoundingBoxImpl.hpp.
bool jafar::geom::BoundingBox< dimension >::isDefined | ( | ) | const [inline] |
Definition at line 75 of file BoundingBoxImpl.hpp.
bool jafar::geom::BoundingBox< _dimension_ >::overlap | ( | const BoundingBox< _dimension_ > & | _bb | ) | const [inline] |
_bb |
Definition at line 107 of file BoundingBoxImpl.hpp.
References jafar::geom::BoundingBox< dimension >::corner1(), and jafar::geom::BoundingBox< dimension >::corner2().
bool jafar::geom::BoundingBox< dimension >::strictContains | ( | const HomogenousVec & | _point | ) | const [inline] |
Definition at line 94 of file BoundingBoxImpl.hpp.
bool jafar::geom::BoundingBox< _dimension_ >::strictOverlap | ( | const BoundingBox< _dimension_ > & | _bb | ) | const [inline] |
_bb |
Definition at line 124 of file BoundingBoxImpl.hpp.
References jafar::geom::BoundingBox< dimension >::corner1(), and jafar::geom::BoundingBox< dimension >::corner2().
Generated on Wed Oct 15 2014 00:37:37 for Jafar by doxygen 1.7.6.1 |