![]() |
Eclipse SUMO - Simulation of Urban MObility
|
struct used to group all variables related with movement of single elements More...
#include <GNEViewNetHelper.h>
Public Member Functions | |
bool | beginMoveSingleElementDemandMode () |
begin move single element in Demand mode More... | |
bool | beginMoveSingleElementNetworkMode () |
begin move single element in Network mode More... | |
void | finishMoveSingleElement () |
finish moving single elements in Network AND Demand mode More... | |
void | moveSingleElement () |
move single element in Network AND Demand mode More... | |
MoveSingleElementValues (GNEViewNet *viewNet) | |
constructor More... | |
Data Fields | |
int | movingIndexShape |
index moved More... | |
Position | originalPositionInView |
original position of geometry position (needed for commmit position changes) More... | |
PositionVector | originalShapeBeforeMoving |
original shape of element before start moving (used by polygons, edges, etc., needed for commmit position changes) More... | |
Private Member Functions | |
bool | calculateEdgeValues () |
calculate Edge movement values (Position, Index, etc.) More... | |
bool | calculatePolyValues () |
calculate Poly movement values (Position, Index, etc.) More... | |
bool | calculateTAZValues () |
calculate TAZ movement values (Position, Index, etc.) More... | |
Private Attributes | |
GNEAdditional * | myAdditionalToMove |
the additional element which position is being moved More... | |
GNEDemandElement * | myDemandElementToMove |
the demand element which position is being moved More... | |
GNEEdge * | myEdgeToMove |
the edge of which geometry is being moved More... | |
GNEJunction * | myJunctionToMove |
the Junction to be moved. More... | |
bool | myMovingEndPos |
bool to indicate that end pos of an edge is being moved More... | |
bool | myMovingStartPos |
bool to indicate that startPos of an edge is being moved More... | |
GNEPOI * | myPOIToMove |
the poi which position is being moved More... | |
GNEPoly * | myPolyToMove |
the poly of which geometry is being moved More... | |
Position | myRelativeClickedPosition |
relative position of Clicked Position regarding to originalGeometryPointPosition (Used when user doesn't click exactly over the center of element) More... | |
GNETAZ * | myTAZToMove |
the TAZ element which their Shape is being moved (it's the only additional with a shape instead a position) More... | |
GNEViewNet * | myViewNet |
pointer to viewNet More... | |
struct used to group all variables related with movement of single elements
Definition at line 493 of file GNEViewNetHelper.h.
GNEViewNetHelper::MoveSingleElementValues::MoveSingleElementValues | ( | GNEViewNet * | viewNet | ) |
constructor
Definition at line 409 of file GNEViewNetHelper.cpp.
bool GNEViewNetHelper::MoveSingleElementValues::beginMoveSingleElementDemandMode | ( | ) |
begin move single element in Demand mode
Definition at line 471 of file GNEViewNetHelper.cpp.
References GNEViewNetHelper::ObjectsUnderCursor::getDemandElementFront(), GUISUMOAbstractView::getPositionInformation(), GNEDemandElement::getPositionInView(), myDemandElementToMove, GNEViewNet::myObjectsUnderCursor, myRelativeClickedPosition, myViewNet, originalPositionInView, and GNEDemandElement::startGeometryMoving().
Referenced by GNEViewNet::processLeftButtonPressDemand().
bool GNEViewNetHelper::MoveSingleElementValues::beginMoveSingleElementNetworkMode | ( | ) |
begin move single element in Network mode
Definition at line 425 of file GNEViewNetHelper.cpp.
References calculateEdgeValues(), calculatePolyValues(), calculateTAZValues(), GNEViewNetHelper::ObjectsUnderCursor::getAdditionalFront(), GNEViewNetHelper::ObjectsUnderCursor::getEdgeFront(), GNEViewNetHelper::ObjectsUnderCursor::getJunctionFront(), GNEViewNetHelper::ObjectsUnderCursor::getLaneFront(), GNEViewNetHelper::ObjectsUnderCursor::getPOIFront(), GNEViewNetHelper::ObjectsUnderCursor::getPolyFront(), GUISUMOAbstractView::getPositionInformation(), GNEJunction::getPositionInView(), GNEPOI::getPositionInView(), GNEAdditional::getPositionInView(), GNEViewNetHelper::ObjectsUnderCursor::getTAZFront(), myAdditionalToMove, myJunctionToMove, GNEViewNet::myObjectsUnderCursor, myPOIToMove, myRelativeClickedPosition, myViewNet, originalPositionInView, GNEJunction::startGeometryMoving(), and GNEAdditional::startGeometryMoving().
Referenced by GNEViewNet::processLeftButtonPressNetwork().
|
private |
calculate Edge movement values (Position, Index, etc.)
Definition at line 654 of file GNEViewNetHelper.cpp.
References GNEEdge::clickedOverShapeEnd(), GNEEdge::clickedOverShapeStart(), GNEEdge::editEndpoint(), GNEViewNetHelper::ObjectsUnderCursor::getEdgeFront(), NBEdge::getGeometry(), NBEdge::getInnerGeometry(), GNEEdge::getNBEdge(), GUISUMOAbstractView::getPositionInformation(), GNEEdge::getVertexIndex(), GNEViewNetHelper::NetworkViewOptions::menuCheckMoveElevation, movingIndexShape, myEdgeToMove, GNEViewNet::myKeyPressed, GNEViewNet::myMoveSingleElementValues, myMovingEndPos, myMovingStartPos, GNEViewNet::myNetworkViewOptions, GNEViewNet::myObjectsUnderCursor, GNEViewNet::myUndoList, myViewNet, originalPositionInView, originalShapeBeforeMoving, GNEViewNetHelper::KeyPressed::shiftKeyPressed(), and GNEEdge::startGeometryMoving().
Referenced by beginMoveSingleElementNetworkMode().
|
private |
calculate Poly movement values (Position, Index, etc.)
Definition at line 593 of file GNEViewNetHelper.cpp.
References GNEPoly::deleteGeometryPoint(), GNEViewNetHelper::ObjectsUnderCursor::getPolyFront(), GUISUMOAbstractView::getPositionInformation(), SUMOPolygon::getShape(), GNEPoly::getVertexIndex(), GNEShape::isMovementBlocked(), GNEPoly::isPolygonBlocked(), GNEViewNetHelper::NetworkViewOptions::menuCheckMoveElevation, movingIndexShape, GNEViewNet::myKeyPressed, GNEViewNet::myMoveSingleElementValues, GNEViewNet::myNetworkViewOptions, GNEViewNet::myObjectsUnderCursor, myPolyToMove, myViewNet, originalPositionInView, originalShapeBeforeMoving, and GNEViewNetHelper::KeyPressed::shiftKeyPressed().
Referenced by beginMoveSingleElementNetworkMode().
|
private |
calculate TAZ movement values (Position, Index, etc.)
Definition at line 725 of file GNEViewNetHelper.cpp.
References GNETAZ::deleteGeometryPoint(), GUISUMOAbstractView::getPositionInformation(), GNEAdditional::getShape(), GNEViewNetHelper::ObjectsUnderCursor::getTAZFront(), GNETAZ::getVertexIndex(), GNEAdditional::isAdditionalBlocked(), GNETAZ::isShapeBlocked(), movingIndexShape, GNEViewNet::myKeyPressed, GNEViewNet::myMoveSingleElementValues, GNEViewNet::myObjectsUnderCursor, myTAZToMove, myViewNet, originalPositionInView, originalShapeBeforeMoving, and GNEViewNetHelper::KeyPressed::shiftKeyPressed().
Referenced by beginMoveSingleElementNetworkMode().
void GNEViewNetHelper::MoveSingleElementValues::finishMoveSingleElement | ( | ) |
finish moving single elements in Network AND Demand mode
Definition at line 552 of file GNEViewNetHelper.cpp.
References GNEPOI::commitGeometryMoving(), GNEJunction::commitGeometryMoving(), GNEAdditional::commitGeometryMoving(), GNEDemandElement::commitGeometryMoving(), GNETAZ::commitShapeChange(), GNEPoly::commitShapeChange(), GNEEdge::commitShapeChange(), GNEEdge::commitShapeEndChange(), GNEEdge::commitShapeStartChange(), GNEAdditional::endGeometryMoving(), GNEDemandElement::endGeometryMoving(), GNEViewNet::getUndoList(), GNEViewNet::mergeJunctions(), myAdditionalToMove, myDemandElementToMove, myEdgeToMove, myJunctionToMove, myMovingEndPos, myMovingStartPos, myPOIToMove, myPolyToMove, myTAZToMove, myViewNet, originalPositionInView, and originalShapeBeforeMoving.
Referenced by GNEViewNet::processLeftButtonReleaseDemand(), and GNEViewNet::processLeftButtonReleaseNetwork().
void GNEViewNetHelper::MoveSingleElementValues::moveSingleElement | ( | ) |
move single element in Network AND Demand mode
move TAZ's geometry without commiting changes depending if polygon is blocked
Definition at line 492 of file GNEViewNetHelper.cpp.
References GUISUMOAbstractView::getPositionInformation(), GNEAdditional::isAdditionalBlocked(), GNEPoly::isPolygonBlocked(), GNETAZ::isShapeBlocked(), GNEViewNetHelper::NetworkViewOptions::menuCheckMoveElevation, GNETAZ::moveEntireShape(), GNEPoly::moveEntireShape(), GNEPOI::moveGeometry(), GNEJunction::moveGeometry(), GNEAdditional::moveGeometry(), GNEDemandElement::moveGeometry(), GNEEdge::moveShapeEnd(), GNEEdge::moveShapeStart(), GNETAZ::moveVertexShape(), GNEPoly::moveVertexShape(), GNEEdge::moveVertexShape(), movingIndexShape, myAdditionalToMove, myDemandElementToMove, myEdgeToMove, myJunctionToMove, GNEViewNet::myMoveSingleElementValues, myMovingEndPos, myMovingStartPos, GNEViewNet::myNetworkViewOptions, myPOIToMove, myPolyToMove, myRelativeClickedPosition, myTAZToMove, myViewNet, originalPositionInView, originalShapeBeforeMoving, Position::setz(), GNEViewNet::update(), and Position::y().
Referenced by GNEViewNet::processMoveMouseDemand(), and GNEViewNet::processMoveMouseNetwork().
int GNEViewNetHelper::MoveSingleElementValues::movingIndexShape |
index moved
Definition at line 514 of file GNEViewNetHelper.h.
Referenced by calculateEdgeValues(), calculatePolyValues(), calculateTAZValues(), and moveSingleElement().
|
private |
the additional element which position is being moved
Definition at line 554 of file GNEViewNetHelper.h.
Referenced by beginMoveSingleElementNetworkMode(), finishMoveSingleElement(), and moveSingleElement().
|
private |
the demand element which position is being moved
Definition at line 557 of file GNEViewNetHelper.h.
Referenced by beginMoveSingleElementDemandMode(), finishMoveSingleElement(), and moveSingleElement().
|
private |
the edge of which geometry is being moved
Definition at line 545 of file GNEViewNetHelper.h.
Referenced by calculateEdgeValues(), finishMoveSingleElement(), and moveSingleElement().
|
private |
the Junction to be moved.
Definition at line 542 of file GNEViewNetHelper.h.
Referenced by beginMoveSingleElementNetworkMode(), finishMoveSingleElement(), and moveSingleElement().
|
private |
bool to indicate that end pos of an edge is being moved
Definition at line 539 of file GNEViewNetHelper.h.
Referenced by calculateEdgeValues(), finishMoveSingleElement(), and moveSingleElement().
|
private |
bool to indicate that startPos of an edge is being moved
Definition at line 536 of file GNEViewNetHelper.h.
Referenced by calculateEdgeValues(), finishMoveSingleElement(), and moveSingleElement().
|
private |
the poi which position is being moved
Definition at line 551 of file GNEViewNetHelper.h.
Referenced by beginMoveSingleElementNetworkMode(), finishMoveSingleElement(), and moveSingleElement().
|
private |
the poly of which geometry is being moved
Definition at line 548 of file GNEViewNetHelper.h.
Referenced by calculatePolyValues(), finishMoveSingleElement(), and moveSingleElement().
|
private |
relative position of Clicked Position regarding to originalGeometryPointPosition (Used when user doesn't click exactly over the center of element)
Definition at line 533 of file GNEViewNetHelper.h.
Referenced by beginMoveSingleElementDemandMode(), beginMoveSingleElementNetworkMode(), and moveSingleElement().
|
private |
the TAZ element which their Shape is being moved (it's the only additional with a shape instead a position)
Definition at line 560 of file GNEViewNetHelper.h.
Referenced by calculateTAZValues(), finishMoveSingleElement(), and moveSingleElement().
|
private |
pointer to viewNet
Definition at line 530 of file GNEViewNetHelper.h.
Referenced by beginMoveSingleElementDemandMode(), beginMoveSingleElementNetworkMode(), calculateEdgeValues(), calculatePolyValues(), calculateTAZValues(), finishMoveSingleElement(), and moveSingleElement().
Position GNEViewNetHelper::MoveSingleElementValues::originalPositionInView |
original position of geometry position (needed for commmit position changes)
Definition at line 517 of file GNEViewNetHelper.h.
Referenced by beginMoveSingleElementDemandMode(), beginMoveSingleElementNetworkMode(), calculateEdgeValues(), calculatePolyValues(), calculateTAZValues(), finishMoveSingleElement(), and moveSingleElement().
PositionVector GNEViewNetHelper::MoveSingleElementValues::originalShapeBeforeMoving |
original shape of element before start moving (used by polygons, edges, etc., needed for commmit position changes)
Definition at line 511 of file GNEViewNetHelper.h.
Referenced by calculateEdgeValues(), calculatePolyValues(), calculateTAZValues(), finishMoveSingleElement(), and moveSingleElement().