53 FXIMPLEMENT(
GNELane, FXDelegator, 0, 0)
63 mySpecialColor(
nullptr) {
68 myParentEdge(
GNEEdge::DummyEdge),
70 mySpecialColor(nullptr) {
81 int noLinks = (int)cons.size();
91 for (
int i = noLinks; --i >= 0;) {
92 double x2 = x1 - (double)(w / 2.);
94 cons[lefthand ? noLinks - 1 - i : i]);
105 int noLinks = (int)cons.size();
115 for (
int i = noLinks; --i >= 0;) {
116 double x2 = x1 - (double)(w / 2.);
117 int linkNo = cons[lefthand ? noLinks - 1 - i : i].tlLinkIndex;
134 double rot = (double) atan2((end.
x() - f.
x()), (f.
y() - end.
y())) * (double) 180.0 / (
double)
M_PI;
139 glTranslated(end.
x(), end.
y(), 0);
140 glRotated(rot, 0, 0, 1);
145 for (
auto i : edgeCons) {
188 glTranslated(0, 5, 0);
190 glTranslated(0, -5, 0);
208 for (
auto it : connections) {
221 glColor3d(.4, .4, .4);
224 glColor3d(.7, .4, .4);
227 glColor3d(.7, .7, .7);
230 glColor3d(.7, .7, 1);
233 glColor3d(.75, .5, 0.25);
238 const Position& endPos = it.toEdge->getLaneShape(it.toLane)[0];
240 glVertex2d(startPos.
x(), startPos.
y());
241 glVertex2d(endPos.
x(), endPos.
y());
267 glGetFloatv(GL_CURRENT_COLOR, color);
271 }
else if (s.
scale * exaggeration < 1.) {
296 if (spreadSuperposed) {
301 const double halfInnerFeetWidth = halfGauge - 0.039 * exaggeration;
302 const double halfRailWidth = halfInnerFeetWidth + 0.15 * exaggeration;
303 const double halfCrossTieWidth = halfGauge * 1.81;
313 glColor3d(0.8, 0.8, 0.8);
314 glTranslated(0, 0, .1);
327 if (halfWidth != halfWidth2 && !spreadSuperposed) {
330 glTranslated(0, 0, -.1);
355 glColor3d(0.3, 0.3, 0.3);
369 double iconWidth = 1;
384 glRotated(-90, 0, 0, 1);
411 glTranslated(customShape.front().x(), customShape.front().y(),
GLO_JUNCTION + 0.01);
413 glTranslated(0, 0, 0.01);
424 glTranslated(customShape.back().x(), customShape.back().y(),
GLO_JUNCTION + 0.01);
426 glTranslated(0, 0, 0.01);
455 int e = (int)
getShape().size() - 1;
456 for (
int i = 0; i < e; ++i) {
461 const double length =
MIN2((
double)3, myShapeLengths[i] - t);
464 glVertex2d(-mw, -t - length);
465 glVertex2d(-mw2, -t - length);
466 glVertex2d(-mw2, -t);
492 new FXMenuCommand(ret,
"Copy edge parent name to clipboard",
nullptr, ret,
MID_COPY_EDGE_NAME);
516 bool edgeHasSidewalk =
false;
517 bool edgeHasBikelane =
false;
518 bool edgeHasBuslane =
false;
519 bool edgeHasGreenVerge =
false;
520 bool differentLaneShapes =
false;
523 for (
auto i : selectedLanes) {
525 edgeHasSidewalk =
true;
527 if (i->getParentEdge().hasRestrictedLane(
SVC_BICYCLE)) {
528 edgeHasBikelane =
true;
530 if (i->getParentEdge().hasRestrictedLane(
SVC_BUS)) {
531 edgeHasBuslane =
true;
533 if (i->getParentEdge().hasRestrictedLane(
SVC_IGNORING)) {
534 edgeHasGreenVerge =
true;
536 if (i->getParentEdge().getNBEdge()->getLaneStruct(i->getIndex()).customShape.size() != 0) {
537 differentLaneShapes =
true;
548 FXMenuPane* edgeOperations =
new FXMenuPane(ret);
550 new FXMenuCascade(ret,
"edge operations",
nullptr, edgeOperations);
552 new FXMenuCommand(edgeOperations,
"Split edge here",
nullptr, &parent,
MID_GNE_EDGE_SPLIT);
553 new FXMenuCommand(edgeOperations,
"Split edge in both direction here",
nullptr, &parent,
MID_GNE_EDGE_SPLIT_BIDI);
556 new FXMenuCommand(edgeOperations, (
"Reverse " + edgeDescPossibleMulti).c_str(),
nullptr, &parent,
MID_GNE_EDGE_REVERSE);
557 new FXMenuCommand(edgeOperations, (
"Add reverse direction for " + edgeDescPossibleMulti).c_str(),
nullptr, &parent,
MID_GNE_EDGE_ADD_REVERSE);
558 new FXMenuCommand(edgeOperations, (
"Straighten " + edgeDescPossibleMulti).c_str(),
nullptr, &parent,
MID_GNE_EDGE_STRAIGHTEN);
559 new FXMenuCommand(edgeOperations, (
"Smooth " + edgeDescPossibleMulti).c_str(),
nullptr, &parent,
MID_GNE_EDGE_SMOOTH);
561 new FXMenuCommand(edgeOperations, (
"Smooth elevation of " + edgeDescPossibleMulti).c_str(),
nullptr, &parent,
MID_GNE_EDGE_SMOOTH_ELEVATION);
563 FXMenuPane* laneOperations =
new FXMenuPane(ret);
565 new FXMenuCascade(ret,
"lane operations",
nullptr, laneOperations);
567 if (differentLaneShapes) {
571 FXMenuPane* addSpecialLanes =
new FXMenuPane(laneOperations);
573 FXMenuPane* removeSpecialLanes =
new FXMenuPane(laneOperations);
575 FXMenuPane* transformSlanes =
new FXMenuPane(laneOperations);
578 FXMenuCommand* addSidewalk =
new FXMenuCommand(addSpecialLanes,
"Sidewalk", pedestrianIcon, &parent,
MID_GNE_LANE_ADD_SIDEWALK);
579 FXMenuCommand* addBikelane =
new FXMenuCommand(addSpecialLanes,
"Bikelane", bikeIcon, &parent,
MID_GNE_LANE_ADD_BIKE);
580 FXMenuCommand* addBuslane =
new FXMenuCommand(addSpecialLanes,
"Buslane", busIcon, &parent,
MID_GNE_LANE_ADD_BUS);
581 FXMenuCommand* addGreenVerge =
new FXMenuCommand(addSpecialLanes,
"Greenverge", greenVergeIcon, &parent,
MID_GNE_LANE_ADD_GREENVERGE);
583 FXMenuCommand* removeSidewalk =
new FXMenuCommand(removeSpecialLanes,
"Sidewalk", pedestrianIcon, &parent,
MID_GNE_LANE_REMOVE_SIDEWALK);
584 removeSidewalk->disable();
585 FXMenuCommand* removeBikelane =
new FXMenuCommand(removeSpecialLanes,
"Bikelane", bikeIcon, &parent,
MID_GNE_LANE_REMOVE_BIKE);
586 removeBikelane->disable();
587 FXMenuCommand* removeBuslane =
new FXMenuCommand(removeSpecialLanes,
"Buslane", busIcon, &parent,
MID_GNE_LANE_REMOVE_BUS);
588 removeBuslane->disable();
590 removeGreenVerge->disable();
593 FXMenuCommand* transformLaneToBikelane =
new FXMenuCommand(transformSlanes,
"Bikelane", bikeIcon, &parent,
MID_GNE_LANE_TRANSFORM_BIKE);
594 FXMenuCommand* transformLaneToBuslane =
new FXMenuCommand(transformSlanes,
"Buslane", busIcon, &parent,
MID_GNE_LANE_TRANSFORM_BUS);
597 FXMenuCascade* cascadeAddSpecialLane =
new FXMenuCascade(laneOperations, (
"add restricted " +
toString(
SUMO_TAG_LANE)).c_str(),
nullptr, addSpecialLanes);
598 FXMenuCascade* cascadeRemoveSpecialLane =
new FXMenuCascade(laneOperations, (
"remove restricted " +
toString(
SUMO_TAG_LANE)).c_str(),
nullptr, removeSpecialLanes);
599 new FXMenuCascade(laneOperations, (
"transform to restricted " +
toString(
SUMO_TAG_LANE)).c_str(),
nullptr, transformSlanes);
601 if (edgeHasSidewalk) {
602 transformLaneToSidewalk->disable();
603 addSidewalk->disable();
604 removeSidewalk->enable();
606 if (edgeHasBikelane) {
607 transformLaneToBikelane->disable();
608 addBikelane->disable();
609 removeBikelane->enable();
611 if (edgeHasBuslane) {
612 transformLaneToBuslane->disable();
613 addBuslane->disable();
614 removeBuslane->enable();
616 if (edgeHasGreenVerge) {
617 transformLaneToGreenVerge->disable();
618 addGreenVerge->disable();
619 removeGreenVerge->enable();
622 if (edgeHasSidewalk && edgeHasBikelane && edgeHasBuslane && edgeHasGreenVerge) {
623 cascadeAddSpecialLane->disable();
625 if (!edgeHasSidewalk && !edgeHasBikelane && !edgeHasBuslane && !edgeHasGreenVerge) {
626 cascadeRemoveSpecialLane->disable();
630 new FXMenuCommand(ret,
"Select state for all links from this edge:",
nullptr,
nullptr, 0);
632 for (
auto it : names) {
634 FXMenuRadio* mc =
new FXMenuRadio(ret, it.c_str(),
this, FXDataTarget::ID_OPTION + state);
640 FXMenuCommand* mc =
new FXMenuCommand(ret,
"Additional options available in 'Inspect Mode'",
nullptr,
nullptr, 0);
641 mc->handle(&parent, FXSEL(SEL_COMMAND, FXWindow::ID_DISABLE),
nullptr);
646 new FXMenuSeparator(ret);
649 new FXMenuCommand(ret, (
"Shape pos: " +
toString(pos)).c_str(),
nullptr,
nullptr, 0);
651 new FXMenuCommand(ret, (
"Height: " +
toString(height)).c_str(),
nullptr,
nullptr, 0);
674 const std::vector<double>&
680 const std::vector<double>&
707 int segments = (int)
getShape().size() - 1;
711 for (
int i = 0; i < segments; ++i) {
720 i->updateGeometry(updateGrid);
724 i->updateGeometry(updateGrid);
728 i->updateGeometry(updateGrid);
734 for (
auto i : incomingConnections) {
735 i->updateGeometry(updateGrid);
739 for (
auto i : outGoingConnections) {
740 i->updateGeometry(updateGrid);
777 if (laneParametricLenght > 0) {
778 return laneParametricLenght;
780 throw ProcessError(
"Lane Parametric Lenght cannot be never 0");
816 const std::vector<GNEShape*>&
899 return canParse<double>(value);
906 return canParse<double>(value) && (parse<double>(value) >= 0);
908 return canParse<bool>(value);
913 }
else if (canParse<PositionVector>(value)) {
914 return parse<PositionVector>(value).
size() > 1;
919 return canParse<int>(value) && (parse<int>(value) ==
myIndex);
921 return canParse<bool>(value);
935 result += i.first +
"=" + i.second +
"|";
938 if (!result.empty()) {
945 std::vector<std::pair<std::string, std::string> >
947 std::vector<std::pair<std::string, std::string> > result;
950 result.push_back(std::make_pair(i.first, i.second));
961 std::vector<std::string> parsedValues;
964 parsedValues.push_back(stValues.
next());
967 for (
auto i : parsedValues) {
968 std::vector<std::string> parsedParameters;
971 parsedParameters.push_back(stParam.
next());
1024 if (parse<bool>(value)) {
1070 switch (activeScheme) {
1086 switch (activeScheme) {
1088 for (PositionVector::const_iterator ii =
getShape().begin(); ii !=
getShape().end() - 1; ++ii) {
1093 for (
int ii = 1; ii < (int)
getShape().size(); ++ii) {
1107 switch (activeScheme) {
1109 switch (myPermissions) {
1131 return (
double)myPermissions;
1182 std::vector<std::string> laneIDs = parse<std::vector<std::string> >(i->getAttribute(
SUMO_ATTR_LANES));
1184 if (laneIDs.empty()) {
1186 }
else if ((laneIDs.size() == 1) && (allowEmpty ==
false)) {
1188 if (laneIDs.front() ==
getID()) {
1191 throw ProcessError(
"lane ID wasnt' found in Additional");
1194 auto it = std::find(laneIDs.begin(), laneIDs.end(),
getID());
1195 if (it != laneIDs.end()) {
1200 throw ProcessError(
"lane ID wasnt' found in Additional");
1222 * (spreadSuperposed ? 0.4 : 1)));
1223 const double sideOffset = spreadSuperposed ? width * -0.5 : 0;
1226 int e = (int)
getShape().size() - 1;
1227 for (
int i = 0; i < e; ++i) {
1232 const double length =
MIN2(width * 0.5, myShapeLengths[i] - t);
1233 glBegin(GL_TRIANGLES);
1234 glVertex2d(sideOffset, -t - length);
1235 glVertex2d(sideOffset - width * 0.25, -t);
1236 glVertex2d(sideOffset + width * 0.25, -t);
1265 std::vector<GNEConnection*>
1268 std::vector<GNEConnection*> incomingConnections;
1271 if (junctionSource) {
1275 for (
auto j : i->getGNEConnections()) {
1276 if (j->getNBEdgeConnection().fromLane ==
getIndex()) {
1277 incomingConnections.push_back(j);
1282 return incomingConnections;
1286 std::vector<GNEConnection*>
1290 std::vector<GNEConnection*> outcomingConnections;
1292 for (
auto i : edgeConnections) {
1293 if (i->getNBEdgeConnection().fromLane ==
getIndex()) {
1294 outcomingConnections.push_back(i);
1297 return outcomingConnections;
1305 for (
auto i : incomingConnections) {
1310 for (
auto i : outcomingConnections) {
1332 i->startGeometryMoving();
1336 i->startGeometryMoving();
1340 i->startGeometryMoving();
1350 i->endGeometryMoving();
1354 i->endGeometryMoving();
1358 i->endGeometryMoving();
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
int getConnectionIndex(const NBEdge *from, const NBEdge::Connection &con) const
return the index of the given connection
The link is a partial left direction.
std::string getVehicleClassNames(SVCPermissions permissions, bool expand)
Returns the ids of the given classes, divided using a ' '.
double getLength() const
Returns the computed length of the edge.
bool setMultiColor(const GUIColorer &c) const
sets multiple colors according to the current scheme index and some lane function ...
std::vector< double > myShapeLengths
The lengths of the shape parts.
std::vector< GNELane * > retrieveLanes(bool onlySelected=false)
return all lanes
Position getPositionInView() const
Return current position.
void drawLane2LaneConnections() const
draw lane to lane connections
LinkState getLinkState(const NBEdge *incoming, NBEdge *outgoing, int fromLane, int toLane, bool mayDefinitelyPass, const std::string &tlID) const
get link state
bool isRestricted(SUMOVehicleClass vclass) const
check if this lane is restricted
const std::vector< T > & getSchemes() const
std::string getParentName() const
Returns the name of the parent object (if any)
double scale
information about a lane's width (temporary, used for a single view)
double laneWidthExaggeration
The lane exaggeration (upscale thickness)
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
PositionVector shape
The lane's shape.
whether a given shape is user-defined
GNENet * myNet
the net to inform about updates
static void drawBoxLines(const PositionVector &geom, const std::vector< double > &rots, const std::vector< double > &lengths, double width, int cornerDetail=0, double offset=0)
Draws thick lines.
double z() const
Returns the z-position.
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
RGBColor selectedEdgeColor
begin/end of the description of a single lane
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
void setEndOffset(int lane, double offset)
set lane specific end-offset (negative lane implies set for all lanes)
double getLaneSpeed(int lane) const
get lane speed
const RGBColor * mySpecialColor
optional special color
void updateGeometry(bool updateGrid)
update pre-computed geometry information
static void drawTextAtEnd(const std::string &text, const PositionVector &shape, double x, double size, RGBColor color)
draw text and the end of shape
static RGBColor fromHSV(double h, double s, double v)
Converts the given hsv-triplet to rgb.
static const RGBColor WHITE
static GUIGlID getTexture(GUITexture which)
returns a texture previously defined in the enum GUITexture
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
void setSpeed(int lane, double speed)
set lane specific speed (negative lane implies set for all lanes)
Position positionAtOffset2D(double pos, double lateralOffset=0) const
Returns the position at the given length.
Boundary getBoundary() const
returns the boundry (including lanes)
GUIColorer laneColorer
The lane colorer.
Stores the information about how to visualize structures.
This is an uncontrolled, minor link, has to stop.
int getPriority() const
Returns the priority of the edge.
const double SUMO_const_laneWidth
static const double SNAP_RADIUS
GNEViewParent * getViewParent() const
get the net object
double y() const
Returns the y-position.
GUIVisualizationSettings * getVisualisationSettings() const
get visualitation settings
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
interpolate z values linear between junctions
The representation of a single edge during network building.
bool showRails
Information whether rails shall be drawn.
The link is a 180 degree turn.
smooth elevation with regard to adjoining edges
static RGBColor colorForLinksState(FXuint state)
return the color for each linkstate
bool hasRestrictedLane(SUMOVehicleClass vclass) const
check if edge has a restricted lane
double x() const
Returns the x-position.
const std::vector< double > & getShapeRotations() const
returns the vector with the shape rotations
bool isBidiRail(bool ignoreSpread=false) const
whether this edge is part of a bidirectional railway
std::string getAttributeForSelection(SumoXMLAttr key) const
method for getting the attribute in the context of object selection
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
static void drawText(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &col=RGBColor::BLACK, const double angle=0, int align=0, double width=-1)
transform lane to bikelane
RGBColor selectedLaneColor
void setPermissions(SVCPermissions permissions, int lane=-1)
set allowed/disallowed classes for the given lane or for all lanes if -1 is given ...
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
int editMode
the current NETEDIT mode (temporary)
bool showLaneDirection
Whether to show direction indicators for lanes.
double getSpeed() const
returns the current speed of lane
double endOffset
This lane's offset to the intersection begin.
bool laneShowBorders
Information whether lane borders shall be drawn.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::vector< RGBColor > myShapeColors
The color of the shape parts (cached)
This is an uncontrolled, right-before-left link.
bool drawAsRailway(const GUIVisualizationSettings &s) const
whether to draw this lane as a railway
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
const std::vector< GNEConnection * > & getGNEConnections()
returns a reference to the GNEConnection vector
void handleMultiChange(GNELane *lane, FXObject *obj, FXSelector sel, void *data)
update phase definition for the current traffic light and phase
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
bool isRailway(SVCPermissions permissions)
Returns whether an edge with the given permission is a railway edge.
const SVCPermissions SVCAll
all VClasses are allowed
Lane & getLaneStruct(int lane)
The link is controlled by a tls which is off, not blinking, may pass.
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
static bool isValidGenericParameterKey(const std::string &value)
whether the given string is a valid key for a generic parameter
This is an uncontrolled, all-way stop link.
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.
static const double UNSPECIFIED_WIDTH
unspecified lane width
A class that stores a 2D geometrical boundary.
int myIndex
The index of this lane.
bool setFunctionalColor(int activeScheme) const
sets the color according to the current scheme index and some lane function
This is an uncontrolled, zipper-merge link.
The link is a (hard) left direction.
std::vector< std::string > getStrings() const
#define WRITE_WARNING(msg)
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_MODE_TLS
static OptionsCont & getOptions()
Retrieves the options.
void setLaneShape(int lane, const PositionVector &shape)
sets a custom lane shape
bool accelRamp
Whether this lane is an acceleration lane.
void setAcceleration(int lane, bool accelRamp)
marks one lane as acceleration lane
std::vector< double > myLaneRestrictedTextureRotations
Rotations of textures of restricted lanes.
SVCPermissions invertPermissions(SVCPermissions permissions)
negate the given permissions and ensure that only relevant bits are set
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
LinkDirection
The different directions a link between two lanes may take (or a stream between two edges)...
The link is a straight direction.
std::string edgeParam
key for coloring by edge parameter
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
std::vector< Connection > getConnectionsFromLane(int lane) const
Returns connections from a given lane.
bool drawAsWaterway(const GUIVisualizationSettings &s) const
whether to draw this lane as a waterways
static double naviDegree(const double angle)
int getIndex() const
returns the index of the lane
std::vector< std::pair< std::string, std::string > > getGenericParameters() const
return generic parameters as vector of pairs format
double getLaneParametricLength() const
returns the parameteric length of the lane
static bool isValidGenericParameterValue(const std::string &value)
whether the given string is a valid value for a generic parameter
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 endGeometryMoving()
begin movement (used when user click over edge to start a movement, to avoid problems with problems w...
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
virtual FXuint size() const
return actual size
std::string getGenericParametersStr() const
return generic parameters in string format
transform lane to busLane
Copy edge name (for lanes only)
const std::vector< GNEEdge * > & getGNEIncomingEdges() const
Returns incoming GNEEdges.
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter ...
This is an uncontrolled, minor link, has to brake.
std::string getLaneID(int lane) const
get Lane ID (Secure)
int getNumLanes() const
Returns the number of lanes.
A point in 2D or 3D with translation and scaling methods.
bool controlsEdge(GNEEdge &edge) const
whether the given edge is controlled by the currently edited tlDef
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
bool isLogicValid()
whether this junction has a valid logic
void removeGLObjectFromGrid(GUIGlObject *o)
add GL Object into net
bool isWaterway(SVCPermissions permissions)
Returns whether an edge with the given permission is a waterway edge.
void removeLaneOfAdditionalParents(GNEUndoList *undoList, bool allowEmpty)
remove lane of Additional Parent
std::vector< double > myShapeRotations
friend class GNEChange_Attribute
declare friend class
T get(const std::string &str) const
const double SUMO_const_laneMarkWidth
std::vector< GNEConnection * > getGNEIncomingConnections()
returns a vector with the incoming GNEConnections of this lane
void addShapeChild(GNEShape *shape)
add shape child to this lane
GNEJunction * getGNEJunctionDestiny() const
returns the destination-junction
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic, in MSLink and GNEInternalLane.
void drawArrows() const
draw arrows
double getLengthGeometryFactor() const
get lenght geometry factor
GUIVisualizationTextSettings drawLinkTLIndex
static void drawOutlineCircle(double width, double iwidth, int steps=8)
Draws an unfilled circle around (0,0)
The link is a (hard) right direction.
void drawMarkings(const GUIVisualizationSettings &s, double scale) const
draw lane markings
void setParameter(const std::string &key, const std::string &value)
Sets a parameter.
Boundary & grow(double by)
extends the boundary by the given amount
GUIColorer junctionColorer
The junction colorer.
std::vector< GNEShape * > myShapes
list with the shapes vinculated with this lane
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers Deprecated classes g...
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
const std::string getID() const
function to support debugging
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
const T getColor(const double value) const
static void drawLine(const Position &beg, double rot, double visLength)
Draws a thin line.
std::vector< GNEConnection * > getGNEOutcomingConnections()
returns a vector with the outgoing GNEConnections of this lane
std::vector< Connection > myConnections
List of connections to following edges.
GNEJunction * getGNEJunctionSource() const
returns the source-junction
double laneMinSize
The minimum visual lane width for drawing.
The link is a partial right direction.
double getLaneShapeLength() const
returns the length of the lane's shape
void startGeometryMoving()
double width
This lane's width.
SVCPermissions getPermissions(int lane=-1) const
get the union of allowed classes over all lanes or for a specific lane
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
vehicle is a passenger car (a "normal" car)
void selectAttributeCarrier(bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
std::string getAttribute(SumoXMLAttr key) const
begin/end of the description of an edge
LinkDirection getDirection(const NBEdge *const incoming, const NBEdge *const outgoing, bool leftHand=false) const
Returns the representation of the described stream's direction.
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
EditMode getCurrentEditMode() const
get the current edit mode
bool canParseVehicleClasses(const std::string &classes)
Checks whether the given string contains only known vehicle classes.
transform lane to sidewalk
A road/street connecting two junctions (netedit-version)
GNEEdge & myParentEdge
The Edge that to which this lane belongs.
double getLaneWidth() const
Returns the default width of lanes of this edge.
change default geometry endpoints
virtual void updateGeometry(bool updateGrid)=0
update pre-computed geometry information
const PositionVector & getShape() const
returns the shape of the lane
bool showLinkDecals
Information whether link textures (arrows) shall be drawn.
double selectionScale
the current selection scaling in NETEDIT (temporary)
void buildSelectionACPopupEntry(GUIGLObjectPopupMenu *ret, GNEAttributeCarrier *AC)
Builds an entry which allows to (de)select the object.
double length() const
Returns the length.
void updateConnectionIDs()
update IDs of incoming connections of this lane
long onDefault(FXObject *, FXSelector, void *)
multiplexes message to two targets
const PositionVector & getLaneShape(int i) const
Returns the shape of the nth lane.
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
virtual void setMicrosimID(const std::string &newID)
Changes the microsimID of the object.
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
void drawTLSLinkNo(const GUIVisualizationSettings &s) const
draw TLS Link Number
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
The link is controlled by a tls which is off and blinks, has to brake.
static void drawCrossTies(const PositionVector &geom, const std::vector< double > &rots, const std::vector< double > &lengths, double length, double spacing, double halfWidth, bool drawForSelecting)
draw crossties for railroads or pedestrian crossings
const std::string & getTagStr() const
get tag assigned to this object in string format
std::vector< Position > myLaneRestrictedTexturePositions
Position of textures of restricted lanes.
void setSpecialColor(const RGBColor *Color2)
const std::string getParameter(const std::string &key, const std::string &defaultValue="") const
Returns the value for a given key.
static int getCircleResolution(const GUIVisualizationSettings &settings)
function to calculate circle resolution for all circles drawn in drawGL(...) functions ...
void mouseOverObject(const GUIVisualizationSettings &s) const
method for check if mouse is over objects
This is an uncontrolled, major link, may pass.
reset default geometry endpoints
void drawLinkNo(const GUIVisualizationSettings &s) const
draw link Number
void drawLinkRules() const
draw link rules
static const StringBijection< FXuint > LinkStateNames
long names for link states
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
Represents a single node (junction) during network building.
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
GUIGlID getGlID() const
Returns the numerical id of the object.
The link is a 180 degree turn (left-hand network)
std::vector< GNEAdditional * > myAdditionalChilds
list of Additional Childs of this NetElement
void drawDirectionIndicators(double exaggeration, bool spreadSuperposed) const
direction indicators for lanes
static void drawTriangleAtEnd(const Position &p1, const Position &p2, double tLength, double tWidth)
Draws a triangle at the end of the given line.
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
void removeShapeChild(GNEShape *shape)
remove shape child of this lane
std::vector< GNEAdditional * > myFirstAdditionalParents
list of Additional parents of this NetElement
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
void setLaneColor(const GUIVisualizationSettings &s) const
set color according to edit mode and visualisation settings
mode for connecting lanes
mode for creating new edges
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
bool isValid(SumoXMLAttr key, const std::string &value)
NBEdge * getNBEdge()
returns the internal NBEdge
const std::vector< double > & getShapeLengths() const
returns the vector with the shape lengths
double getLoadedLength() const
Returns the length was set explicitly or the computed length if it wasn't set.
bool drawForSelecting
whether drawing is performed for the purpose of selecting objects
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
return value for lane coloring according to the given scheme
bool spreadSuperposed
Whether to improve visualisation of superposed (rail) edges.
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
void addGLObjectIntoGrid(GUIGlObject *o)
add GL Object into net
PositionVector customShape
A custom shape for this lane set by the user.
const std::vector< GNEShape * > & getShapeChilds() const
get shape childs of lane
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
GUIVisualizationTextSettings drawLinkJunctionIndex
NBNode * getToNode() const
Returns the destination node of the edge.
vehicles ignoring classes
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
void setLaneWidth(int lane, double width)
set lane specific width (negative lane implies set for all lanes)
transform lane to greenVerge
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
GNEViewNet * getViewNet() const
get view net
The link has no direction (is a dead end link)
void clearParameter()
Clears the parameter map.
static RGBColor getColor()
gets the gl-color