![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEMoveElementJunction.h>
Public Member Functions | |
| GNEMoveOperation * | getMoveOperation () |
| get move operation | |
| GNEMoveElementJunction (GNEJunction *junction) | |
| constructor | |
| void | removeGeometryPoint (const Position clickedPosition, GNEUndoList *undoList) override |
| remove geometry point in the clicked position | |
| ~GNEMoveElementJunction () | |
functions related with moving attributes | |
| std::string | getMovingAttribute (SumoXMLAttr key) const override |
| get moving attribute | |
| double | getMovingAttributeDouble (SumoXMLAttr key) const override |
| get moving attribute double | |
| Position | getMovingAttributePosition (SumoXMLAttr key) const override |
| get moving attribute position | |
| 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) | |
| bool | isMovingAttributeValid (SumoXMLAttr key, const std::string &value) const override |
| check if the given moving attribute is valid | |
| void | setMovingAttribute (SumoXMLAttr key, const std::string &value) override |
| set moving attribute | |
Static Public Member Functions | |
| static void | commitMove (const GNEViewNet *viewNet, GNEMoveOperation *moveOperation, const GNEMoveOffset &offset, GNEUndoList *undoList) |
| commit move element for the given offset | |
| static void | moveElement (const GNEViewNet *viewNet, GNEMoveOperation *moveOperation, const GNEMoveOffset &offset) |
| move element the for given offset (note: offset can be X-Y-0, 0-0-Z or X-Y-Z) | |
Data Fields | |
| double | myMovingLateralOffset = 0 |
| move element lateral offset | |
Protected Member Functions | |
| GNEMoveOperation * | getEditShapeOperation (const GUIGlObject *obj, const PositionVector originalShape, const bool maintainShapeClosed) |
| calculate move shape operation | |
Protected Attributes | |
| GNEJunction * | myJunction = nullptr |
| pointer to junction | |
| GNEAttributeCarrier * | myMovedElement = nullptr |
| pointer to element | |
Private Member Functions | |
| void | commitMoveShape (const GNEMoveResult &moveResult, GNEUndoList *undoList) override |
| commit move shape | |
| GNEMoveElementJunction ()=delete | |
| invalidate default constructor | |
| GNEMoveElementJunction (const GNEMoveElementJunction &)=delete | |
| Invalidated copy constructor. | |
| GNEMoveElementJunction & | operator= (const GNEMoveElementJunction &)=delete |
| Invalidated assignment operator. | |
| void | setMoveShape (const GNEMoveResult &moveResult) override |
| set move shape | |
Static Private Member Functions | |
| static PositionVector | calculateExtrapolatedVector (const GNEMoveOperation *moveOperation, const GNEMoveResult &moveResult) |
| calculate width/height shape | |
| static double | calculateLaneOffset (const GNEViewNet *viewNet, const GNELane *lane, const double firstPosition, const double lastPosition, const GNEMoveOffset &offset) |
| calculate lane offset (used in calculateLanePosition) | |
| static void | calculateLanePosition (double &starPos, const GNEViewNet *viewNet, const GNELane *lane, const double posOverLane, const GNEMoveOffset &offset) |
| calculate lane position over one lane with only one position (accesss, E1, star/end positions, etc.) | |
| static void | calculateLanePositions (double &starPos, double &endPos, const GNEViewNet *viewNet, const GNELane *firstLane, const double firstPosOverLane, const GNELane *lastLane, const double lastPosOverLane, const bool firstLaneClicked, const GNEMoveOffset &offset) |
| calculate lane position over two lane with two positions (E2 Multilanes) | |
| static void | calculateLanePositions (double &starPos, double &endPos, const GNEViewNet *viewNet, const GNELane *lane, const double firstPosOverLane, const double lastPosOverLane, const GNEMoveOffset &offset) |
| calculate lane position over one lane with two positions (stoppingPlaces, E2 single lanes) | |
| static void | calculateNewLaneChange (const GNEViewNet *viewNet, const GNELane *originalLane, const GNELane *&newLane, double &laneOffset) |
| calculate new lane change | |
Definition at line 35 of file GNEMoveElementJunction.h.
| GNEMoveElementJunction::GNEMoveElementJunction | ( | GNEJunction * | junction | ) |
constructor
Definition at line 33 of file GNEMoveElementJunction.cpp.
| GNEMoveElementJunction::~GNEMoveElementJunction | ( | ) |
Definition at line 39 of file GNEMoveElementJunction.cpp.
|
privatedelete |
invalidate default constructor
|
privatedelete |
Invalidated copy constructor.
|
staticprivateinherited |
calculate width/height shape
Definition at line 419 of file GNEMoveElement.cpp.
References PositionVector::extrapolate2D(), GNEMoveOperation::firstGeometryPoint, PositionVector::length2D(), PositionVector::nearest_offset_to_point2D(), GNEMoveOperation::originalShape, PositionVector::reverse(), GNEMoveOperation::shapeToMove, and GNEMoveResult::shapeToUpdate.
Referenced by GNEMoveElement::commitMove(), and GNEMoveElement::moveElement().
|
staticprivateinherited |
calculate lane offset (used in calculateLanePosition)
Definition at line 279 of file GNEMoveElement.cpp.
References Position::add(), GNELane::getLaneShape(), PositionVector::length2D(), PositionVector::nearest_offset_to_point2D(), PositionVector::positionAtOffset2D(), GUISUMOAbstractView::snapToActiveGrid(), GNEMoveOffset::x, GNEMoveOffset::y, and GNEMoveOffset::z.
Referenced by GNEMoveElement::calculateLanePosition(), and GNEMoveElement::calculateLanePositions().
|
staticprivateinherited |
calculate lane position over one lane with only one position (accesss, E1, star/end positions, etc.)
Definition at line 322 of file GNEMoveElement.cpp.
References GNEMoveElement::calculateLaneOffset(), and GNELane::getLengthGeometryFactor().
Referenced by GNEMoveElement::calculateLanePositions(), GNEMoveElement::commitMove(), and GNEMoveElement::moveElement().
|
staticprivateinherited |
calculate lane position over two lane with two positions (E2 Multilanes)
Definition at line 343 of file GNEMoveElement.cpp.
References GNEMoveElement::calculateLanePosition(), GNELane::getLaneShape(), and PositionVector::length2D().
|
staticprivateinherited |
calculate lane position over one lane with two positions (stoppingPlaces, E2 single lanes)
Definition at line 332 of file GNEMoveElement.cpp.
References GNEMoveElement::calculateLaneOffset(), and GNELane::getLengthGeometryFactor().
Referenced by GNEMoveElement::commitMove(), and GNEMoveElement::moveElement().
|
staticprivateinherited |
calculate new lane change
Definition at line 387 of file GNEMoveElement.cpp.
References Position::distanceSquaredTo2D(), Position::distanceTo2D(), GNEHierarchicalElement::getChildLanes(), GNELane::getIndex(), GNELane::getLaneShape(), GNELane::getParentEdge(), GUISUMOAbstractView::getPositionInformation(), PositionVector::nearest_offset_to_point2D(), and PositionVector::positionAtOffset2D().
Referenced by GNEMoveElement::commitMove(), and GNEMoveElement::moveElement().
|
staticinherited |
commit move element for the given offset
Definition at line 180 of file GNEMoveElement.cpp.
References PositionVector::add(), GNEMoveOperation::allowChangeLane, GNEMoveElement::calculateExtrapolatedVector(), GNEMoveElement::calculateLanePosition(), GNEMoveElement::calculateLanePositions(), GNEMoveElement::calculateNewLaneChange(), GNEMoveOperation::clickedFirstLane, GNEMoveElement::commitMoveShape(), GNEMoveOperation::firstLane, GNEMoveResult::firstLaneOffset, GNEMoveOperation::firstPosition, GNEMoveOperation::geometryPointsToMove, GNEMoveResult::geometryPointsToMove, GNEMoveFrame::getCommonMoveOptions(), GNEMoveFrame::CommonMoveOptions::getMergeGeometryPoints(), GNEViewParent::getMoveFrame(), GNEViewNet::getViewParent(), GNEMoveOperation::HEIGHT, Position::INVALID, INVALID_DOUBLE, GNEMoveOperation::lastLane, GNEMoveOperation::lastPosition, GNEMoveOperation::LENGTH, GNEMoveOperation::moveElement, GNEMoveResult::newFirstLane, GNEMoveResult::newFirstPos, GNEMoveResult::newLastLane, GNEMoveResult::newLastPos, GNEMoveOperation::operationType, GNEMoveOperation::originalGeometryPoints, GNEMoveOperation::originalShape, PositionVector::removeDoublePoints(), GNEMoveElement::setMoveShape(), GNEMoveOperation::shapeToMove, GNEMoveResult::shapeToUpdate, GUISUMOAbstractView::snapToActiveGrid(), GNEMoveOperation::WIDTH, GNEMoveOffset::x, GNEMoveOffset::y, and GNEMoveOffset::z.
Referenced by GNEViewNetHelper::MoveMultipleElementModul::finishMoveSelection(), GNEViewNetHelper::MoveSingleElementModul::finishMoveSingleElement(), GNEViewNetHelper::MoveMultipleElementModul::moveSelection(), and GNEViewNetHelper::MoveSingleElementModul::moveSingleElement().
|
overrideprivatevirtual |
commit move shape
Implements GNEMoveElement.
Definition at line 148 of file GNEMoveElementJunction.cpp.
References PositionVector::added(), GNEUndoList::begin(), GNEUndoList::end(), NBNode::getCenter(), GNEJunction::getNBNode(), NBNode::getShape(), GNEAttributeCarrier::getTagStr(), NBNode::hasCustomShape(), GNENetworkElement::isShapeEdited(), myJunction, GNEJunction::setAttribute(), GNEMoveResult::shapeToUpdate, SUMO_ATTR_POSITION, SUMO_ATTR_SHAPE, TLF, and toString().
|
protectedinherited |
calculate move shape operation
Definition at line 70 of file GNEMoveElement.cpp.
References GUIViewObjectsHandler::getSelectedGeometryPoints(), GUIViewObjectsHandler::getSelectedPositionOverShape(), gViewObjectsHandler, PositionVector::indexOfClosest(), PositionVector::insertAtClosest(), and Position::INVALID.
Referenced by GNEMoveElementConnection::getMoveOperation(), GNEMoveElementCrossing::getMoveOperation(), GNEMoveElementEdge::getMoveOperation(), getMoveOperation(), GNEMoveElementLane::getMoveOperation(), and GNEMoveElementShape::getMoveOperation().
|
virtual |
get move operation
Implements GNEMoveElement.
Definition at line 43 of file GNEMoveElementJunction.cpp.
References GNEMoveElement::getEditShapeOperation(), GNEJunction::getNBNode(), NBNode::getPosition(), NBNode::getShape(), GNENetworkElement::isShapeEdited(), and myJunction.
|
overridevirtual |
get moving attribute
Implements GNEMoveElement.
Definition at line 56 of file GNEMoveElementJunction.cpp.
References GNEAttributeCarrier::getCommonAttribute(), and GNEMoveElement::myMovedElement.
|
overridevirtual |
get moving attribute double
Implements GNEMoveElement.
Definition at line 62 of file GNEMoveElementJunction.cpp.
References GNEAttributeCarrier::getCommonAttributeDouble(), and GNEMoveElement::myMovedElement.
|
overridevirtual |
get moving attribute position
Implements GNEMoveElement.
Definition at line 68 of file GNEMoveElementJunction.cpp.
References GNEAttributeCarrier::getCommonAttributePosition(), and GNEMoveElement::myMovedElement.
|
overridevirtual |
get moving attribute positionVector
Implements GNEMoveElement.
Definition at line 74 of file GNEMoveElementJunction.cpp.
References GNEAttributeCarrier::getCommonAttributePositionVector(), and GNEMoveElement::myMovedElement.
|
overridevirtual |
check if the given moving attribute is valid
Implements GNEMoveElement.
Definition at line 86 of file GNEMoveElementJunction.cpp.
References GNEAttributeCarrier::isCommonAttributeValid(), and GNEMoveElement::myMovedElement.
|
staticinherited |
move element the for given offset (note: offset can be X-Y-0, 0-0-Z or X-Y-Z)
Definition at line 99 of file GNEMoveElement.cpp.
References PositionVector::add(), GNEMoveOperation::allowChangeLane, GNEMoveElement::calculateExtrapolatedVector(), GNEMoveElement::calculateLanePosition(), GNEMoveElement::calculateLanePositions(), GNEMoveElement::calculateNewLaneChange(), GNEMoveOperation::clickedFirstLane, GNEMoveOperation::firstLane, GNEMoveResult::firstLaneOffset, GNEMoveOperation::firstPosition, GNEMoveOperation::geometryPointsToMove, GNEMoveResult::geometryPointsToMove, GNEMoveOperation::HEIGHT, Position::INVALID, INVALID_DOUBLE, GNEMoveOperation::lastLane, GNEMoveOperation::lastPosition, GNEMoveOperation::LENGTH, GNEMoveOperation::moveElement, GNEMoveResult::newFirstLane, GNEMoveResult::newFirstPos, GNEMoveResult::newLastPos, GNEMoveOperation::operationType, GNEMoveElement::setMoveShape(), GNEMoveOperation::shapeToMove, GNEMoveResult::shapeToUpdate, GUISUMOAbstractView::snapToActiveGrid(), GNEMoveOperation::WIDTH, GNEMoveOffset::x, GNEMoveOffset::y, and GNEMoveOffset::z.
Referenced by GNEViewNetHelper::MoveSingleElementModul::getMovedElement(), GNEViewNetHelper::MoveMultipleElementModul::moveSelection(), and GNEViewNetHelper::MoveSingleElementModul::moveSingleElement().
|
privatedelete |
Invalidated assignment operator.
|
overridevirtual |
remove geometry point in the clicked position
Implements GNEMoveElement.
Definition at line 98 of file GNEMoveElementJunction.cpp.
References GNEUndoList::begin(), GNEChange_Attribute::changeAttribute(), GNEUndoList::end(), GNEJunction::getNBNode(), GNEAttributeCarrier::getNet(), NBNode::getShape(), GNEAttributeCarrier::getTagStr(), GNENet::getViewNet(), GUISUMOAbstractView::getVisualisationSettings(), PositionVector::indexOfClosest(), GNENetworkElement::isShapeEdited(), GUIVisualizationNeteditSizeSettings::junctionGeometryPointRadius, myJunction, GUIVisualizationSettings::neteditSizeSettings, SUMO_ATTR_SHAPE, TLF, and toString().
|
overrideprivatevirtual |
set move shape
Implements GNEMoveElement.
Definition at line 124 of file GNEMoveElementJunction.cpp.
References GNEContour::clearContour(), GNENet::getAttributeCarriers(), NBNode::getEdges(), NBEdge::getID(), GNEViewParent::getMoveFrame(), GNEMoveFrame::NetworkMoveOptions::getMoveOnlyJunctionCenter(), GNEJunction::getNBNode(), GNEAttributeCarrier::getNet(), GNEMoveFrame::getNetworkMoveOptions(), NBNode::getPosition(), GNENet::getViewNet(), GNEViewNet::getViewParent(), GNENetworkElement::isShapeEdited(), GNEJunction::moveJunctionGeometry(), myJunction, GNENetworkElement::myNetworkElementContour, GNENetHelper::AttributeCarriers::retrieveEdge(), NBNode::setCustomShape(), GNEMoveResult::shapeToUpdate, and GNEJunction::updateGeometry().
|
overridevirtual |
set moving attribute
Implements GNEMoveElement.
Definition at line 92 of file GNEMoveElementJunction.cpp.
References GNEMoveElement::myMovedElement, and GNEAttributeCarrier::setCommonAttribute().
|
overridevirtual |
set moving attribute (using undo-list)
Implements GNEMoveElement.
Definition at line 80 of file GNEMoveElementJunction.cpp.
References GNEMoveElement::myMovedElement, and GNEAttributeCarrier::setCommonAttribute().
|
protected |
pointer to junction
Definition at line 80 of file GNEMoveElementJunction.h.
Referenced by commitMoveShape(), getMoveOperation(), removeGeometryPoint(), and setMoveShape().
|
protectedinherited |
pointer to element
Definition at line 96 of file GNEMoveElement.h.
Referenced by GNEMoveElementLaneDouble::commitMoveShape(), GNEMoveElementLaneSingle::commitMoveShape(), GNEMoveElementShape::commitMoveShape(), GNEMoveElementView::commitMoveShape(), GNEMoveElementViewResizable::commitMoveShape(), GNEMoveElementLaneDouble::fixMovingProblem(), GNEMoveElementLaneSingle::fixMovingProblem(), GNEMoveElementLaneSingle::getFixedPositionOverLane(), GNEMoveElementLaneDouble::getMoveOperation(), GNEMoveElementLaneSingle::getMoveOperation(), GNEMoveElementShape::getMoveOperation(), GNEMoveElementViewResizable::getMoveOperation(), GNEMoveElement::getMovingAttribute(), GNEMoveElementConnection::getMovingAttribute(), GNEMoveElementCrossing::getMovingAttribute(), GNEMoveElementEdge::getMovingAttribute(), getMovingAttribute(), GNEMoveElementLane::getMovingAttribute(), GNEMoveElementLaneDouble::getMovingAttribute(), GNEMoveElementLaneSingle::getMovingAttribute(), GNEMoveElementPlan::getMovingAttribute(), GNEMoveElementPlanParent::getMovingAttribute(), GNEMoveElementShape::getMovingAttribute(), GNEMoveElementVehicle::getMovingAttribute(), GNEMoveElementView::getMovingAttribute(), GNEMoveElement::getMovingAttributeDouble(), GNEMoveElementConnection::getMovingAttributeDouble(), GNEMoveElementCrossing::getMovingAttributeDouble(), GNEMoveElementEdge::getMovingAttributeDouble(), getMovingAttributeDouble(), GNEMoveElementLane::getMovingAttributeDouble(), GNEMoveElementLaneDouble::getMovingAttributeDouble(), GNEMoveElementLaneSingle::getMovingAttributeDouble(), GNEMoveElementPlan::getMovingAttributeDouble(), GNEMoveElementPlanParent::getMovingAttributeDouble(), GNEMoveElementShape::getMovingAttributeDouble(), GNEMoveElementVehicle::getMovingAttributeDouble(), GNEMoveElementView::getMovingAttributeDouble(), GNEMoveElementConnection::getMovingAttributePosition(), GNEMoveElementCrossing::getMovingAttributePosition(), GNEMoveElementEdge::getMovingAttributePosition(), getMovingAttributePosition(), GNEMoveElementLane::getMovingAttributePosition(), GNEMoveElementLaneDouble::getMovingAttributePosition(), GNEMoveElementLaneSingle::getMovingAttributePosition(), GNEMoveElementPlan::getMovingAttributePosition(), GNEMoveElementPlanParent::getMovingAttributePosition(), GNEMoveElementShape::getMovingAttributePosition(), GNEMoveElementVehicle::getMovingAttributePosition(), GNEMoveElementView::getMovingAttributePosition(), GNEMoveElementConnection::getMovingAttributePositionVector(), GNEMoveElementCrossing::getMovingAttributePositionVector(), GNEMoveElementEdge::getMovingAttributePositionVector(), getMovingAttributePositionVector(), GNEMoveElementLane::getMovingAttributePositionVector(), GNEMoveElementLaneDouble::getMovingAttributePositionVector(), GNEMoveElementLaneSingle::getMovingAttributePositionVector(), GNEMoveElementPlan::getMovingAttributePositionVector(), GNEMoveElementPlanParent::getMovingAttributePositionVector(), GNEMoveElementShape::getMovingAttributePositionVector(), GNEMoveElementVehicle::getMovingAttributePositionVector(), GNEMoveElementView::getMovingAttributePositionVector(), GNEMoveElementLaneDouble::getMovingProblem(), GNEMoveElementLaneSingle::getMovingProblem(), GNEMoveElementLaneDouble::isMoveElementValid(), GNEMoveElementLaneSingle::isMoveElementValid(), GNEMoveElement::isMovingAttributeValid(), GNEMoveElementConnection::isMovingAttributeValid(), GNEMoveElementCrossing::isMovingAttributeValid(), GNEMoveElementEdge::isMovingAttributeValid(), isMovingAttributeValid(), GNEMoveElementLane::isMovingAttributeValid(), GNEMoveElementLaneDouble::isMovingAttributeValid(), GNEMoveElementLaneSingle::isMovingAttributeValid(), GNEMoveElementPlan::isMovingAttributeValid(), GNEMoveElementPlanParent::isMovingAttributeValid(), GNEMoveElementShape::isMovingAttributeValid(), GNEMoveElementVehicle::isMovingAttributeValid(), GNEMoveElementView::isMovingAttributeValid(), GNEMoveElementShape::removeGeometryPoint(), GNEMoveElementLaneDouble::setMoveShape(), GNEMoveElementLaneSingle::setMoveShape(), GNEMoveElementShape::setMoveShape(), GNEMoveElementView::setMoveShape(), GNEMoveElementConnection::setMovingAttribute(), GNEMoveElementCrossing::setMovingAttribute(), GNEMoveElementEdge::setMovingAttribute(), setMovingAttribute(), GNEMoveElementLane::setMovingAttribute(), GNEMoveElementLaneDouble::setMovingAttribute(), GNEMoveElementLaneSingle::setMovingAttribute(), GNEMoveElementPlan::setMovingAttribute(), GNEMoveElementPlanParent::setMovingAttribute(), GNEMoveElementShape::setMovingAttribute(), GNEMoveElementVehicle::setMovingAttribute(), GNEMoveElementView::setMovingAttribute(), GNEMoveElement::setMovingAttribute(), GNEMoveElementConnection::setMovingAttribute(), GNEMoveElementCrossing::setMovingAttribute(), GNEMoveElementEdge::setMovingAttribute(), setMovingAttribute(), GNEMoveElementLane::setMovingAttribute(), GNEMoveElementLaneDouble::setMovingAttribute(), GNEMoveElementLaneSingle::setMovingAttribute(), GNEMoveElementPlan::setMovingAttribute(), GNEMoveElementPlanParent::setMovingAttribute(), GNEMoveElementShape::setMovingAttribute(), GNEMoveElementVehicle::setMovingAttribute(), GNEMoveElementView::setMovingAttribute(), GNEMoveElement::setMovingAttribute(), GNEMoveElementLaneDouble::setSize(), GNEMoveElementLaneSingle::writeMoveAttributes(), GNEMoveElementView::writeMoveAttributes(), and GNEMoveElementLaneDouble::writeMoveAttributes().
|
inherited |
move element lateral offset
Definition at line 92 of file GNEMoveElement.h.
Referenced by GNEMoveElementLaneSingle::commitMoveShape(), GNEMoveElementVehicle::commitMoveShape(), GNEMoveElementLaneDouble::setMoveShape(), GNEMoveElementLaneSingle::setMoveShape(), GNEMoveElementVehicle::setMoveShape(), GNEStoppingPlace::setStoppingPlaceGeometry(), GNEAccess::updateGeometry(), GNEEntryExitDetector::updateGeometry(), GNEInductionLoopDetector::updateGeometry(), GNEInstantInductionLoopDetector::updateGeometry(), GNELaneAreaDetector::updateGeometry(), and GNEStop::updateGeometry().