66 myStartPosition(startPos),
67 myEndPosition(endPos),
68 myFriendlyPosition(friendlyPosition) {
96 Position newStoppingPlaceCenterPosition = oldPos;
97 newStoppingPlaceCenterPosition.
add(offset);
211 double startPosFixed;
238 int numberOfSegments = (int) myShape.size() - 1;
241 if (numberOfSegments >= 0) {
248 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.
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
static const double myCircleWidthSquared
squared circle width resolution for all stopping places
double y() const
Returns the y-position.
static const double myCircleInWidth
inner circle width resolution for all stopping places
Position getPositionInView() const
Returns position of additional in view.
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
std::string myStartPosition
The relative start position this stopping place is located at (optional, if empty takes 0) ...
static const double myCircleInText
text inner circle width resolution for all stopping places
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
std::string getParentName() const
Returns the name of the parent object (if any)
std::vector< double > myShapeRotations
GNELane * getLane() const
get Lane
static OptionsCont & getOptions()
Retrieves the options.
double getEndPosition() const
get end Position
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
GNEEdge & getParentEdge()
Returns underlying parent edge.
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
double getLengthGeometryFactor() const
get lenght geometry factor
std::vector< double > myShapeLengths
The lengths of the shape parts.
GNEStoppingPlace(const std::string &id, GNEViewNet *viewNet, GUIGlObjectType type, SumoXMLTag tag, GNELane *lane, const std::string &startPos, const std::string &endPos, const std::string &name, bool friendlyPosition, bool blockMovement)
Constructor.
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
~GNEStoppingPlace()
Destructor.
const std::string getID() const
function to support debugging
PositionVector getSubpart(double beginOffset, double endOffset) const
get subpart of a position vector
double getLaneShapeLength() const
returns the length of the lane's shape
double getFinalLength() const
get length that will be assigned to the lanes in the final network
void move2side(double amount)
move position vector to side using certain ammount
static const double myCircleWidth
circle width resolution for all stopping places
double getStartPosition() const
get start Position
void setStoppingPlaceGeometry(double movingToSide)
set geometry common to all stopping places
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.
virtual void updateGeometry(bool updateGrid)=0
update pre-computed geometry information
double distanceTo(const Position &p2) const
returns the euclidean distance in 3 dimension
std::string myEndPosition
The position this stopping place is located at (optional, if empty takes the lane lenght) ...
NBEdge * getNBEdge()
returns the internal NBEdge
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
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