49 myStartPosition(startPos),
50 myEndPosition(endPos),
51 myFriendlyPosition(friendlyPosition) {
83 std::string errorStart, separator, errorEnd;
100 if ((errorStart.size() > 0) && (errorEnd.size() > 0)) {
103 return errorStart + separator + errorEnd;
142 newPosition.
add(offset);
223 double startPosFixed;
SumoXMLTag
Numbers representing SUMO-XML - element names.
static bool fixStoppinPlacePosition(std::string &startPos, std::string &endPos, const double laneLength, const double minLength, const bool friendlyPos)
check if the position of an stoppingPlace over a lane is valid
void add(const Position &pos)
Adds the given position to this one.
std::string secondOriginalPosition
value for saving second original position over lane before moving
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
static const double myCircleInWidth
inner circle width resolution for all stopping places
Position snapToActiveGrid(const Position &pos) const
Returns a position that is mapped to the closest grid point if the grid is active.
Position getPositionInView() const
Returns position of additional in view.
void clearGeometry()
reset geometry
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
bool myFriendlyPosition
Flag for friendly position.
Position originalViewPosition
value for saving first original position over lane before moving
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...
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)
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform additional changes ...
GNELane * getLane() const
get Lane
bool isAdditionalValid() const
check if current additional is valid to be writed into XML (by default true, can be reimplemented in ...
static OptionsCont & getOptions()
Retrieves the options.
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
AdditionalMove myMove
variable AdditionalMove
double getEndPosition() const
get end Position
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
GNEUndoList * getUndoList() const
get the undoList object
double getLaneParametricLength() const
returns the parameteric length of the lane
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
GNEEdge & getParentEdge()
Returns underlying parent edge.
void fixAdditionalProblem()
fix additional problem
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.
PositionVector shape
The shape of the additional element.
GNELane * myLane
The lane in which this lane is placed.
friend class GNEChange_Attribute
declare friend class
double getLengthGeometryFactor() const
get lenght geometry factor
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.
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
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
void calculateShapeRotationsAndLengths()
calculate shape rotations and lenghts
double getStartPosition() const
get start Position
std::string getAdditionalProblem() const
return a string with the current additional problem
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.
AdditionalGeometry myGeometry
geometry to be precomputed in updateGeometry(...)
const std::string & getTagStr() const
get tag assigned to this object in string format
virtual void updateGeometry(bool updateGrid)=0
update pre-computed geometry information
std::string myEndPosition
The position this stopping place is located at (optional, if empty takes the lane lenght) ...
std::string firstOriginalLanePosition
value for saving first original position over lane before moving
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.
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList