41 {}, {lane}, {}, {busStop}, {}, {}, {}, {}, {}, {}),
56 newPosition.
add(offset);
85 double fixedPositionOverLane;
87 fixedPositionOverLane =
getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength();
89 fixedPositionOverLane = 0;
91 fixedPositionOverLane =
getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength();
118 if (posOverLane < 0) {
120 }
else if (posOverLane >
getLaneParents().front()->getGeometry().shape.length()) {
123 return getLaneParents().front()->getGeometry().shape.positionAtOffset(posOverLane);
250 if (lane !=
nullptr) {
264 return canParse<double>(value);
270 return (canParse<double>(value) && (parse<double>(value) >= 0));
273 return canParse<bool>(value);
275 return canParse<bool>(value);
277 return canParse<bool>(value);
323 if (parse<bool>(value)) {
Position snapToActiveGrid(const Position &pos, bool snapXY=true) const
Returns a position that is mapped to the closest grid point if the grid is active.
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
std::vector< double > shapeRotations
The rotations of the single shape parts.
bool isAccessPositionFixed() const
check if Position of Access is fixed
void add(const Position &pos)
Adds the given position to this one.
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
const std::string & getAdditionalID() const
Stores the information about how to visualize structures.
GNEEdge & getEdge() const
get edge in which this Access is placed
Position offset
The offSet of the block icon.
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
Position position
position of the block icon
BlockIcon myBlockIcon
variable BlockIcon
void clearGeometry()
reset geometry
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
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...
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
void changeAdditionalID(const std::string &newID)
change ID of additional
A class that stores a 2D geometrical boundary.
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
Position getLineCenter() const
get line center
std::string myLength
Acces lenght.
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
AdditionalMove myMove
variable AdditionalMove
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
GUIVisualizationSizeSettings addSize
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
bool myFriendlyPosition
flag to check if friendly position is enabled
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
GNEEdge & getParentEdge()
Returns underlying parent edge.
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.
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
void updateGeometry()
update pre-computed geometry information
friend class GNEChange_Attribute
declare friend class
void selectAttributeCarrier(bool changeFlag=true)
const std::vector< GNELane * > & getLaneParents() const
get lanes of VSS
static std::vector< Position > drawFilledCircleReturnVertices(double width, int steps=8)
Draws a filled circle around (0,0) returning circle vertex.
block movement of a graphic element
const std::vector< GNEAdditional * > & getAdditionalParents() const
return vector of additionals that have as Parent this edge (For example, Calibrators) ...
static void drawShapeDottedContourAroundClosedShape(const GUIVisualizationSettings &s, const int type, const PositionVector &shape)
draw a dotted contour around the given closed shape with certain width
Position getPositionInView() const
Returns position of additional in view.
GNEAccess(GNEAdditional *busStop, GNELane *lane, GNEViewNet *viewNet, const std::string &pos, const std::string &length, bool friendlyPos, bool blockMovement)
Constructor.
Boundary & grow(double by)
extends the boundary by the given amount
const std::string getID() const
function to support debugging
static bool accessCanBeCreated(GNEAdditional *busStopParent, GNEEdge &edge)
check if a GNEAccess can be created in a certain Edge
bool myBlockMovement
boolean to check if additional element is blocked (i.e. cannot be moved with mouse) ...
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
A road/street connecting two junctions (netedit-version)
void changeLaneParents(GNEShape *elementChild, const std::string &newLaneIDs)
change edge parents of a shape
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
An Element which don't belongs to GNENet but has influency in the simulation.
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
AdditionalGeometry myGeometry
geometry to be precomputed in updateGeometry(...)
const std::string & getTagStr() const
get tag assigned to this object in string format
std::string getGenericParametersStr() const
return generic parameters in string format
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
GNENet * getNet() const
get the net object
std::string myPositionOverLane
position over lane
GUIGlID getGlID() const
Returns the numerical id of the object.
GUIVisualizationColorSettings colorSettings
color settings
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
parent of an additional element
std::string firstOriginalLanePosition
value for saving first original position over lane before moving
static const RGBColor busStop
color for busStops
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
bool drawForSelecting
whether drawing is performed for the purpose of selecting objects
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
std::string getParentName() const
Returns the name of the parent object (if any)
An access point for a train stop.
std::string getAttribute(SumoXMLAttr key) const
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
void setRotation(GNELane *additionalLane=nullptr)
set Rotation of block Icon (must be called in updateGeometry() function)