136 glRotated(180, 0, 0, 1);
159 glScaled(exaggeration, exaggeration, 1);
160 glTranslated(i.first.x(), i.first.y(),
getType());
161 glRotated(-1 * i.second, 0, 0, 1);
162 glTranslated(0, -1.5, 0);
166 noPoints = (int)(9.0 + s.
scale / 10.0);
174 glTranslated(0, 0, .1);
180 glTranslated(0, 0, .1);
181 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
277 return canParse<Position>(value);
282 return canParse<std::vector<GNELane*> >(
myViewNet->
getNet(), value,
false);
287 return canParse<bool>(value);
289 return canParse<bool>(value);
332 if (parse<bool>(value)) {
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
double scale
information about a lane's width (temporary, used for a single view)
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name) ...
GUIVisualizationTextSettings addName
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
void add(const Position &pos)
Adds the given position to this one.
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
const std::string & getAdditionalID() const
returns Additional ID
static const RGBColor WHITE
static GUIGlID getTexture(GUITexture which)
returns a texture previously defined in the enum GUITexture
std::string getParentName() const
Returns the name of the parent object.
Stores the information about how to visualize structures.
Position offset
The offSet of the block icon.
Position snapToActiveGrid(const Position &pos) const
Returns a position that is mapped to the closest grid point if the grid is active.
void openAdditionalDialog()
open GNEVariableSpeedSignDialog
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
static std::string parseIDs(const std::vector< T > &ACs)
parses a list of specific Attribute Carriers into a string of IDs
static void drawText(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &col=RGBColor::BLACK, const double angle=0, int align=0, double width=-1)
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
Position position
position of the block icon
BlockIcon myBlockIcon
variable BlockIcon
Position getPositionInView() const
Returns position of additional in view.
Position originalViewPosition
value for saving first original position over lane before moving
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.
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
void changeAdditionalID(const std::string &newID)
change ID of additional
std::vector< std::pair< Position, double > > symbolsPositionAndRotation
position and rotation of every symbol over lane
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
AdditionalMove myMove
variable AdditionalMove
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
GUIVisualizationSizeSettings addSize
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void draw() const
draw connections between Parent and childrens
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
A point in 2D or 3D with translation and scaling methods.
PositionVector shape
The shape of the additional element.
std::string myAdditionalName
name of additional
std::vector< PositionVector > connectionPositions
Matrix with the Vertex's positions of connections between parents an their childs.
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
void removeGLObjectFromGrid(GUIGlObject *o)
add GL Object into net
friend class GNEChange_Attribute
declare friend class
void selectAttributeCarrier(bool changeFlag=true)
block movement of a graphic element
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
void updateGeometry(bool updateGrid)
update pre-computed geometry information
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
ChildConnections myChildConnections
variable ChildConnections
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
const std::string getID() const
function to support debugging
std::string getAttribute(SumoXMLAttr key) const
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
bool myBlockMovement
boolean to check if additional element is blocked (i.e. cannot be moved with mouse) ...
std::vector< GNEAdditional * > myAdditionalChilds
vector with the Additional childs
static void drawShapeDottedContour(const int type, const PositionVector &shape, const double width)
draw a dotted contour around the given Non closed shape with certain width
An Element which don't belongs to GNENet but has influency in the simulation.
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
AdditionalGeometry myGeometry
geometry to be precomputed in updateGeometry(...)
const std::string & getTagStr() const
get tag assigned to this object in string format
std::string getGenericParametersStr() const
return generic parameters in string format
~GNEVariableSpeedSign()
Destructor.
GNENet * getNet() const
get the net object
std::string generateAdditionalChildID(SumoXMLTag childTag)
gererate a new ID for an additional child
GNEVariableSpeedSign(const std::string &id, GNEViewNet *viewNet, const Position &pos, const std::vector< GNELane *> &lanes, const std::string &name, bool blockMovement)
Constructor.
GUIGlID getGlID() const
Returns the numerical id of the object.
void update()
update Connection's geometry
Position myPosition
position of VSS in view
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
bool drawForSelecting
whether drawing is performed for the purpose of selecting objects
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
void addGLObjectIntoGrid(GUIGlObject *o)
add GL Object into net
void setRotation(GNELane *additionalLane=nullptr)
set Rotation of block Icon (must be called in updateGeometry(bool updateGrid) function) ...
std::vector< GNELane * > myLaneChilds
vector with the lane childs of this additional
void draw(double size=0.5) const
draw lock icon
trigger: a step description