101 int numberOfSegments = (int)
myShape.size() - 1;
104 if (numberOfSegments >= 0) {
111 for (
int i = 0; i < numberOfSegments; ++i) {
123 myShapeRotations.push_back((
double) atan2((s.
x() - f.
x()), (f.
y() - s.
y())) * (double) 180.0 / (
double)
PI);
166 std::vector<std::string>
197 if (s.
scale * exaggeration >= 10) {
213 for (
int i = 0; i < (int)
myLines.size(); ++i) {
221 glRotated(180, 1, 0, 0);
227 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
236 glTranslated(1.2, -(
double)i, 0);
252 if (s.
scale * exaggeration > 25) {
253 noPoints =
MIN2((
int)(9.0 + (s.
scale * exaggeration) / 10.0), 36);
257 glScaled(exaggeration, exaggeration, 1);
263 glTranslated(0, 0, .1);
276 if (s.
scale * exaggeration >= 4.5) {
360 return (canParse<double>(value) && parse<double>(value) >= 0 && parse<double>(value) < (
myEndPos - 1));
362 if (canParse<double>(value) && parse<double>(value) >= 1 && parse<double>(value) >
myStartPos) {
370 FXuint answer = FXMessageBox::question(
getViewNet()->getApp(), MBOX_YES_NO,
377 WRITE_WARNING(
"Closed FXMessageBox of type 'question' with 'Yes'");
383 WRITE_WARNING(
"Closed FXMessageBox of type 'question' with 'No'");
385 WRITE_WARNING(
"Closed FXMessageBox of type 'question' with 'ESC'");
397 return canParse<std::vector<std::string> >(value);
399 return canParse<bool>(value);
433 myLines = GNEAttributeCarrier::parse<std::vector<std::string> >(value);
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
int pfDrawString(const char *c)
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
begin/end of the description of a single lane
void pfSetScale(double s)
const std::string & getAdditionalID() const
returns the ID of additional
GNEAdditional * getAdditional(SumoXMLTag type, const std::string &id) const
Returns the named additional.
GNELane * myLane
The lane this additional belongs.
Stores the information about how to visualize structures.
double y() const
Returns the y-position.
RGBColor myTextColorSelected
Text color selected (Default blue)
double getPositionRelativeToParametricLength(double position) const
double x() const
Returns the x-position.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
void pfSetPosition(double x, double y)
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
std::vector< double > myShapeRotations
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
#define WRITE_WARNING(msg)
Position getLineCenter() const
get line center
static OptionsCont & getOptions()
Retrieves the options.
bool isTestingModeEnabled() const
check if netedit is running in testing mode
double myEndPos
The end position this stopping place is located at.
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.
RGBColor myBaseColorSelected
base color selected (Default blue)
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
void writeAdditional(OutputDevice &device) const
writte additional element into a xml file
std::vector< std::string > getLines() const
get string vector with the lines of the busStop
GUIVisualizationSizeSettings addSize
double getLaneParametricLength() const
returns the parameteric length of the lane
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
void drawLockIcon(double size=0.5) const
draw lock icon
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
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.
RGBColor mySignColor
sign color (Default yellow)
GNELane * retrieveLane(const std::string &id, bool failHard=true)
get lane by id
void setBlockIconRotation(GNELane *lane=NULL)
set Rotation of block Icon
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
friend class GNEChange_Attribute
declare friend class
RGBColor myTextColor
Text color (Default cyan)
block movement of a graphic element
GNEBusStop(const std::string &id, GNELane *lane, GNEViewNet *viewNet, double startPos, double endPos, const std::vector< std::string > &lines)
Constructor.
std::vector< double > myShapeLengths
The lengths of the shape parts.
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
void setAdditionalID(const std::string &id)
set the ID of additional
const std::string getID() const
function to support debugging
PositionVector getSubpart(double beginOffset, double endOffset) const
get subpart of a position vector
void changeLane(const std::string &laneID)
change lane of additional
void move2side(double amount)
move position vector to side using certain ammount
std::string getAttribute(SumoXMLAttr key) const
std::vector< std::string > myLines
The list of lines that are assigned to this stop.
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
const PositionVector & getShape() const
returns the shape of the lane
bool myBlocked
boolean to check if additional element is blocked (i.e. cannot be moved with mouse) ...
std::string getAttribute(SumoXMLAttr key) const
void updateGeometry()
update pre-computed geometry information
RGBColor myBaseColor
base color (Default green)
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
GNENet * getNet() const
get the net object
GUIGlID getGlID() const
Returns the numerical id of the object.
double myStartPos
The start position this stopping place is located at.
double getExaggeration(const GUIVisualizationSettings &s, double factor=20) const
return the drawing size including exaggeration and constantSize values
Static storage of an output device and its base (abstract) implementation.
double distanceTo(const Position &p2) const
returns the euclidean distance in 3 dimension
bool closeTag()
Closes the most recently opened tag.
bool isAdditionalSelected() const
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
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.
RGBColor mySignColorSelected
sign selected color (Default blue)
Position myBlockIconPosition
position of the block icon
SumoXMLTag getTag() const
get XML Tag assigned to this object