121 if (
myName.empty() ==
false) {
136 const std::vector<std::string>&
167 if (s.
scale * exaggeration >= 10) {
180 for (
int i = 0; i < (int)
myLines.size(); ++i) {
188 glRotated(180, 1, 0, 0);
194 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
203 glTranslated(1.2, -(
double)i, 0);
219 if (s.
scale * exaggeration > 25) {
220 noPoints =
MIN2((
int)(9.0 + (s.
scale * exaggeration) / 10.0), 36);
224 glScaled(exaggeration, exaggeration, 1);
237 glTranslated(0, 0, .1);
250 if (s.
scale * exaggeration >= 4.5) {
340 if (canParse<double>(value)) {
347 if (canParse<double>(value)) {
356 return canParse<bool>(value);
358 return canParse<std::vector<std::string> >(value);
360 return canParse<bool>(value);
398 myLines = GNEAttributeCarrier::parse<std::vector<std::string> >(value);
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
int pfDrawString(const char *c)
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
void setBlockIconRotation()
~GNEContainerStop()
Destructor.
double scale
information about a lane's width (temporary, used for a single view)
static void drawBoxLines(const PositionVector &geom, const std::vector< double > &rots, const std::vector< double > &lengths, double width, int cornerDetail=0, double offset=0)
Draws thick lines.
GUIVisualizationTextSettings addName
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
void pfSetScale(double s)
double getAbsoluteStartPosition() const
get absolute start Position
double x() const
Returns the x-position.
GNELane * myLane
The lane this additional belongs.
Stores the information about how to visualize structures.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
bool isAdditionalSelected() const
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
bool myFriendlyPosition
Flag for friendly position.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
void pfSetPosition(double x, double y)
std::vector< double > myShapeRotations
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
GUIGlID getGlID() const
Returns the numerical id of the object.
void undo()
undo the last command group
static OptionsCont & getOptions()
Retrieves the options.
GNEUndoList * getUndoList() const
get the undoList object
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
static bool isValidID(const std::string &value)
true if value is a valid sumo ID
GUIVisualizationSizeSettings addSize
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
std::string getAttribute(SumoXMLAttr key) const
This functions has to be implemented in allGNEAttributeCarrier.
static const RGBColor selectedAdditionalColor
color of selected additionals
double getExaggeration(const GUIVisualizationSettings &s, double factor=20) const
return the drawing size including exaggeration and constantSize values
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
GNEEdge & getParentEdge()
Returns underlying parent edge.
const std::string & getAdditionalID() const
returns the ID of additional
void refreshAdditional(GNEAdditional *additional)
refreshes boundary information of an additional after a geometry update
PositionVector myShape
The shape of the additional element.
A point in 2D or 3D with translation and scaling methods.
void updateGeometry()
update pre-computed geometry information
GNELane * retrieveLane(const std::string &id, bool failHard=true)
get lane by id
std::vector< std::string > myLines
The list of lines that are assigned to this stop.
friend class GNEChange_Attribute
declare friend class
double y() const
Returns the y-position.
block movement of a graphic element
const std::vector< std::string > & getLines() const
get string vector with the lines of the busStop
std::vector< double > myShapeLengths
The lengths of the shape parts.
void setAdditionalID(const std::string &id)
set the ID of additional
void writeAdditional(OutputDevice &device, bool volatileOptionsEnabled) const
writte additional element into a xml file
const std::string getID() const
function to support debugging
void drawLockIcon(double size=0.5) const
draw lock icon
void changeLane(const std::string &laneID)
change lane of additional
void move2side(double amount)
move position vector to side using certain ammount
std::string myName
name of stoppingPlace
std::string getAttribute(SumoXMLAttr key) const
This functions has to be implemented in allGNEAttributeCarrier.
GNEAdditional * getAdditional(SumoXMLTag type, const std::string &id) const
Returns the named additional.
bool myBlocked
boolean to check if additional element is blocked (i.e. cannot be moved with mouse) ...
const std::vector< GNELane * > & getLanes()
returns a reference to the lane vector
double myEndPosRelative
The relative [0,1] end position this stopping place is located at.
double myStartPosRelative
The relative [0,1] start position this stopping place is located at.
GNENet * getNet() const
get the net object
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
Position getLineCenter() const
get line center
void setStoppingPlaceGeometry()
set geometry common to all stopping places
SumoXMLTag getTag() const
get XML Tag assigned to this object
Static storage of an output device and its base (abstract) implementation.
bool closeTag()
Closes the most recently opened tag.
GNEContainerStop(const std::string &id, GNELane *lane, GNEViewNet *viewNet, double startPos, double endPos, const std::string &name, const std::vector< std::string > &lines, bool friendlyPosition)
Constructor.
static const RGBColor selectionColor
double getAbsoluteEndPosition() const
get absolute end Position
Position mySignPos
The position of the sign.
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)
draw Text with given parameters
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
double getLaneParametricLength() const
returns the parameteric length of the lane
double myBlockIconRotation
The rotation of the block icon.
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
void duplicateLane(GNELane *lane, GNEUndoList *undoList)
duplicates lane
Position myBlockIconPosition
position of the block icon