39 bool geo,
const std::string& lane,
double posOverLane,
bool friendlyPos,
double posLat,
40 const std::string& icon,
double layer,
double angle,
const std::string& imgFile,
41 bool relativePath,
double width,
double height) :
42 PointOfInterest(id, type, color, pos, geo, lane, posOverLane, friendlyPos, posLat, icon, layer, angle, imgFile, relativePath, width, height),
123 }
else if (active == 0) {
125 }
else if (active == 1) {
135 const bool disableSelectionColor,
const double layer,
const double width,
const double height) {
140 glTranslated(
POI->x(),
POI->y(), layer + (
double)
POI->getIcon());
141 glRotated(-
POI->getShapeNaviDegree(), 0, 0, 1);
147 width * -0.5 * exaggeration, height * -0.5 * exaggeration,
148 width * 0.5 * exaggeration, height * 0.5 * exaggeration);
156 glTranslated(0, 0, 0.1);
158 glRotated(180, 0, 0, 1);
173 glTranslated(
POI->x(),
POI->y(), 0);
177 glRotated(-s.
angle, 0, 0, 1);
179 glRotated(s.
angle, 0, 0, 1);
183 const int align = (lines.size() > 1 ? 1 : 2) | 16;
184 for (std::string& line : lines) {
186 glRotated(-s.
angle, 0, 0, 1);
188 glRotated(s.
angle, 0, 0, 1);
@ GLO_POI
poi (over view, geo and lane)
GUISelectedStorage gSelected
A global holder of selected objects.
GUIIcon
An enumeration of icons used by the gui applications.
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 pushName(unsigned int name)
push Name
static void drawFilledCircle(const double widradiusth, const int steps=8)
Draws a filled circle around (0,0)
static void popMatrix()
pop matrix
static void popName()
pop Name
static void pushMatrix()
push matrix
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
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
virtual double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
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, bool forceShow=false) 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.
void drawGL(const GUIVisualizationSettings &s) const override
Draws the object.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own parameter window.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own popup-menu.
Boundary getCenteringBoundary() const override
Returns the boundary to which the view shall be centered in order to show the object.
double getExaggeration(const GUIVisualizationSettings &s) const override
return exaggeration associated with this GLObject
static bool checkDraw(const GUIVisualizationSettings &s, const GUIGlObject *o)
check if POI can be drawn
static void drawInnerPOI(const GUIVisualizationSettings &s, const PointOfInterest *POI, const GUIGlObject *o, const bool disableSelectionColor, const double layer, const double width, const double height)
draw inner POI (before pushName() )
GUIPointOfInterest(const std::string &id, const std::string &type, const RGBColor &color, const Position &pos, bool geo, const std::string &lane, double posOverLane, bool friendlyPos, double posLat, const std::string &icon, 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
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 GUIGlID getPOITexture(POIIcon POIIcon)
returns texture associated to the given POI image
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 poiUseCustomLayer
whether the rendering layer of POIs should be overriden
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 poiCustomLayer
the custom layer for POIs
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
int poiDetail
The detail level for drawing POIs.
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 getHeight() const
Returns the image height of the POI.
double getWidth() const
Returns the image width of the POI.
const std::string & getIconStr() const
get icon(in string format)
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.
static const std::string DEFAULT_IMG_FILE
const std::string & getShapeType() const
Returns the (abstract) type of the Shape.
double getShapeLayer() const
Returns the layer of the Shape.
const std::string & getShapeImgFile() const
Returns the imgFile 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.
bool show(const GUIGlObject *o) const
whether to show the text
double scaledSize(double scale, double constFactor=0.1) const
get scale size