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) {
136 std::vector<GNEEdge*> middleEdges;
143 middleEdges.push_back(*i);
191 new FXMenuSeparator(ret);
198 new FXMenuSeparator(ret);
284 if (previousPersonPlan) {
293 return (endPos - 0.3);
315 if (previousPersonPlan) {
330 return previousPersonPlan->
getParentAdditionals().front()->getAdditionalGeometry().getShape().getLineCenter();
428std::vector<GNEDemandElement*>
431 std::vector<GNEDemandElement*> stops;
434 stops.push_back(stop);
442 std::vector<const GNEDemandElement*> sortedStops;
450 for (
const auto& sortedStop : sortedStops) {
451 const auto it = std::find(stops.begin(), stops.end(), sortedStop);
452 if (it != stops.end()) {
542 const double offsetFront,
const double personPlanWidth,
const RGBColor& personPlanColor)
const {
552 const GNEAttributeCarrier* personPlanInspected = (inspectedACs.size() > 0) ? inspectedACs.front() :
nullptr;
554 const bool duplicateWidth = (personPlanInspected ==
this) || (personPlanInspected == personParent);
598 const double circleWidthSquared = circleWidth * circleWidth;
608 glTranslated(geometryEndPos.
x(), geometryEndPos.
y(), 0);
683 const double offsetFront,
const double personPlanWidth,
const RGBColor& personPlanColor)
const {
693 const GNEAttributeCarrier* personPlanInspected = (inspectedACs.size() > 0) ? inspectedACs.front() :
nullptr;
695 const bool duplicateWidth = (personPlanInspected ==
this) || (personPlanInspected == personParent);
697 const double pathWidth = s.
addSize.
getExaggeration(s, fromLane) * personPlanWidth * (duplicateWidth ? 2 : 1);
733 pathWidth, 1,
false,
false);
738 pathWidth, 1,
false,
false);
743 pathWidth, 1,
false,
false);
748 pathWidth, 1,
false,
false);
761 GNEEdge* previousEdge =
nullptr;
762 if (previousChild->getParentLanes().size() == 1) {
763 previousEdge = previousChild->
getParentLanes().front()->getParentEdge();
764 }
else if (previousChild->getParentAdditionals().size() == 1) {
765 previousEdge = previousChild->
getParentAdditionals().front()->getParentLanes().front()->getParentEdge();
766 }
else if (previousChild->getParentEdges().size() > 0) {
784 if ((previousChild->getParentJunctions().size() > 0) && (
getParentJunctions().size() > 0)) {
792 }
else if (previousEdge != firstEdge) {
801 if (nextChild->getParentLanes().size() == 1) {
803 }
else if (nextChild->getParentEdges().size() > 0) {
805 }
else if (nextChild->getParentAdditionals().size() == 1) {
806 nextEdge = nextChild->
getParentAdditionals().front()->getParentLanes().front()->getParentEdge();
823 if ((nextChild->getParentJunctions().size() > 0) && (
getParentJunctions().size() > 0)) {
831 }
else if (lastEdge && (nextChild->getParentJunctions().size() > 0)) {
835 }
else if (nextEdge != lastEdge) {
850 GNEEdge* previousEdge =
nullptr;
851 if (previousChild->getParentLanes().size() == 1) {
852 previousEdge = previousChild->
getParentLanes().front()->getParentEdge();
853 }
else if (previousChild->getParentAdditionals().size() == 1) {
854 previousEdge = previousChild->
getParentAdditionals().front()->getParentLanes().front()->getParentEdge();
855 }
else if (previousChild->getParentEdges().size() > 0) {
873 if ((previousChild->getParentJunctions().size() > 0) && (
getParentJunctions().size() > 0)) {
874 return (
"Junction '" + previousChild->getParentJunctions().back()->getID() +
878 }
else if (previousEdge && firstEdge && (previousEdge != firstEdge)) {
879 return "Edge '" + previousEdge->
getID() +
"' is not consecutive with edge '" + firstEdge->
getID() +
"'";
887 if (nextChild->getParentLanes().size() == 1) {
889 }
else if (nextChild->getParentAdditionals().size() == 1) {
890 nextEdge = nextChild->
getParentAdditionals().front()->getParentLanes().front()->getParentEdge();
891 }
else if (nextChild->getParentEdges().size() > 0) {
909 if ((nextChild->getParentJunctions().size() > 0) && (
getParentJunctions().size() > 0)) {
910 return (
"Junction '" + nextChild->getParentJunctions().front()->getID() +
914 }
else if (lastEdge && (nextChild->getParentJunctions().size() > 0)) {
915 return (
"edge '" + lastEdge->
getID() +
"' is not consecutive with junction '" + nextChild->getParentJunctions().back()->getID() +
"'");
916 }
else if (nextEdge && lastEdge && (nextEdge != lastEdge)) {
917 return "Edge '" + lastEdge->
getID() +
"' is not consecutive with edge '" + nextEdge->
getID() +
"'";
921 return "undefined problem";
930 const double rot = ((double)atan2((posB.
x() - posA.
x()), (posA.
y() - posB.
y())) * (double) 180.0 / (
double)
M_PI);
986 std::vector<GNEEdge*> middleEdges = parse<std::vector<GNEEdge*> >(
getNet(), value);
987 middleEdges.insert(middleEdges.begin(),
getParentEdges().front());
990 if (updateChildReferences) {
1028 std::vector<GNEDemandElement*> parents;
1029 if (value.size() > 0) {
1039 throw ProcessError(
"Calling non-implemented function checkChildDemandElementRestriction during saving of " +
getTagStr() +
". It muss be reimplemented in child class");
1052 myStops.push_back(std::make_pair(posIndexPair, stop));
1054 std::sort(myStops.begin(), myStops.end());
1058std::vector<const GNEDemandElement*>
1060 std::vector<GNEDemandElement*> stops;
1063 if (stop->getTagProperty().isStop()) {
1064 stops.push_back(stop);
1068 std::vector<SortedStops> sortedStops;
1069 for (
const auto& edge : edges) {
1073 for (
const auto& stop : stops) {
1074 bool stopLoop =
false;
1076 for (
auto it = sortedStops.begin(); (it != sortedStops.end()) && !stopLoop; it++) {
1077 if ((stop->getParentAdditionals().size() > 0) && (stop->getParentAdditionals().front()->getParentLanes().front()->getParentEdge() == it->edge)) {
1080 }
else if ((stop->getParentLanes().size() > 0) && (stop->getParentLanes().front()->getParentEdge() == it->edge)) {
1087 std::vector<const GNEDemandElement*> solution;
1088 for (
const auto& sortedStop : sortedStops) {
1089 for (
const auto& stop : sortedStop.myStops) {
1090 solution.push_back(stop.second);
1101 switch (attribute) {
1126 switch (attribute) {
1188 std::vector<GNEEdge*> edges;
1201 if (path.size() > 0) {
1203 for (
const auto& edge : path) {
1204 length += edge->getNBEdge()->getFinalLength();
1206 for (
int i = 0; i < ((int)path.size() - 1); i++) {
1207 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.
std::string time2string(SUMOTime t)
convert SUMOTime to string
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_STOP_LANE
stop placed over a lane (used in netedit)
@ 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_ROUTE_EMBEDDED
embedded route (used in NETEDIT)
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_PARENT
parent of an additional element
@ 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
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 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
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 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
double getPathElementArrivalValue() const
get path element arrival lane pos
virtual Boundary getCenteringBoundary() const =0
Returns the boundary to which the view shall be centered in order to show the object.
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
void setVTypeDistributionParent(const std::string &value)
set VTypeDistribution parent
void updateGLObject()
update GLObject (geometry, ID, etc.)
std::vector< const GNEDemandElement * > getSortedStops(const std::vector< GNEEdge * > &edges) const
get sorted stops
void replaceDemandParentLanes(const std::string &value)
replace demand parent lanes
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
void replaceAdditionalParent(SumoXMLTag tag, const std::string &value)
replace additional parent
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 replaceMiddleParentEdges(const std::string &value, const bool updateChildReferences)
replace middle (via) parent edges
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
std::vector< GNEEdge * > getViaEdges() const
get middle (via) parent edges
static const double myPersonPlanArrivalPositionDiameter
person plans arrival position radius
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)
void setParents(const T &newParents)
set parents
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
GNEHierarchicalContainer myHierarchicalContainer
hierarchical container with parents and children
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
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
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
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 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.
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
void mouseWithinGeometry(const Position center, const double radius) const
check if mouse is within elements geometry (for circles)
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,...
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 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
struct for writting sorted stops
void addStop(const GNEDemandElement *stop)
add (and sort) stop
SortedStops(GNEEdge *edge_)
constructor
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