Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Types | Private Member Functions | Private Attributes
jafar::geom::BoundingBox< dimension > Class Template Reference

A BoundingBox is the smallest box that contains an Atom . More...


Detailed Description

template<int dimension>
class jafar::geom::BoundingBox< dimension >

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>

List of all members.

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 HomogenousVeccorner1 () const
const HomogenousVeccorner2 () 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

Constructor & Destructor Documentation

template<int dimension>
jafar::geom::BoundingBox< dimension >::BoundingBox ( const HomogenousVec corner1,
const HomogenousVec corner2 
)

Creates a bounding box between two coordinates.

Parameters:
corner1is the "bottom-left coordinates", for all points of the Atom, all the coordinates of

Member Function Documentation

template<int dimension>
bool jafar::geom::BoundingBox< dimension >::contains ( const HomogenousVec _point) const [inline]
Returns:
true if this bounding box countains the point (if the point is on the enveloppe of the bouding box, it return true)

Definition at line 81 of file BoundingBoxImpl.hpp.

template<int dimension>
const BoundingBox< dimension >::HomogenousVec & jafar::geom::BoundingBox< dimension >::corner1 ( ) const [inline]
Returns:
corner1, which is the "bottom-left corner", for all points of the Atom, all the value of the coordinates of this point are greater than those of corner1.

Definition at line 40 of file BoundingBoxImpl.hpp.

Referenced by jafar::geom::BoundingBox< dimension >::overlap(), and jafar::geom::BoundingBox< dimension >::strictOverlap().

template<int dimension>
const BoundingBox< dimension >::HomogenousVec & jafar::geom::BoundingBox< dimension >::corner2 ( ) const [inline]
Returns:
corner2, which is the "top-right corner", for all points of the Atom, all the value of the coordinates of this point are smaller than those of corner2.

Definition at line 46 of file BoundingBoxImpl.hpp.

Referenced by jafar::geom::BoundingBox< dimension >::overlap(), and jafar::geom::BoundingBox< dimension >::strictOverlap().

template<int dimension>
void jafar::geom::BoundingBox< dimension >::extend ( double  size) [inline]

This function increase the size of the bounding box in all directions.

Parameters:
sizeto increase the bounding box

Definition at line 52 of file BoundingBoxImpl.hpp.

template<int dimension>
bool jafar::geom::BoundingBox< dimension >::isDefined ( ) const [inline]
Returns:
true if this BoundingBox is defined.

Definition at line 75 of file BoundingBoxImpl.hpp.

template<int _dimension_>
bool jafar::geom::BoundingBox< _dimension_ >::overlap ( const BoundingBox< _dimension_ > &  _bb) const [inline]
Parameters:
_bb
Returns:
true if the bounding box given as argument overlap with this bounding box (if only the enveloppe of the bouding box overlapped, then it return true)

Definition at line 107 of file BoundingBoxImpl.hpp.

References jafar::geom::BoundingBox< dimension >::corner1(), and jafar::geom::BoundingBox< dimension >::corner2().

template<int dimension>
bool jafar::geom::BoundingBox< dimension >::strictContains ( const HomogenousVec _point) const [inline]
Returns:
true if this bounding box countains the point (if the point is on the enveloppe of the bouding box, it return false)

Definition at line 94 of file BoundingBoxImpl.hpp.

template<int _dimension_>
bool jafar::geom::BoundingBox< _dimension_ >::strictOverlap ( const BoundingBox< _dimension_ > &  _bb) const [inline]
Parameters:
_bb
Returns:
true if the bounding box given as argument overlap with this bounding box (if only the enveloppe of the bouding box overlapped, then it return false)

Definition at line 124 of file BoundingBoxImpl.hpp.

References jafar::geom::BoundingBox< dimension >::corner1(), and jafar::geom::BoundingBox< dimension >::corner2().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:37 for Jafar by doxygen 1.7.6.1
LAAS-CNRS