 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
47 Boundary(
double x1,
double y1,
double x2,
double y2);
50 Boundary(
double x1,
double y1,
double z1,
double x2,
double y2,
double z2);
59 void add(
double x,
double y,
double z = 0);
139 void moveby(
double x,
double y,
double z = 0);
void moveby(double x, double y, double z=0)
Moves the boundary by the given amount.
double getZRange() const
Returns the elevation range of the boundary (z-axis)
double zmax() const
Returns maximum z-coordinate.
double ymin() const
Returns minimum y-coordinate.
double distanceTo2D(const Position &p) const
returns the euclidean distance in the x-y-plane
double xmax() const
Returns maximum x-coordinate.
bool partialWithin(const AbstractPoly &poly, double offset=0) const
Returns whether the boundary is partially within the given polygon.
double getHeight() const
Returns the height of the boundary (y-axis)
bool around(const Position &p, double offset=0) const
Returns whether the AbstractPoly the given coordinate.
void reset()
Resets the boundary.
void set(double xmin, double ymin, double xmax, double ymax)
Sets the boundary to the given values.
double xmin() const
Returns minimum x-coordinate.
friend std::ostream & operator<<(std::ostream &os, const Boundary &b)
Output operator.
A class that stores a 2D geometrical boundary.
double getWidth() const
Returns the width of the boudary (x-axis)
A point in 2D or 3D with translation and scaling methods.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
bool crosses(const Position &p1, const Position &p2) const
Returns whether the boundary crosses the given line.
void growWidth(double by)
Increases the width of the boundary (x-axis)
double myXmin
The boundaries.
bool myWasInitialised
Information whether the boundary was initialised.
bool operator!=(const Boundary &b) const
Comparison operator not equal.
Position getCenter() const
Returns the center of the boundary.
bool operator==(const Boundary &b) const
Comparison operator equal.
bool isInitialised() const
check if Boundary is Initialised
Boundary & grow(double by)
extends the boundary by the given amount
Boundary()
Constructor - the boundary is unset.
void flipY()
flips ymin and ymax
double zmin() const
Returns minimum z-coordinate.
void growHeight(double by)
Increases the height of the boundary (y-axis)
double ymax() const
Returns maximum y-coordinate.
bool overlapsWith(const AbstractPoly &poly, double offset=0) const
Returns whether the boundary overlaps with the given polygon.