|
SUMO - Simulation of Urban MObility
|
A 2D- or 3D-polygon. More...
#include <Polygon.h>
Public Member Functions | |
| Polygon (const std::string &name, const std::string &type, const RGBColor &color, const PositionVector &shape, bool fill) | |
| Constructor. | |
| virtual | ~Polygon () |
| Destructor. | |
Getter | |
| const std::string & | getID () const |
| Returns the name of the polygon. | |
| const std::string & | getType () const |
| Returns the (abstract) type of the polygon. | |
| const RGBColor & | getColor () const |
| Returns the color of the polygon. | |
| const PositionVector & | getShape () const |
| Returns the shape of the polygon. | |
| bool | fill () const |
| Returns whether the polygon is filled. | |
Setter | |
| void | setType (const std::string &type) |
| Sets a new type. | |
| void | setColor (const RGBColor &col) |
| Sets a new color. | |
| void | setShape (const PositionVector &shape) |
| Sets a new shape. | |
| void | setFill (bool fill) |
| Sets whether the polygon shall be filled. | |
Protected Attributes | |
| RGBColor | myColor |
| The color of the polygon. | |
| bool | myFill |
| Information whether the polygon has to be filled. | |
| std::string | myName |
| The name of the polygon. | |
| PositionVector | myShape |
| The positions of the polygon. | |
| std::string | myType |
| The type of the polygon. | |
| Polygon::Polygon | ( | const std::string & | name, |
| const std::string & | type, | ||
| const RGBColor & | color, | ||
| const PositionVector & | shape, | ||
| bool | fill | ||
| ) |
Constructor.
| [in] | name | The name of the polygon |
| [in] | type | The (abstract) type of the polygon |
| [in] | color | The color of the polygon |
| [in] | shape | The shape of the poslygon |
| [in] | fill | Whether the polygon shall be filled |
Definition at line 43 of file Polygon.cpp.
|
virtual |
Destructor.
Definition at line 49 of file Polygon.cpp.
|
inline |
Returns whether the polygon is filled.
Definition at line 105 of file Polygon.h.
References myFill.
Referenced by GUIPolygon::drawGL(), TraCIServerAPI_Polygon::processGet(), and setFill().
|
inline |
Returns the color of the polygon.
Definition at line 89 of file Polygon.h.
References myColor.
Referenced by GUIPolygon::drawGL(), and TraCIServerAPI_Polygon::processGet().
|
inline |
Returns the name of the polygon.
Definition at line 73 of file Polygon.h.
References myName.
Referenced by ShapeContainer::add().
|
inline |
Returns the shape of the polygon.
Definition at line 97 of file Polygon.h.
References myShape.
Referenced by PCPolyContainer::insert(), and TraCIServerAPI_Polygon::processGet().
|
inline |
Returns the (abstract) type of the polygon.
Definition at line 81 of file Polygon.h.
References myType.
Referenced by TraCIServerAPI_Polygon::processGet().
|
inline |
Sets a new color.
| [in] | col | The new color to use |
Definition at line 126 of file Polygon.h.
References myColor.
Referenced by GUIPolygon::drawGL(), and TraCIServerAPI_Polygon::processSet().
|
inline |
Sets whether the polygon shall be filled.
| [in] | fill | Whether the polygon shall be filled |
Definition at line 142 of file Polygon.h.
References fill(), and myFill.
Referenced by TraCIServerAPI_Polygon::processSet().
|
inline |
Sets a new shape.
| [in] | shape | The new shape to use |
Definition at line 134 of file Polygon.h.
References myShape.
Referenced by ShapeContainer::reshapePolygon(), and GUIShapeContainer::reshapePolygon().
|
inline |
Sets a new type.
| [in] | type | The new type to use |
Definition at line 118 of file Polygon.h.
References myType.
Referenced by TraCIServerAPI_Polygon::processSet().
|
protected |
The color of the polygon.
Definition at line 156 of file Polygon.h.
Referenced by getColor(), and setColor().
|
protected |
|
protected |
|
protected |
The positions of the polygon.
Definition at line 159 of file Polygon.h.
Referenced by GUIPolygon::drawGL(), GUIPolygon::getCenteringBoundary(), getShape(), and setShape().
|
protected |
The type of the polygon.
Definition at line 153 of file Polygon.h.
Referenced by GUIPolygon::getPopUpMenu(), getType(), and setType().