43 const RGBColor& color,
const Position& pos,
bool geo,
const std::string& lane,
44 double posOverLane,
bool friendlyPos,
double posLat,
double layer,
double angle,
45 const std::string& imgFile,
bool relativePath,
double width,
double height) :
46 PointOfInterest(id, type, color, pos, geo, lane, posOverLane, friendlyPos, posLat, layer, angle, imgFile, relativePath, width, height),
126 }
else if (active == 0) {
128 }
else if (active == 1) {
138 const bool disableSelectionColor,
const double layer,
const double width,
const double height) {
142 glTranslated(
POI->x(),
POI->y(), layer);
143 glRotated(-
POI->getShapeNaviDegree(), 0, 0, 1);
149 width * -0.5 * exaggeration, height * -0.5 * exaggeration,
150 width * 0.5 * exaggeration, height * 0.5 * exaggeration);
171 glTranslated(
POI->x(),
POI->y(), 0);
175 glRotated(-s.
angle, 0, 0, 1);
177 glRotated(s.
angle, 0, 0, 1);
181 const int align = (lines.size() > 1 ? 1 : 2) | 16;
182 for (std::string& line : lines) {
184 glRotated(-s.
angle, 0, 0, 1);
186 glRotated(s.
angle, 0, 0, 1);
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 drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
static void pushName(unsigned int name)
push Name
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
virtual double getExaggeration(const GUIVisualizationSettings &s) const =0
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.
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, double layer, double angle, const std::string &imgFile, bool relativePath, double width, double height)
Constructor.
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() )
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
bool drawForPositionSelection
whether drawing is performed for the purpose of selecting objects with a single click
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.
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