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);
double getPositionRelativeToParametricLength(double position) const
std::vector< std::string > getLines() const
get string vector with the lines of the busStop
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
~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
begin/end of the description of a single lane
void pfSetScale(double s)
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
RGBColor myTextColorSelected
Text color selected (Default blue)
void writeAdditional(OutputDevice &device) const
writte additional element into a xml file
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)
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.
#define WRITE_WARNING(msg)
static OptionsCont & getOptions()
Retrieves the options.
double myEndPos
The end position this stopping place is located at.
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
GUIVisualizationSizeSettings addSize
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
std::string getAttribute(SumoXMLAttr key) const
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.
const std::string & getAdditionalID() const
returns the ID of additional
GNEContainerStop(const std::string &id, GNELane *lane, GNEViewNet *viewNet, double startPos, double endPos, const std::vector< std::string > &lines)
Constructor.
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
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
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.
RGBColor myTextColor
Text color (Default cyan)
block movement of a graphic element
std::vector< double > myShapeLengths
The lengths of the shape parts.
void setAdditionalID(const std::string &id)
set the ID of additional
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
bool isTestingModeEnabled() const
check if netedit is running in testing mode
void move2side(double amount)
move position vector to side using certain ammount
double distanceTo(const Position &p2) const
returns the euclidean distance in 3 dimension
std::string getAttribute(SumoXMLAttr key) const
GNEAdditional * getAdditional(SumoXMLTag type, const std::string &id) const
Returns the named additional.
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) ...
RGBColor myBaseColor
base color (Default green)
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
double myStartPos
The start position this stopping place is located at.
SumoXMLTag getTag() const
get XML Tag assigned to this object
PositionVector getSubpart(double beginOffset, double endOffset) const
get subpart of a position vector
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.
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.
RGBColor mySignColorSelected
sign selected color (Default blue)
Position myBlockIconPosition
position of the block icon