 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
19 #ifndef PointOfInterest_h
20 #define PointOfInterest_h
63 const std::string& lane,
double posOverLane,
double posLat,
70 Shape(id, type, color, layer, angle, imgFile, relativePath),
123 void writeXML(
OutputDevice& out,
const bool geo =
false,
const double zOffset = 0.,
const std::string laneID =
"",
const double pos = 0.,
const double posLat = 0.) {
An upper class for objects with additional parameters.
virtual ~PointOfInterest()
Destructor.
Static storage of an output device and its base (abstract) implementation.
double getShapeNaviDegree() const
Returns the angle of the Shape in navigational degrees.
bool myGeo
flag to check if POI was loaded as GEO Position (main used by netedit)
double getHeight() const
Returns the image height of the POI.
void writeXML(OutputDevice &out, const bool geo=false, const double zOffset=0., const std::string laneID="", const double pos=0., const double posLat=0.)
static const double DEFAULT_LAYER
void setPrecision(int precision=gPrecision)
Sets the precison or resets it to default.
@ SUMO_ATTR_COLOR
A color information.
@ SUMO_TAG_POI
begin/end of the description of a Point of interest
const std::string & getShapeImgFile() const
Returns the imgFile of the Shape.
double myPosOverLane
position over lane in which this POI is placed (main used by netedit)
const RGBColor & getShapeColor() const
Returns the color of the Shape.
void writeParams(OutputDevice &device) const
write Params in the given outputdevice
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
static std::string getFilePath(const std::string &path)
Removes the file information from the given path.
static const double DEFAULT_IMG_HEIGHT
static const bool DEFAULT_RELATIVEPATH
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
double myHalfImgWidth
The half width of the image when rendering this POI.
double getShapeLayer() const
Returns the layer of the Shape.
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
static std::string escapeXML(const std::string &orig, const bool maskDoubleHyphen=false)
Replaces the standard escapes by their XML entities.
void setWidth(double width)
set the image width of the POI
@ SUMO_ATTR_LAYER
A layer number.
double myHalfImgHeight
The half height of the image when rendering this POI.
void cartesian2geo(Position &cartesian) const
Converts the given cartesian (shifted) position to its geo (lat/long) representation.
void setHeight(double height)
set the image height of the POI
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
const std::string & getShapeType() const
Returns the (abstract) type of the Shape.
Position getCenter() const
Returns the image center of the POI.
std::string myLane
ID of lane in which this POI is placed (main used by netedit)
bool getShapeRelativePath() const
Returns the relativePath of the Shape.
double myPosLat
latereal position over lane in which this POI is placed (main used by netedit)
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
double y() const
Returns the y-position.
double getWidth() const
Returns the image width of the POI.
static const double DEFAULT_ANGLE
static const std::string DEFAULT_IMG_FILE
const std::string & getID() const
Returns the id.
PointOfInterest(const std::string &id, const std::string &type, const RGBColor &color, const Position &pos, bool geo, const std::string &lane, double posOverLane, double posLat, double layer=DEFAULT_LAYER, double angle=DEFAULT_ANGLE, const std::string &imgFile=DEFAULT_IMG_FILE, bool relativePath=DEFAULT_RELATIVEPATH, double width=DEFAULT_IMG_WIDTH, double height=DEFAULT_IMG_HEIGHT)
Constructor.
static const double DEFAULT_IMG_WIDTH