40 bool friendlyPosition,
int roadSideCapacity,
bool onRoad,
double width,
const std::string& length,
double angle,
bool blockMovement) :
41 GNEStoppingPlace(id, viewNet,
GLO_PARKING_AREA,
SUMO_TAG_PARKING_AREA, lane, startPos, endPos, name, friendlyPosition, blockMovement),
42 myRoadSideCapacity(roadSideCapacity),
117 glScaled(exaggeration, exaggeration, 1);
125 }
else if (s.
scale * exaggeration >= 10) {
131 glScaled(exaggeration, exaggeration, 1);
141 glTranslated(0, 0, .1);
151 if (s.
scale * exaggeration >= 4.5) {
267 if (canParse<double>(value)) {
270 return (parse<double>(value) < parse<double>(
myEndPosition));
282 if (canParse<double>(value)) {
296 return canParse<bool>(value);
298 return canParse<double>(value) && (parse<double>(value) >= 0);
300 return canParse<bool>(value);
302 return canParse<double>(value) && (parse<double>(value) >= 0);
307 return canParse<double>(value) && (parse<double>(value) >= 0);
310 return canParse<double>(value);
312 return canParse<bool>(value);
314 return canParse<bool>(value);
354 myWidth = parse<double>(value);
360 myAngle = parse<double>(value);
366 if (parse<bool>(value)) {
double myAngle
Angle of Parking Area.
double scale
information about a lane's width (temporary, used for a single view)
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name) ...
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.
GUIVisualizationTextSettings addName
std::vector< double > shapeRotations
The rotations of the single shape parts.
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
const std::string & getAdditionalID() const
returns Additional ID
~GNEParkingArea()
Destructor.
Stores the information about how to visualize structures.
static const double myCircleWidthSquared
squared circle width resolution for all stopping places
double y() const
Returns the y-position.
static const double myCircleInWidth
inner circle width resolution for all stopping places
double x() const
Returns the x-position.
std::string getAttribute(SumoXMLAttr key) const
static void drawText(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &col=RGBColor::BLACK, const double angle=0, int align=0, double width=-1)
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
Position position
position of the block icon
BlockIcon myBlockIcon
variable BlockIcon
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
bool myFriendlyPosition
Flag for friendly position.
std::string myStartPosition
The relative start position this stopping place is located at (optional, if empty takes 0) ...
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
static const double myCircleInText
text inner circle width resolution for all stopping places
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
A parking space for a single vehicle within a parking area.
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
void changeAdditionalID(const std::string &newID)
change ID of additional
Position getLineCenter() const
get line center
static OptionsCont & getOptions()
Retrieves the options.
double rotation
The rotation of the block icon.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
int myRoadSideCapacity
roadside capacity of Parking Area
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
GUIVisualizationSizeSettings addSize
int getIndex() const
returns the index of the lane
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
GNEEdge & getParentEdge()
Returns underlying parent edge.
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
A point in 2D or 3D with translation and scaling methods.
PositionVector shape
The shape of the additional element.
double scaledSize(double scale, double constFactor=0.1) const
std::string myAdditionalName
name of additional
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
GNELane * myLane
The lane in which this lane is placed.
friend class GNEChange_Attribute
declare friend class
void selectAttributeCarrier(bool changeFlag=true)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
block movement of a graphic element
RGBColor selectionColor
NETEDIT special colors.
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
const std::string getID() const
function to support debugging
static const RGBColor SUMO_color_busStop
color for busStops
void move2side(double amount)
move position vector to side using certain ammount
RGBColor selectedAdditionalColor
bool myBlockMovement
boolean to check if additional element is blocked (i.e. cannot be moved with mouse) ...
std::vector< GNEAdditional * > myAdditionalChilds
vector with the Additional childs
static const double myCircleWidth
circle width resolution for all stopping places
std::vector< double > shapeLengths
The lengths of the single shape parts.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
std::string myLength
Lenght of Parking Area (by default (endPos - startPos) / roadsideCapacity.
double getLaneWidth() const
Returns the default width of lanes of this edge.
void setStoppingPlaceGeometry(double movingToSide)
set geometry common to all stopping places
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
void updateGeometry(bool updateGrid)
update pre-computed geometry information
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
GUIVisualizationTextSettings addFullName
AdditionalGeometry myGeometry
geometry to be precomputed in updateGeometry(...)
const std::string & getTagStr() const
get tag assigned to this object in string format
static int getCircleResolution(const GUIVisualizationSettings &settings)
function to calculate circle resolution for all circles drawn in drawGL(...) functions ...
std::string getGenericParametersStr() const
return generic parameters in string format
double distanceSquaredTo2D(const Position &p2) const
returns the square of the distance to another position (Only using x and y positions) ...
GNENet * getNet() const
get the net object
std::string generateAdditionalChildID(SumoXMLTag childTag)
gererate a new ID for an additional child
GUIGlID getGlID() const
Returns the numerical id of the object.
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
std::string myEndPosition
The position this stopping place is located at (optional, if empty takes the lane lenght) ...
Position mySignPos
The position of the sign.
NBEdge * getNBEdge()
returns the internal NBEdge
double myWidth
width of Parking Area
bool drawForSelecting
whether drawing is performed for the purpose of selecting objects
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
bool myOnRoad
Whether vehicles stay on the road.
void addGLObjectIntoGrid(GUIGlObject *o)
add GL Object into net
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
GNELane * changeLane(GNELane *oldLane, const std::string &newLaneID)
change lane of additional
void setRotation(GNELane *additionalLane=nullptr)
set Rotation of block Icon (must be called in updateGeometry(bool updateGrid) function) ...
void draw(double size=0.5) const
draw lock icon
GNEParkingArea(const std::string &id, GNELane *lane, GNEViewNet *viewNet, const std::string &startPos, const std::string &endPos, const std::string &name, bool friendlyPosition, int roadSideCapacity, bool onRoad, double width, const std::string &length, double angle, bool blockMovement)
Constructor.