43 double layer,
double angle,
const std::string& imgFile) :
44 Shape(id, type, color, layer, angle, imgFile),
67 for (
int i = 0; i < (int) shape.size(); i++) {
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
static const std::string DEFAULT_IMG_FILE
const PositionVector & getShape() const
Returns whether the shape of the polygon.
SUMOPolygon(const std::string &id, const std::string &type, const RGBColor &color, const PositionVector &shape, bool geo, bool fill, double layer=DEFAULT_LAYER, double angle=DEFAULT_ANGLE, const std::string &imgFile=DEFAULT_IMG_FILE)
Constructor.
const std::string & getID() const
Returns the id.
virtual ~SUMOPolygon()
Destructor.
const std::string & getImgFile() const
Returns the imgFile of the Shape.
void writeParams(OutputDevice &out) const
double getLayer() const
Returns the layer of the Shape.
void cartesian2geo(Position &cartesian) const
Converts the given cartesian (shifted) position to its geo (lat/long) representation.
double getNaviDegree() const
Returns the angle of the Shape in navigational degrees.
edge: the shape in xml-definition
static std::string escapeXML(const std::string &orig, const bool maskDoubleHyphen=false)
Replaces the standard escapes by their XML entities.
bool getFill() const
Returns whether the polygon is filled.
const std::string & getType() const
Returns the (abstract) type of the Shape.
const RGBColor & getColor() const
Returns the color of the Shape.
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
void writeXML(OutputDevice &out, bool geo=false)
Static storage of an output device and its base (abstract) implementation.
bool closeTag()
Closes the most recently opened tag.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
static const double DEFAULT_ANGLE
begin/end of the description of a polygon