 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
39 GNEAdditional(id, viewNet,
GLO_VSS,
SUMO_TAG_VSS, name, blockMovement, {}, {}, {}, {}, {}, {}, lanes, {}, {}, {}),
139 glScaled(exaggeration, exaggeration, 1);
143 glRotated(180, 0, 0, 1);
242 return canParse<Position>(value);
247 return canParse<std::vector<GNELane*> >(
myViewNet->
getNet(), value,
false);
252 return canParse<bool>(value);
254 return canParse<bool>(value);
305 if (parse<bool>(value)) {
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name)
Position position
position of the block icon
bool isAttributeEnabled(SumoXMLAttr key) const
void splitEdgeGeometry(const double splitPosition, const GNENetElement *originalElement, const GNENetElement *newElement, GNEUndoList *undoList)
split geometry
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
An Element which don't belongs to GNENet but has influency in the simulation.
std::string getParametersStr() const
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
const std::string & getAdditionalID() const
const std::string getID() const
function to support debugging
void setRotation(GNELane *additionalLane=nullptr)
set Rotation of block Icon (must be called in updateGeometry() function)
Boundary movingGeometryBoundary
boundary used during moving of elements (to avoid insertion in RTREE
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
bool drawForRectangleSelection
whether drawing is performed for the purpose of selecting objects using a rectangle
static std::string parseIDs(const std::vector< T > &ACs)
parses a list of specific Attribute Carriers into a string of IDs
bool drawBoundaries
enable or disable draw boundaries
void removeGLObjectFromGrid(GUIGlObject *o)
add GL Object into net
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(....
std::string generateChildID(SumoXMLTag childTag)
gererate a new ID for an element child
void drawChildConnections(const GUIVisualizationSettings &s, const GUIGlObjectType GLTypeParent) const
void updateGeometry()
update pre-computed geometry information
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
void changeAdditionalID(const std::string &newID)
change ID of additional
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
BlockIcon myBlockIcon
variable BlockIcon
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Position snapToActiveGrid(const Position &pos, bool snapXY=true) const
Returns a position that is mapped to the closest grid point if the grid is active.
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
std::string getAttribute(SumoXMLAttr key) const
AdditionalMove myMove
variable AdditionalMove
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
double getAttributeDouble(SumoXMLAttr key) const
static void drawBoundary(const Boundary &b)
Draw a boundary (used for debugging)
friend class GNEChange_Attribute
declare friend class
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
GNENet * getNet() const
get the net object
const std::vector< GNELane * > & getChildLanes() const
get child lanes
Position getPositionInView() const
Returns position of additional in view.
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
void update()
update Connection's geometry
GUIVisualizationTextSettings addName
GUIVisualizationDetailSettings detailSettings
detail settings
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
void selectAttributeCarrier(bool changeFlag=true)
GUIGlID getGlID() const
Returns the numerical id of the object.
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
A class that stores a 2D geometrical boundary.
parameters "key1=value1|key2=value2|...|keyN=valueN"
static GUIGlID getTexture(GUITexture which)
returns a texture previously defined in the enum GUITexture
static void drawShapeDottedContourRectangle(const GUIVisualizationSettings &s, const int type, const Position ¢er, const double width, const double height, const double rotation=0, const double offsetX=0, const double offsetY=0)
draw a dotted contour around the given Position with certain width and height
double scale
information about a lane's width (temporary, used for a single view)
trigger: a step description
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
~GNEVariableSpeedSign()
Destructor.
std::string myAdditionalName
name of additional
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes
void changeChildLanes(GNEAdditional *elementChild, const std::string &newEdgeIDs)
change child edges of an additional
static const double laneTextures
details for lane textures
bool myBlockMovement
boolean to check if additional element is blocked (i.e. cannot be moved with mouse)
static void drawShapeDottedContourAroundShape(const GUIVisualizationSettings &s, const int type, const PositionVector &shape, const double width)
draw a dotted contour around the given Non closed shape with certain width
void setParametersStr(const std::string ¶msString)
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void drawIcon(const GUIVisualizationSettings &s, const double exaggeration, const double size=0.5) const
draw lock icon
void addGLObjectIntoGrid(GUIGlObject *o)
add GL Object into net
double y() const
Returns the y-position.
ChildConnections myChildConnections
variable ChildConnections
static bool areParametersValid(const std::string &value, bool report=false)
check if given string can be parsed to a parameters map "key1=value1|key2=value2|....
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
block movement of a graphic element
bool drawAdditionals(const double exaggeration) const
check if additionals must be drawn
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
GNEVariableSpeedSign(const std::string &id, GNEViewNet *viewNet, const Position &pos, const std::vector< GNELane * > &lanes, const std::string &name, bool blockMovement)
Constructor.
Position myPosition
position of VSS in view
GUIVisualizationSizeSettings addSize
void add(const Position &pos)
Adds the given position to this one.
bool isInitialised() const
check if Boundary is Initialised
Boundary & grow(double by)
extends the boundary by the given amount
bool drawDetail(const double detail, const double exaggeration) const
check if details can be drawn for the given GUIVisualizationDetailSettings and current scale and exxa...
const std::string & getTagStr() const
get tag assigned to this object in string format
Stores the information about how to visualize structures.
std::string getParentName() const
Returns the name of the parent object.
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Position originalViewPosition
value for saving first original position over lane before moving
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
const std::vector< GNEAdditional * > & getChildAdditionals() const
return child additionals
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
void openAdditionalDialog()
open GNEVariableSpeedSignDialog
Position offset
The offSet of the block icon.
std::vector< PositionVector > connectionPositions
Matrix with the Vertex's positions of connections between parents an their children.
static const RGBColor WHITE