59 #ifdef CHECK_MEMORY_LEAKS 61 #endif // CHECK_MEMORY_LEAKS 104 int numberOfSegments = (int)
myShape.size() - 1;
107 if (numberOfSegments >= 0) {
114 for (
int i = 0; i < numberOfSegments; ++i) {
163 std::vector<std::string>
194 if (s.
scale * exaggeration >= 10) {
210 for (
int i = 0; i !=
myLines.size(); ++i) {
218 glRotated(180, 1, 0, 0);
224 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
233 glTranslated(1.2, -(
double)i, 0);
249 if (s.
scale * exaggeration > 25) {
250 noPoints =
MIN2((
int)(9.0 + (s.
scale * exaggeration) / 10.0), 36);
254 glScaled(exaggeration, exaggeration, 1);
260 glTranslated(0, 0, .1);
273 if (s.
scale * exaggeration >= 4.5) {
354 return (canParse<SUMOReal>(value) && parse<SUMOReal>(value) >= 0 && parse<SUMOReal>(value) < (
myEndPos - 1));
356 return (canParse<SUMOReal>(value) && parse<SUMOReal>(value) >= 1 && parse<SUMOReal>(value) >
myStartPos);
SUMOReal getExaggeration(const GUIVisualizationSettings &s, SUMOReal factor=20) const
return the drawing size including exaggeration and constantSize values
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)
GUIVisualizationTextSettings addName
std::string getAttribute(SumoXMLAttr key) const
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
RGBColor myTextColorSelected
Text color selected (Default blue)
void pfSetPosition(SUMOReal x, SUMOReal y)
static void drawBoxLines(const PositionVector &geom, const std::vector< SUMOReal > &rots, const std::vector< SUMOReal > &lengths, SUMOReal width, int cornerDetail=0, SUMOReal offset=0)
Draws thick lines.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
SUMOReal distanceTo(const Position &p2) const
returns the euclidean distance in 3 dimension
static void drawText(const std::string &text, const Position &pos, const SUMOReal layer, const SUMOReal size, const RGBColor &col=RGBColor::BLACK, const SUMOReal angle=0)
draw Text with given parameters
SUMOReal myEndPos
The end position this stopping place is located at.
SUMOReal x() const
Returns the x-position.
GUIGlID getGlID() const
Returns the numerical id of the object.
static OptionsCont & getOptions()
Retrieves the options.
SUMOReal scale
information about a lane's width (temporary, used for a single view)
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
RGBColor myBaseColorSelected
base color selected (Default blue)
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
static void drawFilledCircle(SUMOReal width, int steps=8)
Draws a filled circle around (0,0)
GUIVisualizationSizeSettings addSize
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
static void parseStringVector(const std::string &def, std::vector< std::string > &into)
Splits the given string.
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
std::vector< SUMOReal > myShapeLengths
The lengths of the shape parts.
SUMOReal myBlockIconRotation
The rotation of the block icon.
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
const std::string & getAdditionalID() const
returns the ID of additional
SUMOReal getPositionRelativeToParametricLenght(SUMOReal position) const
PositionVector myShape
The shape of the additional element.
A point in 2D or 3D with translation and scaling methods.
RGBColor mySignColor
sign color (Default yellow)
GNELane * retrieveLane(const std::string &id, bool failHard=true)
get lane by id
void setBlockIconRotation(GNELane *lane=NULL)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
GNELane * myLane
The lane this stopping place belongs.
friend class GNEChange_Attribute
declare friend class
RGBColor myTextColor
Text color (Default cyan)
void drawLockIcon(SUMOReal size=0.5) const
draw lock icon
SUMOReal myStartPos
The start position this stopping place is located at.
void setAdditionalID(const std::string &id)
set the ID of additional
const std::string getID() const
function to support debugging
void drawName(const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const
draw name of item
GNEBusStop(const std::string &id, GNELane *lane, GNEViewNet *viewNet, SUMOReal startPos, SUMOReal endPos, const std::vector< std::string > &lines, bool blocked)
Constructor.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
std::vector< std::string > myLines
The list of lines that are assigned to this stop.
std::string getAttribute(SumoXMLAttr key) const
void writeAdditional(OutputDevice &device, const std::string &)
writte additional element into a xml file
GNEAdditional * getAdditional(SumoXMLTag type, const std::string &id) const
Returns the named additional.
const PositionVector & getShape() const
returns the shape of the lane
void changeLane(GNELane *newLane)
change lane of stopping place
static bool isValidStringVector(const std::string &value)
true if value is a valid string vector
void pfSetScale(SUMOReal s)
void updateGeometry()
update pre-computed geometry information
SUMOReal y() const
Returns the y-position.
RGBColor myBaseColor
base color (Default green)
bool isValid(SumoXMLAttr key, const std::string &value)
std::vector< SUMOReal > myShapeRotations
GNENet * getNet() const
get the net object
Position getLineCenter() const
get line center
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=OUTPUT_ACCURACY)
SumoXMLTag getTag() const
get Tag assigned to this object
void move2side(SUMOReal amount)
move position vector to side using certain ammount
Static storage of an output device and its base (abstract) implementation.
bool closeTag()
Closes the most recently opened tag.
Position mySignPos
The position of the sign.
std::vector< std::string > getLines() const
get string vector with the lines of the busStop
PositionVector getSubpart(SUMOReal beginOffset, SUMOReal endOffset) const
get subpart of a position vector
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
RGBColor mySignColorSelected
sign selected color (Default blue)
Position myBlockIconPosition
position of the block icon