42 std::pair<SumoXMLTag, GUIIcon>
49 if (fromEdge && !toEdge && !fromTAZ && !toTAZ && !fromJunction && !toJunction &&
50 !fromBusStop && !toBusStop && !fromTrainStop && !toTrainStop &&
51 consecutiveEdges.empty() && !route) {
53 }
else if (consecutiveEdges.size() > 0) {
57 }
else if (fromEdge && toEdge) {
59 }
else if (fromEdge && toTAZ) {
61 }
else if (fromEdge && toJunction) {
63 }
else if (fromEdge && toBusStop) {
65 }
else if (fromEdge && toTrainStop) {
67 }
else if (fromTAZ && toEdge) {
69 }
else if (fromTAZ && toTAZ) {
71 }
else if (fromTAZ && toJunction) {
73 }
else if (fromTAZ && toBusStop) {
75 }
else if (fromTAZ && toTrainStop) {
77 }
else if (fromJunction && toEdge) {
79 }
else if (fromJunction && toTAZ) {
81 }
else if (fromJunction && toJunction) {
83 }
else if (fromJunction && toBusStop) {
85 }
else if (fromJunction && toTrainStop) {
87 }
else if (fromBusStop && toEdge) {
89 }
else if (fromBusStop && toTAZ) {
91 }
else if (fromBusStop && toJunction) {
93 }
else if (fromBusStop && toBusStop) {
95 }
else if (fromBusStop && toTrainStop) {
97 }
else if (fromTrainStop && toEdge) {
99 }
else if (fromTrainStop && toTAZ) {
101 }
else if (fromTrainStop && toJunction) {
103 }
else if (fromTrainStop && toBusStop) {
105 }
else if (fromTrainStop && toTrainStop) {
113 std::pair<SumoXMLTag, GUIIcon>
119 if (fromEdge && !toEdge && !fromTAZ && !toTAZ && !fromJunction && !toJunction &&
120 !fromBusStop && !toBusStop && !fromTrainStop && !toTrainStop) {
122 }
else if (fromEdge && toEdge) {
124 }
else if (fromEdge && toTAZ) {
126 }
else if (fromEdge && toJunction) {
128 }
else if (fromEdge && toBusStop) {
130 }
else if (fromEdge && toTrainStop) {
132 }
else if (fromTAZ && toEdge) {
134 }
else if (fromTAZ && toTAZ) {
136 }
else if (fromTAZ && toJunction) {
138 }
else if (fromTAZ && toBusStop) {
140 }
else if (fromTAZ && toTrainStop) {
142 }
else if (fromJunction && toEdge) {
144 }
else if (fromJunction && toTAZ) {
146 }
else if (fromJunction && toJunction) {
148 }
else if (fromJunction && toBusStop) {
150 }
else if (fromJunction && toTrainStop) {
152 }
else if (fromBusStop && toEdge) {
154 }
else if (fromBusStop && toTAZ) {
156 }
else if (fromBusStop && toJunction) {
158 }
else if (fromBusStop && toBusStop) {
160 }
else if (fromBusStop && toTrainStop) {
162 }
else if (fromTrainStop && toEdge) {
164 }
else if (fromTrainStop && toTAZ) {
166 }
else if (fromTrainStop && toJunction) {
168 }
else if (fromTrainStop && toBusStop) {
170 }
else if (fromTrainStop && toTrainStop) {
178 std::pair<SumoXMLTag, GUIIcon>
183 if (fromEdge && !toEdge && fromBusStop && !toBusStop && !fromTrainStop && !toTrainStop) {
185 }
else if (fromEdge && toEdge) {
187 }
else if (fromEdge && toBusStop) {
189 }
else if (fromEdge && toTrainStop) {
191 }
else if (fromBusStop && toEdge) {
193 }
else if (fromBusStop && toBusStop) {
195 }
else if (fromBusStop && toTrainStop) {
197 }
else if (fromTrainStop && toEdge) {
199 }
else if (fromTrainStop && toBusStop) {
201 }
else if (fromTrainStop && toTrainStop) {
209 std::pair<SumoXMLTag, GUIIcon>
213 if (fromEdge && !toEdge && !fromContainerStop && !toContainerStop) {
215 }
else if (fromEdge && toEdge) {
217 }
else if (fromEdge && toContainerStop) {
219 }
else if (fromContainerStop && toEdge) {
221 }
else if (fromContainerStop && toContainerStop) {
229 std::pair<SumoXMLTag, GUIIcon>
234 if (fromEdge && !toEdge && !fromContainerStop && !toContainerStop && consecutiveEdges.empty()) {
236 }
else if (consecutiveEdges.size() > 0) {
238 }
else if (fromEdge && toEdge) {
240 }
else if (fromEdge && toContainerStop) {
242 }
else if (fromContainerStop && toEdge) {
244 }
else if (fromContainerStop && toContainerStop) {
252 std::pair<SumoXMLTag, GUIIcon>
256 }
else if (busStop) {
258 }
else if (trainStop) {
266 std::pair<SumoXMLTag, GUIIcon>
270 }
else if (containerStop) {
279 myDepartPosition(departPosition),
280 myArrivalPosition(arrivalPosition),
281 myPlanElement(planElement) {
290 if (tagProperty.planToEdge() || tagProperty.planConsecutiveEdges() || tagProperty.planEdge()) {
313 if (tagProperty.planConsecutiveEdges()) {
315 }
else if (tagProperty.planRoute()) {
317 }
else if (tagProperty.planEdge()) {
319 }
else if (tagProperty.planBusStop()) {
321 }
else if (tagProperty.planTrainStop()) {
323 }
else if (tagProperty.planContainerStop()) {
329 if (tagProperty.planFromEdge()) {
331 }
else if (tagProperty.planFromTAZ()) {
333 }
else if (tagProperty.planFromJunction()) {
339 if (tagProperty.planToEdge()) {
341 }
else if (tagProperty.planToJunction()) {
343 }
else if (tagProperty.planToTAZ()) {
345 }
else if (tagProperty.planToBusStop()) {
347 }
else if (tagProperty.planToTrainStop()) {
349 }
else if (tagProperty.planToContainerStop()) {
372 if (tagProperty.planFromStoppingPlace()
376 if (tagProperty.planFromBusStop()) {
378 }
else if (tagProperty.planFromTrainStop()) {
380 }
else if (tagProperty.planFromContainerStop()) {
400 new FXMenuSeparator(ret);
416 if (tagProperty.planRoute()) {
419 }
else if (tagProperty.planConsecutiveEdges() || tagProperty.planFromEdge() || tagProperty.planEdge()) {
422 }
else if (tagProperty.planStoppingPlace() || tagProperty.planFromStoppingPlace() || tagProperty.planToStoppingPlace()) {
439 if (tagProperty.planRoute()) {
442 }
else if (tagProperty.planConsecutiveEdges() || tagProperty.planToEdge() || tagProperty.planEdge()) {
445 }
else if (tagProperty.planStoppingPlace() || tagProperty.planFromStoppingPlace() || tagProperty.planToStoppingPlace()) {
464 if (tagProperty.planRoute()) {
467 }
else if (tagProperty.planConsecutiveEdges()) {
520 if (firstLane && lastLane) {
521 pathManager->calculatePath(
myPlanElement, vClass, firstLane, lastLane);
522 }
else if (firstLane) {
523 pathManager->calculateConsecutivePathLanes(
myPlanElement, {firstLane});
524 }
else if (lastLane) {
525 pathManager->calculateConsecutivePathLanes(
myPlanElement, {lastLane});
541 if (tagProperty.planFromJunction() && tagProperty.planToTAZ()) {
544 }
else if (tagProperty.planFromTAZ() && tagProperty.planToJunction()) {
547 }
else if (tagProperty.planFromTAZ() && tagProperty.planToTAZ()) {
561 demandElement->updateGeometry();
575 planBoundary.
add(edge->getCenteringBoundary());
579 planBoundary.
add(junction->getCenteringBoundary());
583 planBoundary.
add(additional->getCenteringBoundary());
599 if (tagProperty.planRoute()) {
602 }
else if (tagProperty.isPlanStop()) {
604 }
else if (tagProperty.planFromEdge() || tagProperty.planConsecutiveEdges() || tagProperty.planEdge()) {
607 }
else if (tagProperty.planFromJunction()) {
610 }
else if (tagProperty.planStoppingPlace() || tagProperty.planFromStoppingPlace() || tagProperty.planFromTAZ()) {
686 if (tagProperty.planStoppingPlace()) {
689 }
else if (tagProperty.planFromStoppingPlace()) {
692 }
else if (tagProperty.planFromJunction() && tagProperty.planFromTAZ()) {
697 const auto previousPlan = planParent->getPreviousChildDemandElement(
myPlanElement);
703 if (posOverLane == -1) {
717 if (tagProperty.planStoppingPlace()) {
720 }
else if (tagProperty.planToStoppingPlace()) {
723 }
else if (tagProperty.planToJunction() || tagProperty.planToTAZ()) {
726 }
else if ((tagProperty.isPlanStopPerson() || tagProperty.isPlanStopContainer()) && tagProperty.planEdge()) {
731 const auto nextPlan = planParent->getNextChildDemandElement(
myPlanElement);
732 if (nextPlan && (nextPlan->getTagProperty().isPlanStopPerson() ||
733 nextPlan->getTagProperty().isPlanStopContainer()) &&
734 nextPlan->getTagProperty().planEdge()) {
763 const auto previousPlan = planParent->getPreviousChildDemandElement(
myPlanElement);
764 if (previousPlan && previousPlan->getTagProperty().isPlanStop() && previousPlan->getTagProperty().planStoppingPlace()) {
765 return previousPlan->getParentAdditionals().front()->getAdditionalGeometry().getShape().back();
768 if (tagProperty.planStoppingPlace()) {
770 }
else if (tagProperty.planFromStoppingPlace()) {
772 }
else if (tagProperty.planFromJunction()) {
775 }
else if (tagProperty.planFromTAZ()) {
778 }
else if (tagProperty.planConsecutiveEdges() || tagProperty.planRoute() || tagProperty.planFromEdge()) {
782 if (firstLane ==
nullptr) {
786 double lanePosition = 0;
799 const auto& laneShape = firstLane->getLaneShape();
801 if (lanePosition <= 0) {
802 return laneShape.front();
803 }
else if (lanePosition >= laneShape.length2D()) {
804 return laneShape.back();
806 return laneShape.positionAtOffset2D(lanePosition);
814 if (tagProperty.planToJunction()) {
817 }
else if (tagProperty.planToTAZ()) {
820 }
else if (tagProperty.planStoppingPlace()) {
823 }
else if (tagProperty.planToStoppingPlace()) {
826 }
else if (tagProperty.planConsecutiveEdges() || tagProperty.planRoute() || tagProperty.planFromEdge()) {
828 const auto nextPlan = planParent->getNextChildDemandElement(
myPlanElement);
832 if (lastLane ==
nullptr) {
836 const auto& laneShape = lastLane->getLaneShape();
838 if (nextPlan && nextPlan->getTagProperty().isPlanStop()) {
841 return laneShape.front();
843 return laneShape.back();
886 }
else if (GNEAttributeCarrier::canParse<double>(value)) {
887 return GNEAttributeCarrier::parse<double>(value) >= 0;
892 return GNEAttributeCarrier::canParse<double>(value);
894 return GNEAttributeCarrier::canParse<bool>(value);
960 if (GNEAttributeCarrier::parse<bool>(value)) {
985 while (tagProperty.getTagStr().at(index) !=
':') {
986 result.push_back(tagProperty.getTagStr().at(index));
991 if (tagProperty.planConsecutiveEdges()) {
994 }
else if (tagProperty.planRoute()) {
997 }
else if (tagProperty.planEdge()) {
1000 }
else if (tagProperty.planStoppingPlace()) {
1005 if (tagProperty.planFromStoppingPlace() || tagProperty.planFromTAZ()) {
1009 if (tagProperty.planFromJunction()) {
1013 if (tagProperty.planFromEdge()) {
1019 if (tagProperty.planToStoppingPlace() || tagProperty.planToTAZ()) {
1023 if (tagProperty.planToJunction()) {
1027 if (tagProperty.planToEdge()) {
1040 if (viewNet->getEditModes().isCurrentSupermodeNetwork() &&
1041 viewNet->getNetworkViewOptions().showDemandElements() &&
1042 viewNet->getDemandViewOptions().showAllPersonPlans()) {
1045 }
else if (viewNet->getEditModes().isCurrentSupermodeDemand() &&
1046 viewNet->getDemandViewOptions().showAllPersonPlans()) {
1058 }
else if (viewNet->getInspectedAttributeCarriers().empty()) {
1081 if (viewNet->getEditModes().isCurrentSupermodeNetwork() &&
1082 viewNet->getNetworkViewOptions().showDemandElements() &&
1083 viewNet->getDemandViewOptions().showAllContainerPlans()) {
1086 }
else if (viewNet->getEditModes().isCurrentSupermodeDemand() &&
1087 viewNet->getDemandViewOptions().showAllContainerPlans()) {
1099 }
else if (viewNet->getInspectedAttributeCarriers().empty()) {
1126 if (drawPlan && (planGeometry.getShape().size() > 0)) {
1134 const GNEAttributeCarrier* planInspected = (inspectedACs.size() > 0) ? inspectedACs.front() :
nullptr;
1136 const bool duplicateWidth = (planInspected ==
myPlanElement) || (planInspected == planParent);
1138 const double pathWidth = 0.25 * (duplicateWidth ? 2 : 1);
1150 *(planGeometry.getShape().end() - 2),
1151 *(planGeometry.getShape().end() - 1),
1170 const double offsetFront,
const double planWidth,
const RGBColor& planColor,
const RGBColor& planSelectedColor)
const {
1180 const auto& inspectedACs = viewNet->getInspectedAttributeCarriers();
1182 const GNEAttributeCarrier* planInspected = (inspectedACs.size() > 0) ? inspectedACs.front() :
nullptr;
1184 const bool duplicateWidth = (planInspected ==
myPlanElement) || (planInspected == planParent);
1236 if (duplicateWidth) {
1251 const double offsetFront,
const double planWidth,
const RGBColor& planColor,
const RGBColor& planSelectedColor)
const {
1261 const auto& inspectedACs = viewNet->getInspectedAttributeCarriers();
1263 const GNEAttributeCarrier* planInspected = (inspectedACs.size() > 0) ? inspectedACs.front() :
nullptr;
1265 const bool duplicateWidth = (planInspected ==
myPlanElement) || (planInspected == planParent);
1301 if (duplicateWidth) {
1313 if (duplicateWidth) {
1321 pathWidth, 1,
true,
true, 0);
1324 pathWidth, 1,
true,
true, 0);
1340 const auto previousLastLane = previousPlan->getLastPathLane();
1344 if (previousLastLane && firstLane && (previousLastLane->getParentEdge() != firstLane->getParentEdge())) {
1353 const auto nextFirstLane = nextPlan->getFirstPathLane();
1357 if (nextFirstLane && lastLane && (nextFirstLane->getParentEdge() != lastLane->getParentEdge())) {
1373 const auto previousLastLane = previousPlan->getLastPathLane();
1377 if (previousLastLane && firstLane && (previousLastLane->getParentEdge() != firstLane->getParentEdge())) {
1378 return TLF(
"Edge '%' is not consecutive with edge '%'", previousLastLane->getParentEdge()->getID(), firstLane->getParentEdge()->getID());
1386 const auto nextFirstLane = nextPlan->getFirstPathLane();
1390 if (nextFirstLane && lastLane && (nextFirstLane->getParentEdge() != lastLane->getParentEdge())) {
1391 return TLF(
"Edge '%' is not consecutive with edge '%'", nextFirstLane->getParentEdge()->getID(), lastLane->getParentEdge()->getID());
1396 return "undefined problem";
1411 glTranslated(0, 0, 4);
1431 glTranslated(0, 0, 4);
1447 const double circleWidthSquared = circleWidth * circleWidth;
1455 glTranslated(geometryEndPos.
x(), geometryEndPos.
y(), 4);
1467 std::vector<SumoXMLTag> tags;
1476 for (
const auto& tag : tags) {
@ MID_COPY_TYPED_NAME
Copy typed object name - popup entry.
@ MID_COPY_NAME
Copy object name - popup entry.
@ GLO_TAZ
Traffic Assignment Zones (TAZs)
@ TRANSPORT_CONTAINERSTOP
@ GNE_TAG_WALK_BUSSTOP_BUSSTOP
@ GNE_TAG_PERSONTRIP_EDGE_EDGE
@ GNE_TAG_PERSONTRIP_TAZ_EDGE
@ GNE_TAG_RIDE_BUSSTOP_BUSSTOP
@ GNE_TAG_PERSONTRIP_EDGE_JUNCTION
@ GNE_TAG_WALK_TAZ_BUSSTOP
@ GNE_TAG_PERSONTRIP_TRAINSTOP_EDGE
@ GNE_TAG_PERSONTRIP_BUSSTOP_EDGE
@ GNE_TAG_WALK_BUSSTOP_TRAINSTOP
@ GNE_TAG_PERSONTRIP_TAZ_TRAINSTOP
@ GNE_TAG_TRANSPORT_CONTAINERSTOP_EDGE
@ SUMO_TAG_NOTHING
invalid tag, must be the last one
@ GNE_TAG_TRANSHIP_EDGE_EDGE
@ GNE_TAG_WALK_BUSSTOP_JUNCTION
@ GNE_TAG_TRANSHIP_EDGE_CONTAINERSTOP
@ GNE_TAG_STOPCONTAINER_EDGE
@ GNE_TAG_WALK_TRAINSTOP_TAZ
@ GNE_TAG_STOPPERSON_BUSSTOP
@ SUMO_TAG_STOP
stop for vehicles
@ GNE_TAG_PERSONTRIP_BUSSTOP_TRAINSTOP
@ GNE_TAG_PERSONTRIP_JUNCTION_BUSSTOP
@ GNE_TAG_PERSONTRIP_TRAINSTOP_TAZ
@ GNE_TAG_PERSONTRIP_JUNCTION_TRAINSTOP
@ GNE_TAG_PERSONTRIP_TRAINSTOP_BUSSTOP
@ GNE_TAG_PERSONTRIP_BUSSTOP_JUNCTION
@ GNE_TAG_STOPCONTAINER_CONTAINERSTOP
@ GNE_TAG_RIDE_BUSSTOP_TRAINSTOP
@ GNE_TAG_PERSONTRIP_EDGE_TRAINSTOP
@ GNE_TAG_RIDE_BUSSTOP_EDGE
@ GNE_TAG_RIDE_TRAINSTOP_BUSSTOP
@ GNE_TAG_WALK_TRAINSTOP_EDGE
@ GNE_TAG_PERSONTRIP_TRAINSTOP_TRAINSTOP
@ GNE_TAG_TRANSPORT_EDGE_EDGE
@ GNE_TAG_WALK_EDGE_TRAINSTOP
@ GNE_TAG_TRANSPORT_EDGE_CONTAINERSTOP
@ GNE_TAG_WALK_JUNCTION_TAZ
@ GNE_TAG_PERSONTRIP_TAZ_BUSSTOP
@ GNE_TAG_WALK_JUNCTION_JUNCTION
@ GNE_TAG_PERSONTRIP_TAZ_TAZ
@ GNE_TAG_PERSONTRIP_EDGE_BUSSTOP
@ GNE_TAG_PERSONTRIP_BUSSTOP_TAZ
@ GNE_TAG_WALK_BUSSTOP_EDGE
@ GNE_TAG_WALK_JUNCTION_TRAINSTOP
@ GNE_TAG_RIDE_EDGE_BUSSTOP
@ GNE_TAG_WALK_TAZ_JUNCTION
@ GNE_TAG_WALK_BUSSTOP_TAZ
@ GNE_TAG_TRANSPORT_CONTAINERSTOP_CONTAINERSTOP
@ GNE_TAG_PERSONTRIP_BUSSTOP_BUSSTOP
@ GNE_TAG_PERSONTRIP_JUNCTION_JUNCTION
@ GNE_TAG_WALK_TRAINSTOP_BUSSTOP
@ GNE_TAG_PERSONTRIP_TAZ_JUNCTION
@ GNE_TAG_RIDE_EDGE_TRAINSTOP
@ GNE_TAG_WALK_JUNCTION_BUSSTOP
@ GNE_TAG_WALK_JUNCTION_EDGE
@ GNE_TAG_WALK_TRAINSTOP_JUNCTION
@ GNE_TAG_PERSONTRIP_JUNCTION_EDGE
@ GNE_TAG_STOPPERSON_TRAINSTOP
@ GNE_TAG_WALK_EDGE_JUNCTION
@ GNE_TAG_PERSONTRIP_JUNCTION_TAZ
@ GNE_TAG_WALK_TRAINSTOP_TRAINSTOP
@ GNE_TAG_WALK_EDGE_BUSSTOP
@ GNE_TAG_TRANSHIP_CONTAINERSTOP_CONTAINERSTOP
@ GNE_TAG_WALK_TAZ_TRAINSTOP
@ GNE_TAG_RIDE_TRAINSTOP_TRAINSTOP
@ GNE_TAG_PERSONTRIP_TRAINSTOP_JUNCTION
@ GNE_TAG_STOPPERSON_EDGE
@ GNE_TAG_PERSONTRIP_EDGE_TAZ
@ GNE_TAG_TRANSHIP_CONTAINERSTOP_EDGE
@ GNE_TAG_RIDE_TRAINSTOP_EDGE
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_FROM_TRAINSTOP
@ GNE_ATTR_PLAN_GEOMETRY_STARTPOS
person/container geometry start position
@ SUMO_ATTR_FROM_JUNCTION
@ SUMO_ATTR_CONTAINER_STOP
@ GNE_ATTR_PARENT
parent of an additional element
@ GNE_ATTR_SELECTED
element is selected
@ SUMO_ATTR_EDGES
the edges of a route
@ GNE_ATTR_PLAN_GEOMETRY_ENDPOS
person/container geometry end position
const double INVALID_DOUBLE
invalid double
const double SUMO_const_halfLaneWidth
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A class that stores a 2D geometrical boundary.
Position getCenter() const
Returns the center of the boundary.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
bool isInitialised() const
check if Boundary is Initialised
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void drawTriangleAtEnd(const Position &p1, const Position &p2, double tLength, double tWidth, const double extraOffset=0)
Draws a triangle at the end of the given line.
static void popMatrix()
pop matrix
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.
static void drawFilledCircleDetailled(const GUIVisualizationSettings::Detail d, const double radius)
Draws a filled circle around (0,0) depending of level of detail.
static void pushMatrix()
push matrix
An Element which don't belong to GNENet but has influence in the simulation.
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
const std::string & getTagStr() const
get tag assigned to this object in string format
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
bool isTemplate() const
check if this AC is template
void unselectAttributeCarrier(const bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
GNENet * myNet
pointer to net
GNENet * getNet() const
get pointer to net
static std::string parseIDs(const std::vector< T > &ACs)
parses a list of specific Attribute Carriers into a string of IDs
void selectAttributeCarrier(const bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
virtual std::string getAttribute(SumoXMLAttr key) const =0
const GNETagProperties & myTagProperty
reference to tagProperty associated with this attribute carrier
static void changeAttribute(GNEAttributeCarrier *AC, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList, const bool force=false)
change attribute
void calculateContourExtrudedShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double extrusionWidth, const double scale, const bool closeFirstExtrem, const bool closeLastExtrem, const double offset) const
calculate contour extruded (used in elements formed by a central shape)
void drawDottedContours(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, const double lineWidth, const bool addOffset) const
drawing contour functions
virtual void updateGeometry()=0
update pre-computed geometry information
virtual SUMOVehicleClass getVClass() const =0
obtain VClass related with this demand element
void replaceDemandElementParent(SumoXMLTag tag, const std::string &value, const int parentIndex)
replace demand element parent
GUIGeometry myDemandElementGeometry
demand element geometry (also called "stacked geometry")
virtual GNELane * getLastPathLane() const =0
get last path lane
virtual std::string getAttribute(SumoXMLAttr key) const =0
virtual void computePathElement()=0
compute pathElement
virtual GNELane * getFirstPathLane() const =0
get first path lane
virtual Position getPositionInView() const =0
Returns position of demand element in view.
const GUIGeometry & getDemandElementGeometry()
get demand element geometry (stacked)
Problem
enum class for demandElement problems
GNEDemandElement * getPreviousChildDemandElement(const GNEDemandElement *demandElement) const
get previous child demand element to the given demand element
virtual void drawGL(const GUIVisualizationSettings &s) const =0
Draws the object.
bool isPlanValid(SumoXMLAttr key, const std::string &value)
check if plan attribute is valid
Boundary getPlanCenteringBoundary() const
get centering boundaryt
Position getPlanPositionInView() const
Returns position of additional in view.
std::string getPersonPlanProblem() const
get plan problem
void computePlanPathElement()
compute plan pathElement
Position getPlanAttributePosition(SumoXMLAttr key) const
get plan attribute position
GNEDemandElement::Problem isPlanPersonValid() const
check if plan is valid
void drawPlanLanePartial(const bool drawPlan, const GUIVisualizationSettings &s, const GNEPathManager::Segment *segment, const double offsetFront, const double planWidth, const RGBColor &planColor, const RGBColor &planSelectedColor) const
draw plan partial lane
GUIGLObjectPopupMenu * getPlanPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
void drawPlanJunctionPartial(const bool drawPlan, const GUIVisualizationSettings &s, const GNEPathManager::Segment *segment, const double offsetFront, const double planWidth, const RGBColor &planColor, const RGBColor &planSelectedColor) const
draw plan partial junction
void drawEndPosition(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEPathManager::Segment *segment, const bool duplicateWidth) const
draw to arrow
static std::pair< SumoXMLTag, GUIIcon > getPersonStopTagIcon(const GNEEdge *edge, const GNEAdditional *busStop, const GNEAdditional *trainStop)
get the person stop tag and icon for the combination
GNEDemandElementPlan(GNEDemandElement *planElement, const double departPosition, const double arrivalPosition)
constructor
void drawFromArrow(const GUIVisualizationSettings &s, const GNELane *lane, const GNEPathManager::Segment *segment) const
draw from arrow
std::string getPlanHierarchyName() const
get plan Hierarchy Name (Used in AC Hierarchy)
void writeLocationAttributes(OutputDevice &device) const
write plan element common attributes
static std::pair< SumoXMLTag, GUIIcon > getPersonTripTagIcon(const GNEEdge *fromEdge, const GNEEdge *toEdge, const GNEAdditional *fromTAZ, const GNEAdditional *toTAZ, const GNEJunction *fromJunction, const GNEJunction *toJunction, const GNEAdditional *fromBusStop, const GNEAdditional *toBusStop, const GNEAdditional *fromTrainStop, const GNEAdditional *toTrainStop)
get the personTrip tag and icon for the combination
bool checkDrawPersonPlan() const
check if person plan can be drawn
GNEContour myPlanContour
variable used for draw contours
GNEMoveOperation * getPlanMoveOperation()
get move operation
void drawToArrow(const GUIVisualizationSettings &s, const GNELane *lane, const GNEPathManager::Segment *segment) const
draw to arrow
double getPlanAttributeDouble(SumoXMLAttr key) const
get plan attribute double
void setPlanAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
set plan attribute
double myArrivalPosition
arrival position (used in all plans over edges)
static std::pair< SumoXMLTag, GUIIcon > getRideTagIcon(const GNEEdge *fromEdge, const GNEEdge *toEdge, const GNEAdditional *fromBusStop, const GNEAdditional *toBusStop, const GNEAdditional *fromTrainStop, const GNEAdditional *toTrainStop)
get the ride tag and icon for the combination
double myDepartPosition
depart position (used in tranships)
static const double myArrivalPositionDiameter
arrival position diameter
std::string getPlanAttribute(SumoXMLAttr key) const
get plan attribute string
bool isPlanAttributeEnabled(SumoXMLAttr key) const
check if plan attribute is enabled
bool checkDrawContainerPlan() const
check if container plan can be drawn
static std::pair< SumoXMLTag, GUIIcon > getContainerStopTagIcon(const GNEEdge *edge, const GNEAdditional *containerStop)
get the container stop tag and icon for the combination
GNELane * getLastPlanPathLane() const
get last plan path lane
GNEDemandElement * myPlanElement
pointer to plan element
void drawPlanGL(const bool drawPlan, const GUIVisualizationSettings &s, const RGBColor &planColor, const RGBColor &planSelectedColor) const
draw plan
void updatePlanGeometry()
update pre-computed geometry information
static std::pair< SumoXMLTag, GUIIcon > getTransportTagIcon(const GNEEdge *fromEdge, const GNEEdge *toEdge, const GNEAdditional *fromContainerStop, const GNEAdditional *toContainerStop)
get the transport tag and icon for the combination
GNELane * getFirstPlanPathLane() const
get first plan path lane
static std::pair< SumoXMLTag, GUIIcon > getTranshipTagIcon(const std::vector< GNEEdge * > &consecutiveEdges, const GNEEdge *fromEdge, const GNEEdge *toEdge, const GNEAdditional *fromContainerStop, const GNEAdditional *toContainerStop)
get the tranship tag and icon for the combination
static std::pair< SumoXMLTag, GUIIcon > getWalkTagIcon(const std::vector< GNEEdge * > &consecutiveEdges, const GNEDemandElement *route, const GNEEdge *fromEdge, const GNEEdge *toEdge, const GNEAdditional *fromTAZ, const GNEAdditional *toTAZ, const GNEJunction *fromJunction, const GNEJunction *toJunction, const GNEAdditional *fromBusStop, const GNEAdditional *toBusStop, const GNEAdditional *fromTrainStop, const GNEAdditional *toTrainStop)
get the walk tag and icon for the combination
void writeOriginStop(OutputDevice &device) const
write initial stop stage if plan starts at a stopping place
bool replacePlanParent(const std::string &newParentID)
replace plan parent
A road/street connecting two junctions (netedit-version)
const std::vector< GNEJunction * > & getParentJunctions() const
get parent junctions
const std::vector< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
const std::vector< GNEDemandElement * > & getParentDemandElements() const
get parent demand elements
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
const std::vector< GNEEdge * > & getParentEdges() const
get parent edges
bool exist(const GNELane *toLane) const
check if exist a lane2lane geometry for the given toLane
const GUIGeometry & getLane2laneGeometry(const GNELane *toLane) const
get lane2lane geometry
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
const PositionVector & getLaneShape() const
get elements shape
const GNELane2laneConnection & getLane2laneConnections() const
get Lane2laneConnection struct
const GUIGeometry & getLaneGeometry() const
get lane geometry
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
void addGLObjectIntoGrid(GNEAttributeCarrier *AC)
add GL Object into net
void removeGLObjectFromGrid(GNEAttributeCarrier *AC)
add GL Object into net
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
GNEPathManager * getPathManager()
get path manager
GNEViewNet * getViewNet() const
get view net
bool checkDrawPathGeometry(const GUIVisualizationSettings &s, const GNELane *lane, SumoXMLTag tag)
check if path element geometry must be drawn in the given lane
const GNELane * getPreviousLane() const
get previous lane
GNEContour * getContour() const
getcontour associated with segment
const GNELane * getNextLane() const
get next lane
const GNELane * getLane() const
get lane associated with this segment
bool isLastSegment() const
check if segment is the last path's segment
bool isFirstSegment() const
check if segment is the first path's segment
PathDraw * getPathDraw()
obtain instance of PathDraw
void calculateConsecutivePathEdges(PathElement *pathElement, SUMOVehicleClass vClass, const std::vector< GNEEdge * > edges)
calculate consecutive path edges
bool planFromJunction() const
return true if tag correspond to a plan that starts in junction
bool planToStoppingPlace() const
return true if tag correspond to a plan that ends in stoppingPlace
bool planStoppingPlace() const
return true if tag correspond to a plan placed in stoppingPlace
bool planToJunction() const
return true if tag correspond to a plan that starts in junction
bool planFromStoppingPlace() const
return true if tag correspond to a plan that starts in stoppingPlace
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool planFromEdge() const
return true if tag correspond to a plan that starts in edge
bool isPlanContainer() const
return true if tag correspond to a container plan
bool isPlanPerson() const
return true if tag correspond to a person plan
bool planToEdge() const
return true if tag correspond to a plan that starts in edge
const std::vector< GNEAttributeCarrier * > & getInspectedAttributeCarriers() const
get inspected attribute carriers
void buildSelectionACPopupEntry(GUIGLObjectPopupMenu *ret, GNEAttributeCarrier *AC)
Builds an entry which allows to (de)select the object.
static FXMenuCommand * buildFXMenuCommand(FXComposite *p, const std::string &text, FXIcon *icon, FXObject *tgt, FXSelector sel, const bool disable=false)
build menu command
static void drawGeometry(const GUIVisualizationSettings::Detail d, const GUIGeometry &geometry, const double width, double offset=0)
draw geometry
static void drawChildLine(const GUIVisualizationSettings &s, const Position &child, const Position &parent, const RGBColor &color, const bool drawEntire, const double lineWidth)
draw line between child and parent (used in netedit)
const PositionVector & getShape() const
The shape of the additional element.
void updateGeometry(const PositionVector &shape)
update entire geometry
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
virtual Boundary getCenteringBoundary() const =0
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, const GUIMainWindow &app) const
Builds an entry which allows to copy the cursor position if geo projection is used,...
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0, bool forceShow=false) const
draw name of item
virtual Position getPositionInformation() const
Returns the cursor's x/y position within the network.
Stores the information about how to visualize structures.
GUIVisualizationTextSettings addName
bool drawForRectangleSelection
whether drawing is performed for the purpose of selecting objects using a rectangle
GUIVisualizationSizeSettings addSize
Detail getDetailLevel(const double exaggeration) const
return the detail level
double laneWidthExaggeration
The lane exaggeration (upscale thickness)
GUIVisualizationDottedContourSettings dottedContourSettings
dotted contour settings
double scale
information about a lane's width (temporary, used for a single view)
bool drawForViewObjectsHandler
whether drawing is performed for the purpose of selecting objects in view using ViewObjectsHandler
Static storage of an output device and its base (abstract) implementation.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
A point in 2D or 3D with translation and scaling methods.
double distanceSquaredTo2D(const Position &p2) const
returns the square of the distance to another position (Only using x and y positions)
static const Position INVALID
used to indicate that a position is valid
double x() const
Returns the x-position.
double y() const
Returns the y-position.
static const RGBColor RED
named colors
static void drawLockIcon(const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, GUIGlObjectType type, const Position position, const double exaggeration, const double size=0.5, const double offsetx=0, const double offsety=0)
draw lock icon
static const double segmentWidthSmall
width of small dotted contour segments
static const double segmentWidth
width of dotted contour segments
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values