44 if (
myLane->isShapeEdited()) {
98 if (
myLane->isShapeEdited()) {
102 if (shape.size() > 2) {
106 const double snap_radius =
myLane->getNet()->getViewNet()->getVisualisationSettings().neteditSizeSettings.laneGeometryPointRadius;
108 if ((index != -1) && shape[index].distanceSquaredTo2D(clickedPosition) < (snap_radius * snap_radius)) {
110 shape.erase(shape.begin() + index);
const std::string invalid_return< std::string >::value
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_CUSTOMSHAPE
whether a given shape is user-defined
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
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
double getMovingAttributeDouble(SumoXMLAttr key) const override
get moving attribute double
Position getMovingAttributePosition(SumoXMLAttr key) const override
get moving attribute position
bool isMovingAttributeValid(SumoXMLAttr key, const std::string &value) const override
check if the given moving attribute is valid
GNEMoveElementLane()=delete
invalidate default constructor
GNELane * myLane
pointer to lane
void setMoveShape(const GNEMoveResult &moveResult) override
set move shape
GNEMoveOperation * getMoveOperation() override
get move operation
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList) override
commit move shape
PositionVector getMovingAttributePositionVector(SumoXMLAttr key) const override
get moving attribute positionVector
void setMovingAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
set moving attribute (using undo-list)
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...
A point in 2D or 3D with translation and scaling methods.
int indexOfClosest(const Position &p, bool twoD=false) const