 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
36 GNEAdditional(parkingAreaParent, viewNet,
GLO_PARKING_SPACE,
SUMO_TAG_PARKING_SPACE,
"", blockMovement, {}, {}, {}, {parkingAreaParent}, {}, {}, {}, {}, {}, {}),
97 return boundaryShape.getBoxBoundary().grow(5);
141 glTranslated(0, 0, 0.1);
226 return canParse<Position>(value);
228 return canParse<double>(value) && (parse<double>(value) > 0);
230 return canParse<double>(value) && (parse<double>(value) > 0);
232 return canParse<double>(value);
234 return canParse<bool>(value);
238 return canParse<bool>(value);
281 myWidth = parse<double>(value);
291 myAngle = parse<double>(value);
301 if (parse<bool>(value)) {
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Position myPosition
position of Parking Space in view
Position getPositionInView() const
Returns position of additional in view.
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
An Element which don't belongs to GNENet but has influency in the simulation.
std::string getParametersStr() const
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
void splitEdgeGeometry(const double splitPosition, const GNENetElement *originalElement, const GNENetElement *newElement, GNEUndoList *undoList)
split geometry
~GNEParkingSpace()
Destructor.
const std::string & getAdditionalID() const
Boundary movingGeometryBoundary
boundary used during moving of elements (to avoid insertion in RTREE
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
bool drawForRectangleSelection
whether drawing is performed for the purpose of selecting objects using a rectangle
bool drawBoundaries
enable or disable draw boundaries
void removeGLObjectFromGrid(GUIGlObject *o)
add GL Object into net
void rotate2D(double angle)
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(....
GNEParkingSpace(GNEViewNet *viewNet, GNEAdditional *parkingAreaParent, const Position &pos, double width, double length, double angle, bool blockMovement)
Constructor.
void changeAdditionalID(const std::string &newID)
change ID of additional
A parking space for a single vehicle within a parking area.
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
BlockIcon myBlockIcon
variable BlockIcon
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Position snapToActiveGrid(const Position &pos, bool snapXY=true) const
Returns a position that is mapped to the closest grid point if the grid is active.
AdditionalMove myMove
variable AdditionalMove
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
static void drawBoundary(const Boundary &b)
Draw a boundary (used for debugging)
friend class GNEChange_Attribute
declare friend class
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
GNENet * getNet() const
get the net object
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
double myWidth
width of Parking Space
void selectAttributeCarrier(bool changeFlag=true)
GUIGlID getGlID() const
Returns the numerical id of the object.
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
A class that stores a 2D geometrical boundary.
void updateGeometry()
update pre-computed geometry information
parameters "key1=value1|key2=value2|...|keyN=valueN"
static void drawShapeDottedContourRectangle(const GUIVisualizationSettings &s, const int type, const Position ¢er, const double width, const double height, const double rotation=0, const double offsetX=0, const double offsetY=0)
draw a dotted contour around the given Position with certain width and height
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
double myLength
Length of Parking Space.
bool myBlockMovement
boolean to check if additional element is blocked (i.e. cannot be moved with mouse)
void replaceParentAdditional(GNEShape *shapeTobeChanged, const std::string &newParentAdditionalID, int additionalParentIndex)
replace the parent additional of a shape
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes
GUIVisualizationColorSettings colorSettings
color settings
void setParametersStr(const std::string ¶msString)
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void drawIcon(const GUIVisualizationSettings &s, const double exaggeration, const double size=0.5) const
draw lock icon
void addGLObjectIntoGrid(GUIGlObject *o)
add GL Object into net
double y() const
Returns the y-position.
static bool areParametersValid(const std::string &value, bool report=false)
check if given string can be parsed to a parameters map "key1=value1|key2=value2|....
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
block movement of a graphic element
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
bool drawAdditionals(const double exaggeration) const
check if additionals must be drawn
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
double myAngle
Angle of Parking Space.
std::string getAttribute(SumoXMLAttr key) const
static const RGBColor parkingSpaceInnen
color for parkingArea innen
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GUIVisualizationSizeSettings addSize
std::string getParentName() const
Returns the name of the parent object (if any)
bool isAttributeEnabled(SumoXMLAttr key) const
void add(const Position &pos)
Adds the given position to this one.
bool isInitialised() const
check if Boundary is Initialised
const std::string & getTagStr() const
get tag assigned to this object in string format
static const RGBColor parkingSpace
color for parkingArea sign
Stores the information about how to visualize structures.
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
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.
Position originalViewPosition
value for saving first original position over lane before moving
double getAttributeDouble(SumoXMLAttr key) const
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
parent of an additional element