A single region; basically just a container class for four doubles. More...
#include <PlotMSRegions.h>
Public Member Functions | |
PlotMSRegion () | |
Default constructor, which creates an invalid region in which all four values are zero. | |
PlotMSRegion (double xMin, double xMax, double yMin, double yMax) | |
Constructor that takes the four values of the region. | |
PlotMSRegion (const PlotMSRegion ©) | |
Copy constructor (see operator=()). | |
~PlotMSRegion () | |
Destructor. | |
bool | isValid () const |
Returns whether or not this region is valid. | |
bool | contains (double x, double y, bool exclusive=true) const |
Returns whether or not this region contains the given (x, y) pair. | |
double | left () const |
Returns the region values. | |
double | right () const |
double | bottom () const |
double | top () const |
double | xMin () const |
double | xMax () const |
double | yMin () const |
double | yMax () const |
void | setValues (double xMin, double xMax, double yMin, double yMax) |
Sets the region values. | |
void | setX (double min, double max) |
void | setY (double min, double max) |
void | setXMin (double val) |
void | setXMax (double val) |
void | setYMin (double val) |
void | setYMax (double val) |
void | setLeft (double val) |
void | setRight (double val) |
void | setBottom (double val) |
void | setTop (double val) |
bool | operator== (const PlotMSRegion ®ion) const |
Equality operators. | |
bool | operator!= (const PlotMSRegion ®ion) const |
PlotMSRegion & | operator= (const PlotMSRegion ©) |
Copy operator. | |
Private Attributes | |
double | itsXMin_ |
Values. | |
double | itsXMax_ |
double | itsYMin_ |
double | itsYMax_ |
A single region; basically just a container class for four doubles.
Definition at line 37 of file PlotMSRegions.h.
casa::PlotMSRegion::PlotMSRegion | ( | ) |
Default constructor, which creates an invalid region in which all four values are zero.
casa::PlotMSRegion::PlotMSRegion | ( | double | xMin, | |
double | xMax, | |||
double | yMin, | |||
double | yMax | |||
) |
Constructor that takes the four values of the region.
casa::PlotMSRegion::PlotMSRegion | ( | const PlotMSRegion & | copy | ) |
Copy constructor (see operator=()).
casa::PlotMSRegion::~PlotMSRegion | ( | ) |
Destructor.
double casa::PlotMSRegion::bottom | ( | ) | const [inline] |
Definition at line 65 of file PlotMSRegions.h.
References yMin().
bool casa::PlotMSRegion::contains | ( | double | x, | |
double | y, | |||
bool | exclusive = true | |||
) | const |
Returns whether or not this region contains the given (x, y) pair.
If exclusive is true, then the borders are not included.
bool casa::PlotMSRegion::isValid | ( | ) | const |
Returns whether or not this region is valid.
A region is invalid if either of its maxes are <= its mins.
double casa::PlotMSRegion::left | ( | ) | const [inline] |
bool casa::PlotMSRegion::operator!= | ( | const PlotMSRegion & | region | ) | const [inline] |
Definition at line 93 of file PlotMSRegions.h.
References operator==().
PlotMSRegion& casa::PlotMSRegion::operator= | ( | const PlotMSRegion & | copy | ) |
Copy operator.
bool casa::PlotMSRegion::operator== | ( | const PlotMSRegion & | region | ) | const |
Equality operators.
Referenced by operator!=().
double casa::PlotMSRegion::right | ( | ) | const [inline] |
Definition at line 64 of file PlotMSRegions.h.
References xMax().
void casa::PlotMSRegion::setBottom | ( | double | val | ) | [inline] |
Definition at line 85 of file PlotMSRegions.h.
References setYMin().
void casa::PlotMSRegion::setLeft | ( | double | val | ) | [inline] |
Definition at line 83 of file PlotMSRegions.h.
References setXMin().
void casa::PlotMSRegion::setRight | ( | double | val | ) | [inline] |
Definition at line 84 of file PlotMSRegions.h.
References setXMax().
void casa::PlotMSRegion::setTop | ( | double | val | ) | [inline] |
Definition at line 86 of file PlotMSRegions.h.
References setYMax().
void casa::PlotMSRegion::setValues | ( | double | xMin, | |
double | xMax, | |||
double | yMin, | |||
double | yMax | |||
) |
Sets the region values.
void casa::PlotMSRegion::setX | ( | double | min, | |
double | max | |||
) |
void casa::PlotMSRegion::setXMax | ( | double | val | ) |
Referenced by setRight().
void casa::PlotMSRegion::setXMin | ( | double | val | ) |
Referenced by setLeft().
void casa::PlotMSRegion::setY | ( | double | min, | |
double | max | |||
) |
void casa::PlotMSRegion::setYMax | ( | double | val | ) |
Referenced by setTop().
void casa::PlotMSRegion::setYMin | ( | double | val | ) |
Referenced by setBottom().
double casa::PlotMSRegion::top | ( | ) | const [inline] |
Definition at line 66 of file PlotMSRegions.h.
References yMax().
double casa::PlotMSRegion::xMax | ( | ) | const |
Referenced by right().
double casa::PlotMSRegion::xMin | ( | ) | const |
Referenced by left().
double casa::PlotMSRegion::yMax | ( | ) | const |
Referenced by top().
double casa::PlotMSRegion::yMin | ( | ) | const |
Referenced by bottom().
double casa::PlotMSRegion::itsXMax_ [private] |
Definition at line 102 of file PlotMSRegions.h.
double casa::PlotMSRegion::itsXMin_ [private] |
Values.
Definition at line 102 of file PlotMSRegions.h.
double casa::PlotMSRegion::itsYMax_ [private] |
Definition at line 102 of file PlotMSRegions.h.
double casa::PlotMSRegion::itsYMin_ [private] |
Definition at line 102 of file PlotMSRegions.h.