65 myStartPosRelative(startPos / lane->getLaneParametricLength()),
66 myEndPosRelative(endPos / lane->getLaneParametricLength()),
68 myFriendlyPosition(friendlyPosition) {
87 newPosition.
add(offset);
167 int numberOfSegments = (int)
myShape.size() - 1;
170 if (numberOfSegments >= 0) {
177 for (
int i = 0; i < numberOfSegments; ++i) {
SumoXMLTag
Numbers representing SUMO-XML - element names.
void commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
bool areStoppingPlacesPositionsFixed() const
check if Position of stoppingPlace are fixed
void add(const Position &pos)
Adds the given position to this one.
GUIIcon
An enumeration of icons used by the gui applications.
GNEStoppingPlace(const std::string &id, GNEViewNet *viewNet, SumoXMLTag tag, GUIIcon icon, GNELane *lane, double startPos, double endPos, const std::string &name, bool friendlyPosition)
Constructor.
double y() const
Returns the y-position.
Position getPositionInView() const
Returns position of additional in view.
double getAbsoluteEndPosition() const
get absolute end Position
double x() const
Returns the x-position.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
bool myFriendlyPosition
Flag for friendly position.
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...
void moveGeometry(const Position &oldPos, const Position &offset)
change the position of the element geometry without saving in undoList
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
std::vector< double > myShapeRotations
GNELane * getLane() const
get Lane
static OptionsCont & getOptions()
Retrieves the options.
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
double getLaneParametricLength() const
returns the parameteric length of the lane
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
PositionVector myShape
The shape of the additional element.
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.
GNELane * myLane
The lane in which this lane is placed.
friend class GNEChange_Attribute
declare friend class
const std::string & getParentName() const
Returns the name of the parent object (if any)
std::vector< double > myShapeLengths
The lengths of the shape parts.
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
~GNEStoppingPlace()
Destructor.
PositionVector getSubpart(double beginOffset, double endOffset) const
get subpart of a position vector
double getLaneShapeLength() const
returns the length of the lane's shape
void move2side(double amount)
move position vector to side using certain ammount
const PositionVector & getShape() const
returns the shape of the lane
double length() const
Returns the length.
An Element which don't belongs to GNENet but has influency in the simulation.
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.
virtual void updateGeometry()=0
update pre-computed geometry information
void setStoppingPlaceGeometry()
set geometry common to all stopping places
double distanceTo(const Position &p2) const
returns the euclidean distance in 3 dimension
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
double getAbsoluteStartPosition() const
get absolute start Position
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
SumoXMLTag getTag() const
get XML Tag assigned to this object