39 const std::string& departPos,
const std::string& name,
const std::vector<std::string>& badges,
40 const bool friendlyPosition,
const int roadSideCapacity,
const bool onRoad,
const double width,
41 const double length,
const double angle,
const bool lefthand,
const Parameterised::Map& parameters) :
43 endPos, name, friendlyPosition,
RGBColor::INVISIBLE, angle, parameters),
44 myDepartPos(departPos),
45 myRoadSideCapacity(roadSideCapacity),
50 myAcceptedBadges(badges) {
89 space->writeAdditional(device);
164 drawSign(s, d, parkingAreaExaggeration, baseColor, signColor,
"P");
166 glTranslated(0, 0, 0.1);
189 if (movingGeometryPoints) {
269 }
else if (canParse<double>(value)) {
271 const double departPos = parse<double>(value);
272 if (departPos >= 0) {
276 return (departPos <=
getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength());
287 return canParse<int>(value) && (parse<int>(value) >= 0);
289 return canParse<bool>(value);
291 return canParse<double>(value) && (parse<double>(value) > 0);
296 return canParse<double>(value) && (parse<double>(value) > 0);
299 return canParse<bool>(value);
334 myAcceptedBadges = GNEAttributeCarrier::parse<std::vector<std::string> >(value);
344 myWidth = parse<double>(value);
347 space->updateGeometry();
351 getParentLanes().front()->getParentEdge()->updateCenteringBoundary(
true);
362 space->updateGeometry();
@ GLO_PARKING_AREA
a ParkingArea
@ SUMO_TAG_PARKING_AREA
A parking area.
@ SUMO_TAG_PARKING_SPACE
A parking space for a single vehicle within a parking area.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_ACCEPTED_BADGES
@ SUMO_ATTR_ROADSIDE_CAPACITY
const double INVALID_DOUBLE
invalid double
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
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 popMatrix()
pop matrix
static void pushMatrix()
push matrix
static void drawSpaceOccupancies(const double exaggeration, const Position &pos, const double rotation, const double width, const double length, const bool vehicle)
draw
double getExaggeration(const GUIVisualizationSettings &s) const override
return exaggeration associated with this GLObject
void drawRightGeometryPoint(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const Position &pos, const double rot, const RGBColor &baseColor, const bool ignoreShift=false) const
draw right geometry point
GNEContour myAdditionalContour
variable used for draw additional contours
GUIGeometry myAdditionalGeometry
geometry to be precomputed in updateGeometry(...)
void drawAdditionalID(const GUIVisualizationSettings &s) const
draw additional ID
void drawAdditionalName(const GUIVisualizationSettings &s) const
draw additional name
void drawDemandElementChildren(const GUIVisualizationSettings &s) const
draw demand element children
const RGBColor * mySpecialColor
pointer to special color (used for drawing Additional with a certain color, mainly used for selection...
void drawLeftGeometryPoint(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const Position &pos, const double rot, const RGBColor &baseColor, const bool ignoreShift=false) const
draw left geometry point
void drawParentChildLines(const GUIVisualizationSettings &s, const RGBColor &color, const bool onlySymbols=false) const
draw parent and child lines
bool drawMovingGeometryPoints() const
check if draw moving geometry points
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
bool isTemplate() const
check if this AC is template
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
void drawInLayer(const double typeOrLayer, const double extraOffset=0) const
draw element in the given layer, or in front if corresponding flag is enabled
const GNETagProperties * getTagProperty() const
get tagProperty associated with this Attribute Carrier
GNENet * myNet
pointer to net
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 drawDottedContourGeometryPoints(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, const PositionVector &shape, const double radius, const double scale, const double lineWidth) const
draw dotted contour for geometry points
bool drawDottedContours(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, const double lineWidth, const bool addOffset) const
draw dotted contours (basics, select, delete, inspect...)
const GNEHierarchicalContainerChildren< GNEAdditional * > & getChildAdditionals() const
return child additionals
const GNEHierarchicalContainerParents< GNELane * > & getParentLanes() const
get parent lanes
A NBNetBuilder extended by visualisation and editing capabilities.
GNEViewNet * getViewNet() const
get view net
double myLength
Length of Parking Area (by default (endPos - startPos) / roadsideCapacity.
void writeAdditional(OutputDevice &device) const
write additional element into a xml file
~GNEParkingArea()
Destructor.
double getAttributeDouble(SumoXMLAttr key) const override
double myWidth
width of Parking Area
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
std::vector< std::string > myAcceptedBadges
The list of badges that allow accessing the parkingArea.
std::string myDepartPos
departPos
bool myOnRoad
Whether vehicles stay on the road.
std::vector< GNELotSpaceDefinition > myLotSpaceDefinitions
vector with GNELotSpaceDefinition
GNEParkingArea(GNENet *net)
default constructor
std::string getAttribute(SumoXMLAttr key) const override
bool isValid(SumoXMLAttr key, const std::string &value) override
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
void updateGeometry() override
update pre-computed geometry information
int myRoadSideCapacity
roadside capacity of Parking Area
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
bool isStoppingPlaceValid(SumoXMLAttr key, const std::string &value) const
void setStoppingPlaceAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
double myEndPosPosOverLane
The end position over lane.
void writeStoppingPlaceAttributes(OutputDevice &device) const
write common stoppingPlace attributes
Position getPositionInView() const
Returns position of additional in view.
void drawSign(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const double exaggeration, const RGBColor &baseColor, const RGBColor &signColor, const std::string &word) const
draw sign
double getStoppingPlaceAttributeDouble(SumoXMLAttr key) const
void calculateStoppingPlaceContour(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const double width, const double exaggeration, const bool movingGeometryPoints) const
check object in view
Position mySymbolPosition
The position of the sign.
double myStartPosOverLane
The start position over lane.
void setStoppingPlaceGeometry(double movingToSide)
set geometry common to all stopping places
GNEContour mySymbolContour
circle contour
std::string getStoppingPlaceAttribute(SumoXMLAttr key) const
bool getDefaultBoolValue(SumoXMLAttr attr) const
get default bool value
double getDefaultDoubleValue(SumoXMLAttr attr) const
get default double value
int getDefaultIntValue(SumoXMLAttr attr) const
get default int value
const std::string & getDefaultStringValue(SumoXMLAttr attr) const
default values
const GNEViewNetHelper::DataViewOptions & getDataViewOptions() const
get data view options
const std::vector< double > & getShapeRotations() const
The rotations of the single shape parts.
static void drawGeometry(const GUIVisualizationSettings::Detail d, const GUIGeometry &geometry, const double width, double offset=0)
draw geometry
const PositionVector & getShape() const
The shape of the additional element.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Stores the information about how to visualize structures.
bool checkDrawAdditional(Detail d, const bool selected) const
check if draw additionals
Detail getDetailLevel(const double exaggeration) const
return the detail level
GUIVisualizationColorSettings colorSettings
color settings
GUIVisualizationDottedContourSettings dottedContourSettings
dotted contour settings
GUIVisualizationAdditionalSettings additionalSettings
Additional settings.
GUIVisualizationNeteditSizeSettings neteditSizeSettings
netedit size settings
static const Position calculateLotSpacePosition(const PositionVector &shape, const int index, const double spaceDim, const double angle, const double width, const double length)
calculate lotSpace position
static double calculateLotSpaceAngle(const PositionVector &shape, const int index, const double spaceDim, const double angle)
calculate lotSpace angle
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static OptionsCont & getOptions()
Retrieves the options.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
std::map< std::string, std::string > Map
parameters map
void writeParams(OutputDevice &device) const
write Params in the given outputdevice
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
double z() const
Returns the z-position.
double y() const
Returns the y-position.
void move2side(double amount, double maxExtension=100)
move position vector to side using certain amount
Position getLineCenter() const
get line center
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
Representation of a single lot space in Netedit.
GNELotSpaceDefinition()
default constructor
bool showAdditionals() const
check if additionals has to be drawn
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 RGBColor connectionColor
connection color
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
RGBColor parkingAreaColorSign
color for parkingArea sign
RGBColor parkingAreaColor
color for parkingAreas
static const double segmentWidthSmall
width of small dotted contour segments
static const double segmentWidth
width of dotted contour segments
static const double additionalGeometryPointRadius
moving additional geometry point radius