25 _minP(
Coordinate(std::min(coordA.x(), coordB.x()), std::min(coordA.y(), coordB.y()), std::min(coordA.z(), coordB.z()))),
26 _maxP(
Coordinate(std::max(coordA.x(), coordB.x()), std::max(coordA.y(), coordB.y()), std::max(coordA.z(), coordB.z()))) {
27 if (coordA.
x() != coordB.
x() && coordA.
y() != coordB.
y() && coordA.
z() != coordB.
z()) {
28 throw "Points describe a volume, not a area.";
95 return (point.
x() >=
_minP.
x() - tolerance && point.
x() <=
_maxP.
x() + tolerance && point.
y() >=
_minP.
y() - tolerance && point.
y() <=
_maxP.
y() + tolerance);
129 short pointsInside = 0;
186 if (ret.width() < tolerance || ret.height() < tolerance) {
250 os <<
"Area(" << area.
minP() <<
" " << area.
maxP() <<
")";
const Coordinate minP() const
double x() const
Returns x of Coordinate.
Vector right() const
right vector of this area
Area increaseBy(double increaseBy) const
Area intersection(const Area &other, double tolerance=0.) const
merge two area's and expand if required to largest containing area
Area merge(const Coordinate &other) const
merge two area's and expand if required to largest containing area
double y() const
Returns y of Coordinate.
friend std::ostream & operator<<(std::ostream &os, const Area &area)
bool operator==(const Area &ar) const
checks for the equality of Area
Area merge(const Area &other) const
merge two area's and expand if required to largest containing area
Area(const Coordinate &coord, double width, double height)
Area given at a coordinate with a given width and height.
double z() const
Returns z of Coordinate.
virtual void accept(GeoEntityVisitor &v) const override
Vector top() const
top vector of this area
Area & operator=(const Area &other)
bool inArea(const Area &area) const
inArea test if this object's fits fully in area
short numCornersInside(const Area &otherArea) const
numCornersInside count the number of corners this object has in otherArea
Vector bottom() const
bottom vector of this area
const Coordinate maxP() const
double height() const
height Returns the height of this area
bool inArea(const Coordinate &point, double tolerance=0.) const
Test of a specific point lies within area.
Vector left() const
left vector for this area
double width() const
width Returns the width of this area
bool overlaps(const Area &otherArea) const
overlaps returns true if any overlap is happening between the two area's, even if otherArea fits with...
Area(const Coordinate &coordA, const Coordinate &coordB)