Eclipse SUMO - Simulation of Urban MObility
GNEMoveElement Class Referenceabstract

move element More...

#include <GNEMoveElement.h>

Inheritance diagram for GNEMoveElement:
[legend]

Public Member Functions

virtual GNEMoveOperationgetMoveOperation (const double shapeOffset)=0
 get move operation for the given shapeOffset More...
 
 GNEMoveElement ()
 constructor More...
 
virtual void removeGeometryPoint (const Position clickedPosition, GNEUndoList *undoList)=0
 remove geometry point in the clicked position More...
 

Static Public Member Functions

static void commitMove (const GNEViewNet *viewNet, GNEMoveOperation *moveOperation, const Position &offset, GNEUndoList *undoList)
 commit move element for the given offset More...
 
static void moveElement (const GNEViewNet *viewNet, GNEMoveOperation *moveOperation, const Position &offset)
 move element the for given offset (note: offset can be X-Y-0, 0-0-Z or X-Y-Z) More...
 

Private Member Functions

virtual void commitMoveShape (const GNEMoveResult &moveResult, GNEUndoList *undoList)=0
 commit move shape More...
 
 GNEMoveElement (const GNEMoveElement &)=delete
 Invalidated copy constructor. More...
 
GNEMoveElementoperator= (const GNEMoveElement &)=delete
 Invalidated assignment operator. More...
 
virtual void setMoveShape (const GNEMoveResult &moveResult)=0
 set move shape More...
 

Static Private Member Functions

static const PositionVector calculateMovementOverLane (const GNEViewNet *viewNet, const GNEMoveOperation *moveOperation, const Position &offset)
 calculate movement over lane More...
 

Detailed Description

move element

Definition at line 124 of file GNEMoveElement.h.

Constructor & Destructor Documentation

◆ GNEMoveElement() [1/2]

GNEMoveElement::GNEMoveElement ( )

constructor

Definition at line 99 of file GNEMoveElement.cpp.

◆ GNEMoveElement() [2/2]

GNEMoveElement::GNEMoveElement ( const GNEMoveElement )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ calculateMovementOverLane()

const PositionVector GNEMoveElement::calculateMovementOverLane ( const GNEViewNet viewNet,
const GNEMoveOperation moveOperation,
const Position offset 
)
staticprivate

calculate movement over lane

Definition at line 214 of file GNEMoveElement.cpp.

References Position::add(), NBEdge::getFinalLength(), GNELane::getLaneShape(), GNELane::getLengthGeometryFactor(), GNEEdge::getNBEdge(), GNELane::getParentEdge(), GNEMoveOperation::lane, PositionVector::nearest_offset_to_point2D(), GNEMoveOperation::originalPosOverLanes, PositionVector::positionAtOffset2D(), and GUISUMOAbstractView::snapToActiveGrid().

Referenced by commitMove(), and moveElement().

Here is the caller graph for this function:

◆ commitMove()

◆ commitMoveShape()

virtual void GNEMoveElement::commitMoveShape ( const GNEMoveResult moveResult,
GNEUndoList undoList 
)
privatepure virtual

◆ getMoveOperation()

virtual GNEMoveOperation* GNEMoveElement::getMoveOperation ( const double  shapeOffset)
pure virtual

◆ moveElement()

void GNEMoveElement::moveElement ( const GNEViewNet viewNet,
GNEMoveOperation moveOperation,
const Position offset 
)
static

move element the for given offset (note: offset can be X-Y-0, 0-0-Z or X-Y-Z)

Definition at line 104 of file GNEMoveElement.cpp.

References PositionVector::add(), calculateMovementOverLane(), GNEMoveOperation::geometryPointsToMove, GNEMoveResult::geometryPointsToMove, Position::INVALID, GNEMoveOperation::lane, GNEMoveOperation::moveElement, setMoveShape(), GNEMoveOperation::shapeToMove, GNEMoveResult::shapeToUpdate, and GUISUMOAbstractView::snapToActiveGrid().

Referenced by GNEViewNetHelper::MoveMultipleElementValues::moveSelection(), and GNEViewNetHelper::MoveSingleElementValues::moveSingleElement().

Here is the caller graph for this function:

◆ operator=()

GNEMoveElement& GNEMoveElement::operator= ( const GNEMoveElement )
privatedelete

Invalidated assignment operator.

◆ removeGeometryPoint()

virtual void GNEMoveElement::removeGeometryPoint ( const Position  clickedPosition,
GNEUndoList undoList 
)
pure virtual

remove geometry point in the clicked position

Implemented in GNEShape, GNELaneType, GNELane, GNEJunction, GNEInternalLane, GNEEdgeType, GNEEdge, GNECrossing, GNEConnection, GNETAZ, GNEPoly, GNEPOI, and GNEAdditional.

Referenced by GNEViewNet::processLeftButtonPressNetwork(), and GNEDeleteFrame::removeGeometryPoint().

Here is the caller graph for this function:

◆ setMoveShape()

virtual void GNEMoveElement::setMoveShape ( const GNEMoveResult moveResult)
privatepure virtual

The documentation for this class was generated from the following files: