50 const std::vector<GNEJunction*>& junctionParents,
51 const std::vector<GNEEdge*>& edgeParents,
52 const std::vector<GNELane*>& laneParents,
53 const std::vector<GNEAdditional*>& additionalParents,
54 const std::vector<GNEDemandElement*>& demandElementParents,
55 const std::vector<GNEGenericData*>& genericDataParents) :
57 GNEHierarchicalElement(net, tag, junctionParents, edgeParents, laneParents, additionalParents, demandElementParents, genericDataParents),
58 myStackedLabelNumber(0) {
65 const std::vector<GNEJunction*>& junctionParents,
66 const std::vector<GNEEdge*>& edgeParents,
67 const std::vector<GNELane*>& laneParents,
68 const std::vector<GNEAdditional*>& additionalParents,
69 const std::vector<GNEDemandElement*>& demandElementParents,
70 const std::vector<GNEGenericData*>& genericDataParents) :
71 GNEPathManager::PathElement(type, demandElementParent->getID(), icon, options),
72 GNEHierarchicalElement(net, tag, junctionParents, edgeParents, laneParents, additionalParents, demandElementParents, genericDataParents),
73 myStackedLabelNumber(0) {
175 new FXMenuSeparator(ret);
182 new FXMenuSeparator(ret);
274 if (previousPersonPlan) {
283 return (endPos - 0.3);
305 if (previousPersonPlan) {
320 return previousPersonPlan->
getParentAdditionals().front()->getAdditionalGeometry().getShape().getLineCenter();
405 throw InvalidArgument(
"This demand element doesn't have a type parent");
414 std::map<std::string, GNEDemandElement*> sortedTypes;
417 sortedTypes[type->getID()] = type;
421 if (sortedTypes.size() > 0) {
422 return sortedTypes.begin()->second;
437 throw InvalidArgument(
"This demand element doesn't have a route parent");
460std::vector<GNEDemandElement*>
464 std::vector<GNEDemandElement*> invalidStops;
468 for (
const auto& edgeStop : edgeStopIndex) {
469 if (edgeStop.stopIndex == -1) {
470 for (
const auto& stop : edgeStop.stops) {
471 invalidStops.push_back(stop);
562 const double offsetFront,
const double personPlanWidth,
const RGBColor& personPlanColor)
const {
572 const GNEAttributeCarrier* personPlanInspected = (inspectedACs.size() > 0) ? inspectedACs.front() :
nullptr;
574 const bool duplicateWidth = (personPlanInspected ==
this) || (personPlanInspected == personParent);
618 const double circleWidthSquared = circleWidth * circleWidth;
628 glTranslated(geometryEndPos.
x(), geometryEndPos.
y(), 0);
703 const double offsetFront,
const double personPlanWidth,
const RGBColor& personPlanColor)
const {
713 const GNEAttributeCarrier* personPlanInspected = (inspectedACs.size() > 0) ? inspectedACs.front() :
nullptr;
715 const bool duplicateWidth = (personPlanInspected ==
this) || (personPlanInspected == personParent);
717 const double pathWidth = s.
addSize.
getExaggeration(s, fromLane) * personPlanWidth * (duplicateWidth ? 2 : 1);
753 pathWidth, 1,
false,
false);
758 pathWidth, 1,
false,
false);
763 pathWidth, 1,
false,
false);
768 pathWidth, 1,
false,
false);
781 GNEEdge* previousEdge =
nullptr;
782 if (previousChild->getParentLanes().size() == 1) {
783 previousEdge = previousChild->
getParentLanes().front()->getParentEdge();
784 }
else if (previousChild->getParentAdditionals().size() == 1) {
785 previousEdge = previousChild->
getParentAdditionals().front()->getParentLanes().front()->getParentEdge();
786 }
else if (previousChild->getParentEdges().size() > 0) {
804 if ((previousChild->getParentJunctions().size() > 0) && (
getParentJunctions().size() > 0)) {
812 }
else if (previousEdge != firstEdge) {
821 if (nextChild->getParentLanes().size() == 1) {
823 }
else if (nextChild->getParentEdges().size() > 0) {
825 }
else if (nextChild->getParentAdditionals().size() == 1) {
826 nextEdge = nextChild->
getParentAdditionals().front()->getParentLanes().front()->getParentEdge();
843 if ((nextChild->getParentJunctions().size() > 0) && (
getParentJunctions().size() > 0)) {
851 }
else if (lastEdge && (nextChild->getParentJunctions().size() > 0)) {
855 }
else if (nextEdge != lastEdge) {
870 GNEEdge* previousEdge =
nullptr;
871 if (previousChild->getParentLanes().size() == 1) {
872 previousEdge = previousChild->
getParentLanes().front()->getParentEdge();
873 }
else if (previousChild->getParentAdditionals().size() == 1) {
874 previousEdge = previousChild->
getParentAdditionals().front()->getParentLanes().front()->getParentEdge();
875 }
else if (previousChild->getParentEdges().size() > 0) {
893 if ((previousChild->getParentJunctions().size() > 0) && (
getParentJunctions().size() > 0)) {
894 return (
"Junction '" + previousChild->getParentJunctions().back()->getID() +
898 }
else if (previousEdge && firstEdge && (previousEdge != firstEdge)) {
899 return "Edge '" + previousEdge->
getID() +
"' is not consecutive with edge '" + firstEdge->
getID() +
"'";
907 if (nextChild->getParentLanes().size() == 1) {
909 }
else if (nextChild->getParentAdditionals().size() == 1) {
910 nextEdge = nextChild->
getParentAdditionals().front()->getParentLanes().front()->getParentEdge();
911 }
else if (nextChild->getParentEdges().size() > 0) {
929 if ((nextChild->getParentJunctions().size() > 0) && (
getParentJunctions().size() > 0)) {
930 return (
"Junction '" + nextChild->getParentJunctions().front()->getID() +
934 }
else if (lastEdge && (nextChild->getParentJunctions().size() > 0)) {
935 return (
"edge '" + lastEdge->
getID() +
"' is not consecutive with junction '" + nextChild->getParentJunctions().back()->getID() +
"'");
936 }
else if (nextEdge && lastEdge && (nextEdge != lastEdge)) {
937 return "Edge '" + lastEdge->
getID() +
"' is not consecutive with edge '" + nextEdge->
getID() +
"'";
941 return "undefined problem";
950 const double rot = ((double)atan2((posB.
x() - posA.
x()), (posA.
y() - posB.
y())) * (double) 180.0 / (
double)
M_PI);
968 const double contourWidth = (0.05 * exaggeration);
973 glRotated(rotation, 0, 0, -1);
974 glTranslated((width * exaggeration * 0.5) + (0.35 * exaggeration), 0, 0);
979 glTranslated(0, 0, 0.1);
992 const double contourWidth = (0.05 * exaggeration);
997 glRotated(rotation, 0, 0, -1);
998 glTranslated(-1 * ((width * 0.5 * exaggeration) + (0.35 * exaggeration)), 0, 0);
1003 glTranslated(0, 0, 0.1);
1090 std::vector<GNEDemandElement*> parents;
1091 if (value.size() > 0) {
1101 for (
const auto& tag : tags) {
1117std::vector<GNEDemandElement::EdgeStopIndex>
1119 std::vector<GNEDemandElement::EdgeStopIndex> edgeStopIndex;
1123 std::vector<GNEEdge*> pathEdges;
1128 pathEdges = parent->getParentEdges();
1131 if (parent->getParentDemandElements().size() > 1) {
1132 pathEdges = parent->getParentDemandElements().at(1)->getParentEdges();
1134 }
else if (parent->getTagProperty().hasEmbeddedRoute()) {
1136 pathEdges = parent->getChildDemandElements().front()->getParentEdges();
1139 const auto lastEdge = parent->getParentEdges().back();
1143 for (
auto it = pathElementSegments.begin(); (it != pathElementSegments.end()) && !stop; it++) {
1144 if ((*it)->getLane()) {
1145 pathEdges.push_back((*it)->getLane()->getParentEdge());
1147 if (pathEdges.back() == lastEdge) {
1154 for (
const auto& demandElement : parent->getChildDemandElements()) {
1155 if (demandElement->getTagProperty().isStop() || demandElement->getTagProperty().isWaypoint()) {
1158 if (demandElement->getParentAdditionals().size() > 0) {
1159 edge = demandElement->
getParentAdditionals().front()->getParentLanes().front()->getParentEdge();
1164 if ((edgeStopIndex.size() > 0) && (edgeStopIndex.back().edge == edge)) {
1165 edgeStopIndex.back().stops.push_back(demandElement);
1167 edgeStopIndex.push_back(
EdgeStopIndex(edge, demandElement));
1172 int currentEdgeStopIndex = 0;
1173 for (
int i = 0; (i < (int)pathEdges.size()) && (currentEdgeStopIndex < (
int)edgeStopIndex.size()); i++) {
1175 if (edgeStopIndex[currentEdgeStopIndex].edge == pathEdges.at(i)) {
1176 edgeStopIndex[currentEdgeStopIndex].stopIndex = i;
1177 currentEdgeStopIndex++;
1181 for (
int j = (i + 1); j < (int)pathEdges.size(); j++) {
1182 if (edgeStopIndex[currentEdgeStopIndex].edge == pathEdges.at(j)) {
1188 currentEdgeStopIndex++;
1194 for (
auto& edgeStop : edgeStopIndex) {
1195 if (edgeStop.stops.size() > 1) {
1197 std::map<double, std::vector<GNEDemandElement*> > sortedStops;
1198 for (
const auto& stop : edgeStop.stops) {
1206 edgeStop.stops.clear();
1207 for (
const auto& sortedStop : sortedStops) {
1208 edgeStop.stops.insert(edgeStop.stops.end(), sortedStop.second.begin(), sortedStop.second.end());
1212 return edgeStopIndex;
1220 switch (attribute) {
1245 switch (attribute) {
1307 std::vector<GNEEdge*> edges;
1320 if (path.size() > 0) {
1322 for (
const auto& edge : path) {
1323 length += edge->getNBEdge()->getFinalLength();
1325 for (
int i = 0; i < ((int)path.size() - 1); i++) {
1326 length += path.at(i)->getLanes().front()->getLane2laneConnections().getLane2laneGeometry(path.at(i + 1)->getLanes().front()).getShape().length();
@ MID_COPY_TYPED_NAME
Copy typed object name - popup entry.
@ MID_OPEN_ADDITIONAL_DIALOG
open additional dialog (used in netedit)
@ MID_COPY_NAME
Copy object name - popup entry.
@ GLO_PERSONFLOW
a person flow
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
const int VEHPARS_PROB_SET
const int VEHPARS_VPH_SET
const int VEHPARS_END_SET
const int VEHPARS_POISSON_SET
const int VEHPARS_NUMBER_SET
const int VEHPARS_PERIOD_SET
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
@ GNE_TAG_STOPPERSON_BUSSTOP
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ SUMO_TAG_VTYPE_DISTRIBUTION
distribution of a vehicle type
@ GNE_TAG_STOPPERSON_TRAINSTOP
@ GNE_TAG_ROUTE_EMBEDDED
embedded route
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_PARENT
parent of an additional element
@ GNE_ATTR_VTYPE_DISTRIBUTION
vehicle type distribution
@ SUMO_ATTR_EDGES
the edges of a route
@ GNE_ATTR_POISSON
poisson definition (used in flow)
@ SUMO_ATTR_CONTAINERSPERHOUR
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_PERSONSPERHOUR
const double SUMO_const_halfLaneWidth
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
static void pushName(unsigned int name)
push Name
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 drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
static void popName()
pop Name
static void pushMatrix()
push matrix
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, const int align=0, double width=-1)
An Element which don't belong to GNENet but has influence in the simulation.
const GUIGeometry & getAdditionalGeometry() const
obtain additional geometry
const std::string getID() const
get ID (all Attribute Carriers have one)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
FXIcon * getACIcon() const
get FXIcon associated to this AC
bool mySelected
boolean to check if this AC is selected (instead of GUIGlObjectStorage)
bool myIsTemplate
whether the current object is a template object (not drawn in the view)
virtual void toggleAttribute(SumoXMLAttr key, const bool value)
method for enable or disable the attribute and nothing else (used in GNEChange_EnableAttribute)
static T parse(const std::string &string)
parses a value of type T from string (used for basic types: int, double, bool, etc....
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
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
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
An Element which don't belong to GNENet but has influence in the simulation.
void buildMenuCommandRouteLength(GUIGLObjectPopupMenu *ret) const
build menu command route length
void replaceDemandParentEdges(const std::string &value)
replace demand parent edges
virtual void updateGeometry()=0
update pre-computed geometry information
std::vector< GNEDemandElement * > getInvalidStops() const
get invalid stops
virtual SUMOVehicleClass getVClass() const =0
void updateDemandElementGeometry(const GNELane *lane, const double posOverLane)
update element stacked geometry (stacked)
void replaceDemandElementParent(SumoXMLTag tag, const std::string &value, const int parentIndex)
replace demand element parent
void drawStackLabel(const int number, const std::string &element, const Position &position, const double rotation, const double width, const double length, const double exaggeration) const
draw stack label
virtual std::string getBegin() const
get begin time of demand element
Problem isPersonPlanValid() const
check if person plan is valid
virtual GNELane * getFirstPathLane() const =0
get first path lane
Position getPathElementArrivalPos() const
get path element arrival position
GUIGeometry myDemandElementGeometry
demand element geometry (also called "stacked geometry")
virtual double getAttributeDouble(SumoXMLAttr key) const =0
GNEDemandElement * getNextChildDemandElement(const GNEDemandElement *demandElement) const
get next child demand element to the given demand element
void updateDemandElementStackLabel(const int stack)
update stack label
void drawFlowLabel(const Position &position, const double rotation, const double width, const double length, const double exaggeration) const
draw flow label
void replaceLastParentEdge(const std::string &value)
replace the last parent edge
void drawJunctionLine(const GNEDemandElement *element) const
draw line between junctions
virtual std::string getAttribute(SumoXMLAttr key) const =0
GUIGlObject * getGUIGlObject()
get GUIGlObject associated with this AttributeCarrier
bool isPathElementSelected() const
check if path element is selected
void replaceFirstParentAdditional(SumoXMLTag tag, const std::string &value)
replace the first parent additional
double getPathElementArrivalValue() const
get path element arrival lane pos
GNEDemandElement * getRouteParent() const
get route parent (always the second parent demand element)
void selectGLObject()
select element
bool drawContainerPlan() const
check if container plan can be drawn
GUIGeometry mySpreadGeometry
demand element spread geometry (Only used by vehicles and pedestrians)
std::string getPersonPlanProblem() const
get person plan problem
void replaceFirstParentJunction(const std::string &value)
replace the first parent junction
std::vector< EdgeStopIndex > getEdgeStopIndex() const
get edgeStopIndex
void setVTypeDistributionParent(const std::string &value)
set VTypeDistribution parent
void updateGLObject()
update GLObject (geometry, ID, etc.)
GNEDemandElement * getTypeParent() const
get type parent (needed because first parent can be either type or typeDistribution)
void replaceDemandParentLanes(const std::string &value)
replace demand parent lanes
bool demandElementExist(const std::string &id, const std::vector< SumoXMLTag > tags) const
check if the given demand element exist
void replaceFirstParentEdge(const std::string &value)
replace the first parent edge
bool isGLObjectLocked()
check if element is locked
int myStackedLabelNumber
stacked label number
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
void updateDemandElementSpreadGeometry(const GNELane *lane, const double posOverLane)
update element spread geometry
virtual Position getPositionInView() const =0
Returns position of demand element in view.
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform demand element changes
const GUIGeometry & getDemandElementGeometry()
get demand element geometry (stacked)
virtual GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
virtual bool checkChildDemandElementRestriction() const
check restriction with the number of children
const Position getBeginPosition(const double pedestrianDepartPos) const
get personPlan start position
Problem
enum class for demandElement problems
void removeGeometryPoint(const Position clickedPosition, GNEUndoList *undoList)
remove geometry point in the clicked position (Currently unused in shapes)
GNEDemandElement * getPreviousChildDemandElement(const GNEDemandElement *demandElement) const
get previous child demand element to the given demand element
Position getPathElementDepartPos() const
get path element depart position
void adjustDefaultFlowAttributes(SUMOVehicleParameter *vehicleParameters)
adjust flow default attributes (called in vehicle/person/flow constructors)
double getPathElementDepartValue() const
get path element depart lane pos
void markAsFrontElement()
mark element as front element
void setFlowParameters(SUMOVehicleParameter *vehicleParameters, const SumoXMLAttr attribute, const bool value)
set flow parameters (used in toggleAttribute(...) function of vehicles, persons and containers
void drawPersonPlanPartial(const bool drawPlan, const GUIVisualizationSettings &s, const GNELane *lane, const GNEPathManager::Segment *segment, const double offsetFront, const double personPlanWidth, const RGBColor &personPlanColor) const
draw person plan partial lane
bool isValidDemandElementID(const std::string &newID) const
check if a new demand element ID is valid
static const double myPersonPlanArrivalPositionDiameter
person plans arrival position radius
void replaceLastParentAdditional(SumoXMLTag tag, const std::string &value)
replace the last parent additional
virtual void drawGL(const GUIVisualizationSettings &s) const =0
Draws the object.
virtual ~GNEDemandElement()
Destructor.
virtual void openDemandElementDialog()
open DemandElement Dialog
void deleteGLObject()
delete element
bool drawPersonPlan() const
void replaceLastParentJunction(const std::string &value)
replace the last parent junction
virtual Position getAttributePosition(SumoXMLAttr key) const =0
A road/street connecting two junctions (netedit-version)
GNEJunction * getFromJunction() const
get from Junction (only used to increase readability)
GNEJunction * getToJunction() const
get from Junction (only used to increase readability)
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
friend class GNEDemandElement
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
const std::vector< GNEEdge * > & getParentEdges() const
get parent edges
const std::vector< GNELane * > & getParentLanes() const
get parent lanes
void replaceParentElements(T *elementChild, const U &newParents)
replace parent elements
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
GNEEdge * getParentEdge() const
get parent edge
double myMoveElementLateralOffset
move element lateral offset (used by elements placed over lanes
const std::map< SumoXMLTag, std::set< GNEDemandElement * > > & getDemandElements() const
get demand elements
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
GNEJunction * retrieveJunction(const std::string &id, bool hardFail=true) const
get junction by id
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
A NBNetBuilder extended by visualisation and editing capabilities.
void deleteDemandElement(GNEDemandElement *demandElement, GNEUndoList *undoList)
remove demand element
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
GNEPathManager * getPathManager()
get path manager
GNEViewNet * getViewNet() const
get view net
std::vector< GNEEdge * > calculateDijkstraPath(const SUMOVehicleClass vClass, const std::vector< GNEEdge * > &partialEdges) const
calculate Dijkstra path between a list of partial edges
bool drawPathGeometry(const bool dottedElement, const GNELane *lane, SumoXMLTag tag)
check if path element geometry must be drawn in the given lane
bool isRoute() const
check if pathElement is a route
Segment * getPreviousSegment() const
get previous segment
Segment * getNextSegment() const
get next segment
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
PathCalculator * getPathCalculator()
obtain instance of PathCalculator
const std::vector< Segment * > & getPathElementSegments(PathElement *pathElement) const
get path segments
PathDraw * getPathDraw()
obtain instance of PathDraw
const GNELane * getFirstLane(const PathElement *pathElement) const
get first lane associated with path element
SelectionInformation * getSelectionInformation() const
get modul for selection information
bool isFlow() const
return true if tag correspond to a flow element
bool isPersonPlan() const
return true if tag correspond to a person plan
bool isRoute() const
return true if tag correspond to a route element
bool isStop() const
return true if tag correspond to a stop element
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool hasDialog() const
return true if tag correspond to an element that can be edited using a dialog
bool isWaypoint() const
return true if tag correspond to a waypoint element
bool isStopPerson() const
return true if tag correspond to a person stop element
const std::string & getDefaultValue(SumoXMLAttr attr) const
return the default value of the attribute of an element
bool isContainerPlan() const
return true if tag correspond to a container plan
bool isObjectLocked(GUIGlObjectType objectType, const bool selected) const
check if given GLObject is locked for inspect, select, delete and move
const GNEAttributeCarrier * getFrontAttributeCarrier() const
get front attributeCarrier
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
void setFrontAttributeCarrier(GNEAttributeCarrier *AC)
set front attributeCarrier
bool drawSelectContour(const GUIGlObject *GLObject, const GNEAttributeCarrier *AC) const
check if draw select contour
bool drawDeleteContour(const GUIGlObject *GLObject, const GNEAttributeCarrier *AC) const
check if draw delete contour
const GNEViewNetHelper::NetworkViewOptions & getNetworkViewOptions() const
get network view options
void drawTranslateFrontAttributeCarrier(const GNEAttributeCarrier *AC, double typeOrLayer, const double extraOffset=0)
draw front attributeCarrier
GNEViewParent * getViewParent() const
get the net object
GNEUndoList * getUndoList() const
get the undoList object
const std::vector< GNEAttributeCarrier * > & getInspectedAttributeCarriers() const
get inspected attribute carriers
GNEViewNetHelper::LockManager & getLockManager()
get lock manager
void buildSelectionACPopupEntry(GUIGLObjectPopupMenu *ret, GNEAttributeCarrier *AC)
Builds an entry which allows to (de)select the object.
bool isAttributeCarrierInspected(const GNEAttributeCarrier *AC) const
check if attribute carrier is being inspected
const GNEViewNetHelper::DemandViewOptions & getDemandViewOptions() const
get demand view options
GNESelectorFrame * getSelectorFrame() const
get frame for select elements
static FXMenuCommand * buildFXMenuCommand(FXComposite *p, const std::string &text, FXIcon *icon, FXObject *tgt, FXSelector sel)
build menu command
static void drawDottedContourShape(const GUIVisualizationSettings &s, const DottedContourType type, const PositionVector &shape, const double width, const double exaggeration, const bool drawFirstExtrem, const bool drawLastExtrem)
draw dotted contour for the given shape (used by additionals)
static void drawGeometry(const GUIVisualizationSettings &s, const Position &mousePos, 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.
bool mouseWithinGeometry(const Position center, const double radius) const
check if mouse is within elements geometry (for circles)
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, const GUIMainWindow &app) const
Builds an entry which allows to copy the cursor position if geo projection is used,...
GUIGlID getGlID() const
Returns the numerical id of the object.
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0, bool forceShow=false) const
draw name of item
A window containing a gl-object's parameter.
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
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
double laneWidthExaggeration
The lane exaggeration (upscale thickness)
GUIVisualizationColorSettings colorSettings
color settings
double scale
information about a lane's width (temporary, used for a single view)
int getCircleResolution() const
function to calculate circle resolution for all circles drawn in drawGL(...) functions
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 distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
double x() const
Returns the x-position.
double y() const
Returns the y-position.
double length2D() const
Returns the length.
Position positionAtOffset2D(double pos, double lateralOffset=0) const
Returns the position at the given length.
static const RGBColor WHITE
unsigned char alpha() const
Returns the alpha-amount of the color.
static const RGBColor GREY
static const RGBColor CYAN
static const RGBColor BLACK
static const RGBColor RED
named colors
Structure representing possible vehicle parameter.
int parametersSet
Information for the router which parameter were set, TraCI may modify this (when changing color)
SUMOTime repetitionOffset
The time offset between vehicle reinsertions.
static bool isValidVehicleID(const std::string &value)
whether the given string is a valid id for a vehicle or flow
static const std::string format(const std::string &format, T value, Targs... Fargs)
adds a new formatted message
auxiliar struct used for calculate pathStopIndex
bool showAllPersonPlans() const
check all person plans has to be show
const GNEDemandElement * getLockedPerson() const
get locked person
const GNEDemandElement * getLockedContainer() const
get locked container
bool showAllContainerPlans() const
check all container plans has to be show
bool isCurrentSupermodeDemand() const
@check if current supermode is Demand
bool isCurrentSupermodeNetwork() const
@check if current supermode is Network
static void drawLockIcon(const GNEAttributeCarrier *AC, GUIGlObjectType type, const Position viewPosition, const double exaggeration, const double size=0.5, const double offsetx=0, const double offsety=0)
draw lock icon
bool showDemandElements() const
check if show demand elements checkbox is enabled
RGBColor selectedPersonPlanColor
person plan selection color (Rides, Walks, stopPersons...)
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values