105 if (shape.size() > 2) {
109 const double snap_radius =
myJunction->getNet()->getViewNet()->getVisualisationSettings().neteditSizeSettings.junctionGeometryPointRadius;
111 if ((index != -1) && shape[index].distanceSquaredTo2D(clickedPosition) < (snap_radius * snap_radius)) {
113 shape.erase(shape.begin() + index);
127 myJunction->myNetworkElementContour.clearContour();
138 const bool onlyMoveCenter =
myJunction->getNet()->getViewNet()->getViewParent()->getMoveFrame()->getNetworkMoveOptions()->getMoveOnlyJunctionCenter();
158 }
else if (
myJunction->getNBNode()->hasCustomShape()) {
164 const auto customShapeMoved =
myJunction->getNBNode()->getShape().added(customShapeOffset);
const std::string invalid_return< std::string >::value
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_SHAPE
edge: the shape in xml-definition
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void changeAttribute(GNEAttributeCarrier *AC, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList, const bool force=false)
change attribute
GNEAttributeCarrier * myMovedElement
pointer to element
GNEMoveElement(GNEAttributeCarrier *movedElement)
constructor
GNEMoveOperation * getEditShapeOperation(const GUIGlObject *obj, const PositionVector originalShape, const bool maintainShapeClosed)
calculate move shape operation
~GNEMoveElementJunction()
GNEJunction * myJunction
pointer to junction
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList) override
commit move shape
GNEMoveElementJunction()=delete
invalidate default constructor
std::string getMovingAttribute(SumoXMLAttr key) const override
get moving attribute
void removeGeometryPoint(const Position clickedPosition, GNEUndoList *undoList) override
remove geometry point in the clicked position
PositionVector getMovingAttributePositionVector(SumoXMLAttr key) const override
get moving attribute positionVector
void setMoveShape(const GNEMoveResult &moveResult) override
set move shape
double getMovingAttributeDouble(SumoXMLAttr key) const override
get moving attribute double
bool isMovingAttributeValid(SumoXMLAttr key, const std::string &value) const override
check if the given moving attribute is valid
GNEMoveOperation * getMoveOperation() override
get move operation
void setMovingAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
set moving attribute (using undo-list)
Position getMovingAttributePosition(SumoXMLAttr key) const override
get moving attribute position
PositionVector shapeToUpdate
shape to update (edited in moveElement)
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...
The representation of a single edge during network building.
const std::string & getID() const
A point in 2D or 3D with translation and scaling methods.
int indexOfClosest(const Position &p, bool twoD=false) const