BoundBox Class Reference
[Spaces]

Bounding box, represents 2D margins. More...

#include <BoundBox.h>

List of all members.

Public Member Functions

 BoundBox ()
 Default constructor.
 BoundBox (Decimal xm, Decimal ym, Decimal xM, Decimal yM)
 BoundBox (Position p1, Position p2)
void extend (BoundBox bb)
void extend (Position p)
Decimal diameter ()
Decimal width ()
Decimal height ()
Position center ()
const BoundBox operator* (Pose p)
void clear ()

Public Attributes

Decimal xm
 current BB xmin
Decimal ym
 current BB ymin
Decimal xM
 current BB xmax
Decimal yM
 current BB xmax

Protected Member Functions

void unlock ()
 Change the effect of the extend method.
void lock ()
 Change the effect of the extend method.

Protected Attributes

bool _clear
 the first extension reset the bb
bool _locked
 the bb can't be extended

Static Protected Attributes

static const Decimal BB_DEFAULT_XMIN = -1.0
 default BB xmin
static const Decimal BB_DEFAULT_YMIN = -1.0
 default BB ymin
static const Decimal BB_DEFAULT_XMAX = 1.0
 default BB xmax
static const Decimal BB_DEFAULT_YMAX = 1.0
 default BB xmax


Detailed Description

Bounding box, represents 2D margins.

Author:
Antonio Franchi

Constructor & Destructor Documentation

BoundBox::BoundBox (  ) 

Default constructor.

BoundBox::BoundBox ( Decimal  xm,
Decimal  ym,
Decimal  xM,
Decimal  yM 
)

Constructor with parameters

Parameters:
xm desired BB xmin
ym desired BB ymin
xM desired BB xmax
yM desired BB xmax

BoundBox::BoundBox ( Position  p1,
Position  p2 
)

Constructor with parameters

Parameters:
p1 desired BB (xmin,ymin)
p2 desired BB (xmax,ymax)


Member Function Documentation

void BoundBox::unlock (  )  [inline, protected]

Change the effect of the extend method.

void BoundBox::lock (  )  [inline, protected]

Change the effect of the extend method.

void BoundBox::extend ( BoundBox  bb  ) 

Overlaps the current bb with anoter bounding box, extending the current bounding box to the minimum one that contanis both.

Parameters:
bb the second bounding box

void BoundBox::extend ( Position  p  ) 

Extends the current bb with a position, extending the current bounding box to the minimum one that contanis the current bb and the position.

Parameters:
bb the second bounding box

Decimal BoundBox::diameter (  )  [inline]

Gets the diameter of the current bb

Returns:
the diameter of the current bb

Decimal BoundBox::width (  )  [inline]

Gets the width of the current bb

Returns:
the width of the current bb

Decimal BoundBox::height (  )  [inline]

Gets the height of the current bb

Returns:
the height of the current bb

Position BoundBox::center (  )  [inline]

Gets the center of the current bb.

Returns:
the center of the current bb

const BoundBox BoundBox::operator* ( Pose  p  ) 

Rototranslate the current bb by a pose.

Parameters:
p pose by mean performing the rototranslation

void BoundBox::clear ( void   )  [inline]

Change the effect of the extend method. The first extend after this clear will restart from the scratch.


Member Data Documentation

const Decimal BoundBox::BB_DEFAULT_XMIN = -1.0 [static, protected]

default BB xmin

const Decimal BoundBox::BB_DEFAULT_YMIN = -1.0 [static, protected]

default BB ymin

const Decimal BoundBox::BB_DEFAULT_XMAX = 1.0 [static, protected]

default BB xmax

const Decimal BoundBox::BB_DEFAULT_YMAX = 1.0 [static, protected]

default BB xmax

bool BoundBox::_clear [protected]

the first extension reset the bb

bool BoundBox::_locked [protected]

the bb can't be extended

current BB xmin

current BB ymin

current BB xmax

current BB xmax


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

Generated on Mon Feb 20 07:01:09 2017 for MIP by  doxygen 1.5.6