60 myPositionOverLane(pos),
62 myFriendlyPosition(friendlyPos) {
74 newPosition.
add(offset);
109 double fixedPositionOverLane;
113 fixedPositionOverLane = 0;
147 if (posOverLane < 0) {
273 if (lane !=
nullptr) {
287 return canParse<double>(value);
293 return (canParse<double>(value) && (parse<double>(value) >= 0));
296 return canParse<bool>(value);
298 return canParse<bool>(value);
300 return canParse<bool>(value);
346 if (parse<bool>(value)) {
bool mySelected
boolean to check if this AC is selected (instead of GUIGlObjectStorage)
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
const GNEAttributeCarrier * getACUnderCursor() const
get AttributeCarrier under cursor
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
void setBlockIconRotation(GNELane *additionalLane=nullptr)
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
returns Additional ID
Stores the information about how to visualize structures.
GNEEdge & getEdge() const
get edge in which this Access is placed
void updateGeometry(bool updateGrid)
update pre-computed geometry information
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
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.
GNELane * myLane
lane in which this Access is placed
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
std::vector< double > myShapeRotations
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
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
std::string myLength
Acces lenght.
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
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
static const RGBColor selectedAdditionalColor
color of selected additionals
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.
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.
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
void removeGLObjectFromGrid(GUIGlObject *o)
add GL Object into net
friend class GNEChange_Attribute
declare friend class
void selectAttributeCarrier(bool changeFlag=true)
static std::vector< Position > drawFilledCircleReturnVertices(double width, int steps=8)
Draws a filled circle around (0,0) returning circle vertex.
void moveGeometry(const Position &oldPos, const Position &offset)
change the position of the element geometry without saving in undoList
block movement of a graphic element
double getLengthGeometryFactor() const
get lenght geometry factor
std::vector< double > myShapeLengths
The lengths of the shape parts.
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.
const std::string getID() const
function to support debugging
static const RGBColor SUMO_color_busStop
color for busStops
double getFinalLength() const
get length that will be assigned to the lanes in the final network
static bool accessCanBeCreated(GNEAdditional *busStopParent, GNEEdge &edge)
check if a GNEAccess can be created in a certain Edge
Position myBlockIconOffset
The offSet of the block icon.
bool myBlockMovement
boolean to check if additional element is blocked (i.e. cannot be moved with mouse) ...
A road/street connecting two junctions (netedit-version)
const PositionVector & getShape() const
returns the shape of the lane
double length() const
Returns the length.
static void drawShapeDottedContour(const int type, const PositionVector &shape, const double width)
draw a dotted contour around the given Non closed shape with certain width
An Element which don't belongs to GNENet but has influency in the simulation.
void commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
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.
double getExaggeration(const GUIVisualizationSettings &s, double factor=20) const
return the drawing size including exaggeration and constantSize values
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
parent of an additional element
NBEdge * getNBEdge()
returns the internal NBEdge
bool drawForSelecting
whether drawing is performed for the purpose of selecting objects
std::string getParentName() const
Returns the name of the parent object (if any)
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
An access point for a train stop.
void addGLObjectIntoGrid(GUIGlObject *o)
add GL Object into net
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
std::string getAttribute(SumoXMLAttr key) const
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
GNEAdditional * myFirstAdditionalParent
pointer to first Addititional parent
GNELane * changeLane(GNELane *oldLane, const std::string &newLaneID)
change lane of additional
Position myBlockIconPosition
position of the block icon
SumoXMLTag getTag() const
get XML Tag assigned to this object