43 myParentJunction(parentJunction),
44myTesselation(ID,
"",
RGBColor::GREY, parentJunction->getNBNode()->getWalkingArea(ID).shape,
false,
true, 0) {
46 updateCenteringBoundary(
false);
222 mcCustomShape->disable();
225 mcCustomShape->disable();
254 return toString(walkingArea.length);
312 return canParse<double>(value) && (parse<double>(value) > 0);
314 if (canParse<PositionVector>(value)) {
315 return parse<PositionVector>(value).size() > 0;
372 if (!modes.isCurrentSupermodeNetwork()) {
413 walkingArea.width = parse<double>(value);
416 walkingArea.length = parse<double>(value);
419 walkingArea.shape = parse<PositionVector>(value);
420 walkingArea.hasCustomShape =
true;
NetworkEditMode
@brie enum for network edit modes
@ NETWORK_DELETE
mode for deleting network elements
@ NETWORK_MOVE
mode for moving network elements
@ NETWORK_CREATE_EDGE
mode for creating new edges
@ NETWORK_TLS
mode for editing tls
@ NETWORK_SELECT
mode for selecting network elements
@ NETWORK_CONNECT
mode for connecting lanes
@ MID_GNE_WALKINGAREA_EDIT_SHAPE
edit crossing shape
@ GLO_WALKINGAREA
a walkingArea
GUIIcon
An enumeration of icons used by the gui applications.
@ SUMO_TAG_WALKINGAREA
walking area for pedestrians
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_SELECTED
element is selected
@ SUMO_ATTR_SHAPE
edge: the shape in xml-definition
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A class that stores a 2D geometrical boundary.
static void drawFilledPoly(const PositionVector &v, bool close)
Draws a filled polygon described by the list of points.
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void popMatrix()
pop matrix
static RGBColor getColor()
gets the gl-color
static void pushMatrix()
push matrix
const std::string getID() const
get ID (all Attribute Carriers have one)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
bool mySelected
boolean to check if this AC is selected (more quickly as checking GUIGlObjectStorage)
void setCommonAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
const std::string & getTagStr() const
get tag assigned to this object in string format
bool isCommonValid(SumoXMLAttr key, const std::string &value)
void drawInLayer(const double typeOrLayer, const double extraOffset=0) const
draw element in the given layer, or in front if corresponding flag is enabled
static const Parameterised::Map PARAMETERS_EMPTY
empty parameter maps (used by ACs without parameters)
GNENet * myNet
pointer to net
std::string getCommonAttribute(SumoXMLAttr key) const
static void changeAttribute(GNEAttributeCarrier *AC, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList, const bool force=false)
change attribute
bool drawDottedContour(const GUIVisualizationSettings &s, GUIDottedGeometry::DottedContourType type, const double lineWidth, const bool addOffset) const
draw dotted contour (call out of this class only in special cases, for example in WalkingAreas)
void calculateContourClosedShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double scale, const GUIGlObject *boundaryParent, const bool addToSelectedObjects=true) const
calculate contours
void drawInnenContourClosed(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const PositionVector &shape, const double scale, const double lineWidth) const
draw innen contour (currently used only in walkingAreas)
Boundary getContourBoundary() const
get contour boundary
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...)
Position getPositionInView() const
Returns position of hierarchical element in view.
NBNode * getNBNode() const
Return net build node.
GNEMoveOperation * calculateMoveShapeOperation(const GUIGlObject *obj, const PositionVector originalShape, const bool maintainShapeClosed)
calculate move shape operation
PositionVector shapeToUpdate
shape to update (edited in moveElement)
GNEViewNet * getViewNet() const
get view net
GNEContour myNetworkElementContour
network element contour
bool myShapeEdited
flag to check if element shape is being edited
bool isShapeEdited() const
check if shape is being edited
void end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
void begin(GUIIcon icon, const std::string &description)
Begin undo command sub-group with current supermode. This begins a new group of commands that are tre...
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
const GNEViewNetHelper::EditNetworkElementShapes & getEditNetworkElementShapes() const
get Edit Shape module
const GNEViewNetHelper::NetworkViewOptions & getNetworkViewOptions() const
get network view options
bool checkOverLockedElement(const GUIGlObject *GLObject, const bool isSelected) const
check if given element is locked (used for drawing select and delete contour)
void buildSelectionACPopupEntry(GUIGLObjectPopupMenu *ret, GNEAttributeCarrier *AC)
Builds an entry which allows to (de)select the object.
~GNEWalkingArea()
Destructor.
bool checkDrawMoveContour() const
check if draw move contour (red)
GNEMoveOperation * getMoveOperation()
get move operation
std::string getAttribute(SumoXMLAttr key) const
void drawWalkingArea(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const PositionVector &shape, const double exaggeration) const
draw walking area
bool checkDrawToContour() const
check if draw from contour (magenta)
GNEContour myInnenContour
variable used for draw innen contour
bool checkDrawOverContour() const
check if draw over contour (orange)
void removeGeometryPoint(const Position clickedPosition, GNEUndoList *undoList)
remove geometry point in the clicked position
bool checkDrawRelatedContour() const
check if draw related contour (cyan)
void setMoveShape(const GNEMoveResult &moveResult)
set move shape
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList)
commit move shape
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
bool checkDrawSelectContour() const
check if draw select contour (blue)
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
double myExaggeration
exaggeration used in tesselation
bool checkDrawFromContour() const
check if draw from contour (green)
Position getPositionInView() const
Returns position of hierarchical element in view.
PositionVector getAttributePositionVector(SumoXMLAttr key) const
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
NBNode::WalkingArea & getNBWalkingArea() const
get referente to NBode::WalkingArea
void deleteGLObject()
delete element
bool isValid(SumoXMLAttr key, const std::string &value)
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
bool checkDrawDeleteContour() const
check if draw delete contour (pink/white)
bool drawInContourMode() const
check if draw walking area in contour mode
GNEJunction * myParentJunction
the parent junction of this crossing
TesselatedPolygon myTesselation
An object that stores the shape and its tesselation.
GNEWalkingArea(GNEJunction *parentJunction, const std::string &ID)
Constructor.
void updateGLObject()
update GLObject (geometry, ID, etc.)
void drawTesselatedWalkingArea(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d) const
draw tesselated walking area
void updateGeometry()
update pre-computed geometry information
GNEJunction * getParentJunction() const
get parent Junction
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
bool isAttributeEnabled(SumoXMLAttr key) const
const Parameterised::Map & getACParametersMap() const
get parameters map
static FXMenuCommand * buildFXMenuCommand(FXComposite *p, const std::string &text, FXIcon *icon, FXObject *tgt, FXSelector sel, const bool disable=false)
build menu command
static void drawGeometryPoints(const GUIVisualizationSettings::Detail d, const PositionVector &shape, const RGBColor &color, const double radius, const double exaggeration, const bool editingElevation)
draw geometry points
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
virtual double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, const GUIMainWindow &app) const
Builds an entry which allows to copy the cursor position if geo projection is used,...
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0, bool forceShow=false) const
draw name of item
T getColor(const double value) const
Stores the information about how to visualize structures.
Detail getDetailLevel(const double exaggeration) const
return the detail level
GUIVisualizationTextSettings cwaEdgeName
bool drawMovingGeometryPoint(const double exaggeration, const double radius) const
check if moving geometry point can be draw
GUIVisualizationColorSettings colorSettings
color settings
GUIVisualizationDottedContourSettings dottedContourSettings
dotted contour settings
double scale
information about a lane's width (temporary, used for a single view)
bool drawForViewObjectsHandler
whether drawing is performed for the purpose of selecting objects in view using ViewObjectsHandler
GUIVisualizationTextSettings edgeName
Setting bundles for optional drawing names with size and color.
bool drawCrossingsAndWalkingareas
whether crosings and walkingareas shall be drawn
GUIColorer junctionColorer
The junction colorer.
GUIVisualizationNeteditSizeSettings neteditSizeSettings
netedit size settings
const PositionVector & getShape() const
retrieve the junction shape
WalkingArea & getWalkingArea(const std::string &id)
return the walkingArea with the given ID
std::map< std::string, std::string > Map
parameters map
A point in 2D or 3D with translation and scaling methods.
void closePolygon()
ensures that the last position equals the first
void scaleRelative(double factor)
enlarges/shrinks the polygon by a factor based at the centroid
double area() const
Returns the area (0 for non-closed)
static const RGBColor BLUE
static const RGBColor GREY
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
const PositionVector & getShape() const
Returns the shape of the polygon.
virtual void setShape(const PositionVector &shape)
Sets the shape of the polygon.
PositionVector & getShapeRef()
Return the exterior shape of the polygon.
std::vector< GLPrimitive > myTesselation
id of the display list for the cached tesselation
void drawTesselation(const PositionVector &shape) const
perform the tesselation / drawing
NetworkEditMode networkEditMode
the current Network edit mode
bool isCurrentSupermodeNetwork() const
@check if current supermode is Network
GNENetworkElement * getEditedNetworkElement() const
pointer to edited network element
bool editingElevation() const
check if we're editing elevation
static const RGBColor editShapeColor
color for edited shapes (Junctions, crossings and connections)
static const double segmentWidth
width of dotted contour segments
static const double crossingGeometryPointRadius
moving crossing geometry point radius
static const double junctionGeometryPointRadius
moving junction geometry point radius
bool show(const GUIGlObject *o) const
whether to show the text
A definition of a pedestrian walking area.
PositionVector shape
The polygonal shape.