 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
42 {}, {}, {}, {stoppingPlace}, {}, {}, {personParent}, {}),
49 {}, {edge}, {}, {}, {}, {}, {personParent}, {}),
62 myNet->
getViewNet()->getViewParent()->getMoveFrame()->getCommonModeOptions()->getAllowChangeLane());
91 }
else if (firstLane !=
nullptr) {
97 return (endPosFixed <=
getParentEdges().front()->getNBEdge()->getFinalLength()) && (endPosFixed > 0);
110 const double laneLength =
getParentEdges().front()->getNBEdge()->getFinalLength();
114 if (endPosFixed < 0) {
116 }
else if (endPosFixed >
getParentEdges().front()->getNBEdge()->getFinalLength()) {
198 }
else if (firstLane !=
nullptr) {
199 return firstLane->
getID();
371 return laneShape.front();
373 return laneShape.back();
403 if (nextPersonPlan) {
404 undoList->
p_begin(
"Change from attribute of next personPlan");
417 if (nextPersonPlan) {
421 undoList->
p_begin(
"Change from attribute of next personPlan");
437 undoList->
p_begin(
"Change arrivalPos attribute of previous personPlan");
460 if (canParse<SUMOTime>(value)) {
461 return parse<SUMOTime>(value) >= 0;
478 return canParse<double>(value) && fabs(parse<double>(value)) <
getParentEdges().front()->getNBEdge()->getFinalLength();
480 return canParse<bool>(value);
483 return canParse<bool>(value);
566 return "person stop: lane";
571 const std::map<std::string, std::string>&
583 if (pLane->allowPedestrians()) {
600 glTranslated(0, 0, .1);
616 glRotated(180, 0, 0, 1);
625 glRotated(22.5, 0, 0, 1);
629 glTranslated(0, 0, 0);
653 glRotated(-90, 0, 0, 1);
662 glRotated(22.5, 0, 0, 1);
666 glTranslated(0, 0, 0);
710 endPos = parse<double>(value);
718 if (parse<bool>(value)) {
GNEDemandElement * getPreviousChildDemandElement(const GNEDemandElement *demandElement) const
get previous child demand element to the given demand element
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
void setEnabledAttribute(const int enabledAttributes)
method for enabling the attribute and nothing else (used in GNEChange_EnableAttribute)
@ SVC_PEDESTRIAN
pedestrian
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
static const double vaporizerSize
Vaporizer size.
An Element which don't belongs to GNENet but has influency in the simulation.
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
An Element which don't belongs to GNENet but has influency in the simulation.
std::string edge
The edge to stop at (used only in NETEDIT)
void drawPartialGL(const GUIVisualizationSettings &s, const GNELane *lane, const GNEPathManager::Segment *segment, const double offsetFront) const
Draws partial object.
bool friendlyPos
enable or disable friendly position (used by NETEDIT)
const GNETagProperties & getTagProperty() const
get Tag Property assigned to this object
@ SUMO_TAG_STOP_LANE
stop placed over a lane (used in netedit)
@ GNE_TAG_PERSONSTOP_BUSSTOP
std::string getParentName() const
Returns the name of the parent object.
Static storage of an output device and its base (abstract) implementation.
Position getPositionInView() const
Returns position of demand element in view.
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute "attr"
void drawTranslateFrontAttributeCarrier(const GNEAttributeCarrier *AC, double typeOrLayer, const double extraOffset=0)
draw front attributeCarrier
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
bool drawDottedContour() const
check if dotted contour can be drawn
bool drawForRectangleSelection
whether drawing is performed for the purpose of selecting objects using a rectangle
const GNETagProperties & myTagProperty
the xml tag to which this attribute carrier corresponds
const std::vector< double > & getShapeRotations() const
The rotations of the single shape parts.
A NBNetBuilder extended by visualisation and editing capabilities.
friend class GNEChange_EnableAttribute
std::string getDemandElementProblem() const
return a string with the current demand element problem (by default empty, can be reimplemented in ch...
@ GLO_PERSONSTOP
a person stop
const std::string & getDefaultValue() const
get default value
GNELane * getFirstPathLane() const
get first path lane
int parametersSet
Information for the output which parameter were set.
const std::vector< GNELane * > & getParentLanes() const
get parent lanes
const RGBColor & getColor() const
get color
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
bool isAttributeEnabled(SumoXMLAttr key) const
const std::map< std::string, std::string > & getACParametersMap() const
get parameters map
void writeDemandElement(OutputDevice &device) const
writte demand element element into a xml file
const int STOP_EXTENSION_SET
bool isAttributeCarrierInspected(const GNEAttributeCarrier *AC) const
check if attribute carrier is being inspected
const std::vector< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true) const
get edge by id
void drawPersonStopOverBusStop(const GUIVisualizationSettings &s, const double exaggeration, const RGBColor &stopColor) const
draw personStop over busStop
void updateGeometry(const PositionVector &shape)
update entire geometry
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
DemandModeOptions * getDemandModeOptions() const
get demand mode options
GNENet * myNet
pointer to net
A road/street connecting two junctions (netedit-version)
friend class GNEChange_Attribute
declare friend class
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
const GNEAttributeProperties & getAttributeProperties(SumoXMLAttr attr) const
get attribute (throw error if doesn't exist)
void computePathElement()
compute pathElement
GNEMoveOperation * getMoveOperation(const double shapeOffset)
get move operation for the given shapeOffset
const GNEAttributeCarrier * getFrontAttributeCarrier() const
get front attributeCarrier
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
GUIVisualizationDetailSettings detailSettings
detail settings
GNEMoveFrame * getMoveFrame() const
get frame for move elements
const PositionVector & getLaneShape() const
get elements shape
SUMOTime until
The time at which the vehicle may continue its journey.
double newFirstPos
new first position
double getLengthGeometryFactor() const
get length geometry factor
GUIGlID getGlID() const
Returns the numerical id of the object.
A class that stores a 2D geometrical boundary.
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList)
commit move shape
static GUIGlID getTexture(GUITexture which)
returns a texture previously defined in the enum GUITexture
static void drawGeometry(const GNEViewNet *viewNet, const Geometry &geometry, const double width)
draw geometry
GUIVisualizationAdditionalSettings additionalSettings
Additional settings.
void replaceAdditionalParent(SumoXMLTag tag, const std::string &value)
replace additional parent
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
std::string time2string(SUMOTime t)
convert SUMOTime to string
static void rotateOverLane(const double rot)
rotate over lane (used by Lock icons, detector logos, etc.)
const double halfWidth
Draw as a normal lane, and reduce width to make sure that a selected edge can still be seen.
double endPos
The stopping position end.
bool isDemandElementValid() const
check if current demand element is valid to be writed into XML (by default true, can be reimplemented...
static const double laneTextures
details for lane textures
double length2D() const
Returns the length.
void setMoveShape(const GNEMoveResult &moveResult)
set move shape
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
@ GNE_TAG_PERSONSTOP_EDGE
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
std::string actType
act Type (only used by Persons) (used by NETEDIT)
GNEViewNet * getViewNet() const
get view net
GUIVisualizationColorSettings colorSettings
color settings
double distance2D(const Position &p, bool perpendicular=false) const
closest 2D-distance to point p (or -1 if perpendicular is true and the point is beyond this vector)
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 enableAttribute(SumoXMLAttr key, GNEUndoList *undoList)
const std::vector< GNEEdge * > & getParentEdges() const
get parent edges
void disableAttribute(SumoXMLAttr key, GNEUndoList *undoList)
GNELane * getLastPathLane() const
get last path lane
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const std::string & getID() const
get ID
void drawPersonStopOverLane(const GUIVisualizationSettings &s, const double exaggeration, const RGBColor &stopColor) const
draw personStop over lane
@ SUMO_TAG_BUS_STOP
A bus stop.
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
double getAttributeDouble(SumoXMLAttr key) const
double y() const
Returns the y-position.
const std::vector< GNEDemandElement * > & getParentDemandElements() const
get parent demand elements
Position positionAtOffset2D(double pos, double lateralOffset=0) const
Returns the position at the given length.
const GNELane * getFirstAllowedLane() const
get first valid lane
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
GNEPersonStop(GNENet *net, GNEDemandElement *personParent, GNEAdditional *stoppingPlace, const SUMOVehicleParameter::Stop &stopParameter)
constructor used for stops over busStops
std::string getBegin() const
get begin time of demand element
~GNEPersonStop()
destructor
const int STOP_DURATION_SET
void selectAttributeCarrier(const bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
void replaceDemandParentEdges(const std::string &value)
replace demand parent edges
GNEGeometry::Geometry myDemandElementGeometry
demand element geometry (also called "stacked geometry")
void fixDemandElementProblem()
fix demand element problem (by default throw an exception, has to be reimplemented in children)
RGBColor selectedPersonPlanColor
person plan selection color (Rides, Walks, personStops...)
void write(OutputDevice &dev, bool close=true) const
Writes the stop as XML.
GUIVisualizationSettings & getVisualisationSettings() const
get visualization settings
GUIVisualizationSizeSettings addSize
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform demand element changes
@ GNE_ATTR_SELECTED
element is selected
static const RGBColor stops
color for Stops
Boundary & grow(double by)
extends the boundary by the given amount
bool drawDetail(const double detail, const double exaggeration) const
check if details can be drawn for the given GUIVisualizationDetailSettings and current scale and exxa...
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
SUMOVehicleClass getVClass() const
const std::string & getTagStr() const
get tag assigned to this object in string format
void updateGeometry()
update pre-computed geometry information
Stores the information about how to visualize structures.
SUMOTime duration
The stopping duration.
Position getLineCenter() const
get line center
static const RGBColor personStops
color for personStops
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
Position getAttributePosition(SumoXMLAttr key) const
void unselectAttributeCarrier(const bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
GUIVisualizationStoppingPlaceSettings stoppingPlaceSettings
StoppingPlace settings.
static void drawDottedContourShape(const DottedContourType type, const GUIVisualizationSettings &s, const PositionVector &shape, const double width, const double exaggeration)
draw dotted contour for the given shape (used by additionals)
static const double busStopWidth
busStop width
bool drawPersonPlan() const
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
const PositionVector & getShape() const
The shape of the additional element.
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
GNEViewParent * getViewParent() const
get the net object
bool getLeavePersonStopsConnected() const
check if leave personStopConnected is enabled
Definition of vehicle stop (position and duration)
static const RGBColor WHITE
@ GNE_ATTR_PARENT
parent of an additional element