117 glTranslated(0, 0, 0.1);
198 return canParse<Position>(value);
200 return canParse<double>(value) && (parse<double>(value) >= 0);
202 return canParse<double>(value) && (parse<double>(value) >= 0);
204 return canParse<double>(value);
206 return canParse<bool>(value);
210 return canParse<bool>(value);
244 myWidth = parse<double>(value);
250 myAngle = parse<double>(value);
259 if (parse<bool>(value)) {
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
std::string getAttribute(SumoXMLAttr key) const
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
void add(const Position &pos)
Adds the given position to this one.
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
const std::string & getAdditionalID() const
returns Additional ID
GNEParkingSpace(GNEViewNet *viewNet, GNEAdditional *parkingAreaParent, const Position &pos, double width, double length, double angle, bool blockMovement)
Constructor.
void changeFirstAdditionalParent(const std::string &newAdditionalParentID)
change first additional parent of additional
Stores the information about how to visualize structures.
double y() const
Returns the y-position.
Position snapToActiveGrid(const Position &pos) const
Returns a position that is mapped to the closest grid point if the grid is active.
double myLength
Lenght of Parking Space.
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
double x() const
Returns the x-position.
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
BlockIcon myBlockIcon
variable BlockIcon
void clearGeometry()
reset geometry
Position originalViewPosition
value for saving first original position over lane before moving
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.
void updateGeometry(bool updateGrid)
update pre-computed geometry information
A parking space for a single vehicle within a parking area.
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
void changeAdditionalID(const std::string &newID)
change ID of additional
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
AdditionalMove myMove
variable AdditionalMove
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
A point in 2D or 3D with translation and scaling methods.
PositionVector shape
The shape of the additional element.
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
void removeGLObjectFromGrid(GUIGlObject *o)
add GL Object into net
friend class GNEChange_Attribute
declare friend class
void selectAttributeCarrier(bool changeFlag=true)
block movement of a graphic element
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
const std::string getID() const
function to support debugging
double myWidth
width of Parking Space
RGBColor selectedAdditionalColor
bool myBlockMovement
boolean to check if additional element is blocked (i.e. cannot be moved with mouse) ...
Position getPositionInView() const
Returns position of additional in view.
double myAngle
Angle of Parking Space.
static void drawShapeDottedContour(const int type, const PositionVector &shape, const double width)
draw a dotted contour around the given Non closed shape with certain width
An Element which don't belongs to GNENet but has influency in the simulation.
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
AdditionalGeometry myGeometry
geometry to be precomputed in updateGeometry(...)
const std::string & getTagStr() const
get tag assigned to this object in string format
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
std::string getGenericParametersStr() const
return generic parameters in string format
GNENet * getNet() const
get the net object
GUIGlID getGlID() const
Returns the numerical id of the object.
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
parent of an additional element
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
bool drawForSelecting
whether drawing is performed for the purpose of selecting objects
std::string getParentName() const
Returns the name of the parent object (if any)
void addGLObjectIntoGrid(GUIGlObject *o)
add GL Object into net
GNEAdditional * myFirstAdditionalParent
pointer to first Additional parent
~GNEParkingSpace()
Destructor.
void draw(double size=0.5) const
draw lock icon
Position myPosition
position of Parking Space in view