44 const std::string& lane,
double posOverLane,
double posLat,
45 double layer,
double angle,
const std::string& imgFile,
46 bool relativePath,
double width,
double height) :
47 PointOfInterest(id, type, color, pos, geo, lane, posOverLane, posLat, layer, angle, imgFile, relativePath, width, height),
120 }
else if (active == 0) {
122 }
else if (active == 1) {
132 const bool disableSelectionColor,
const double layer) {
136 glTranslated(
POI->x(),
POI->y(), layer);
137 glRotated(-
POI->getShapeNaviDegree(), 0, 0, 1);
143 POI->getWidth() * -0.5 * exaggeration,
POI->getHeight() * -0.5 * exaggeration,
144 POI->getWidth() * 0.5 * exaggeration,
POI->getHeight() * 0.5 * exaggeration);
165 glTranslated(
POI->x(),
POI->y(), 0);
169 glRotated(-s.
angle, 0, 0, 1);
171 glRotated(s.
angle, 0, 0, 1);
175 const int align = (lines.size() > 1 ? 1 : 2) | 16;
176 for (std::string& line : lines) {
178 glRotated(-s.
angle, 0, 0, 1);
180 glRotated(s.
angle, 0, 0, 1);
GUISelectedStorage gSelected
A global holder of selected objects.
A class that stores a 2D geometrical boundary.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
void growHeight(double by)
Increases the height of the boundary (y-axis)
Boundary & grow(double by)
extends the boundary by the given amount
void growWidth(double by)
Increases the width of the boundary (x-axis)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
static void drawTextSettings(const GUIVisualizationTextSettings &settings, const std::string &text, const Position &pos, const double scale, const double angle=0, const double layer=2048, const int align=0)
void buildShapePopupOptions(GUIMainWindow &app, GUIGLObjectPopupMenu *ret, const std::string &type)
build basic shape popup options. Used to unify pop-ups menu in netedit and SUMO-GUI
GUIGlID getGlID() const
Returns the numerical id of the object.
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
A window containing a gl-object's parameter.
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
static void drawInnerPOI(const GUIVisualizationSettings &s, const PointOfInterest *POI, const GUIGlObject *o, const bool disableSelectionColor, const double layer)
draw inner POI (before pushName() )
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
static bool checkDraw(const GUIVisualizationSettings &s, const GUIGlObject *o)
check if POI can be drawn
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
GUIPointOfInterest(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, double angle, const std::string &imgFile, bool relativePath, double width, double height)
Constructor.
virtual ~GUIPointOfInterest()
Destructor.
static void setColor(const GUIVisualizationSettings &s, const PointOfInterest *POI, const GUIGlObject *o, bool forceSelectionColor)
set color
const T getColor(const double value) const
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
static int getTextureID(const std::string &filename, const bool mirrorX=false)
return texture id for the given filename (initialize on first use)
Stores the information about how to visualize structures.
bool drawForRectangleSelection
whether drawing is performed for the purpose of selecting objects using a rectangle
GUIVisualizationTextSettings poiType
GUIVisualizationSizeSettings poiSize
GUIColorer poiColorer
The POI colorer.
GUIVisualizationTextSettings poiName
double scale
information about a lane's width (temporary, used for a single view)
bool netedit
Whether the settings are for Netedit.
GUIVisualizationTextSettings poiText
std::string poiTextParam
key for rendering poi textual parameter
double angle
The current view rotation angle.
C++ TraCI client API implementation.
double myHalfImgHeight
The half height of the image when rendering this POI.
double myHalfImgWidth
The half width of the image when rendering this POI.
A point in 2D or 3D with translation and scaling methods.
Position()
default constructor
double x() const
Returns the x-position.
double y() const
Returns the y-position.
const std::string & getShapeImgFile() const
Returns the imgFile of the Shape.
static const std::string DEFAULT_IMG_FILE
double getShapeLayer() const
Returns the layer of the Shape.
const std::string & getShapeType() const
Returns the (abstract) type of the Shape.
static const int NEWLINE
identifier for splitting the given string at all newline characters
std::vector< std::string > getVector()
return vector of strings
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
double minSize
The minimum size to draw this object.
double scaledSize(double scale, double constFactor=0.1) const
get scale size