Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEViewNetHelper::MoveSingleElementModul Struct Reference

struct used to group all variables related with movement of single elements More...

#include <GNEViewNetHelper.h>

Collaboration diagram for GNEViewNetHelper::MoveSingleElementModul:
[legend]

Public Member Functions

bool beginMoveNetworkElementShape ()
 begin move network elementshape
bool beginMoveSingleElementDemandMode ()
 begin move single element in Demand mode
bool beginMoveSingleElementNetworkMode ()
 begin move single element in Network mode
void finishMoveSingleElement ()
 finish moving single elements in Network AND Demand mode
GNEMoveElementgetMovedElement () const
 get moved element
bool isCurrentlyMovingSingleElement () const
 check if there are moving elements
void moveSingleElement (const bool mouseLeftButtonPressed)
 move single element in Network AND Demand mode
 MoveSingleElementModul (GNEViewNet *viewNet)
 constructor

Protected Member Functions

const GNEMoveOffset calculateMoveOffset () const
 calculate offset

Private Member Functions

 MoveSingleElementModul (const MoveSingleElementModul &)=delete
 Invalidated copy constructor.
MoveSingleElementModuloperator= (const MoveSingleElementModul &)=delete
 Invalidated assignment operator.

Private Attributes

GNEMoveOperationmyMoveOperation = nullptr
 move operations
Position myRelativeClickedPosition
 relative position of Clicked Position regarding to originalGeometryPointPosition (Used when user doesn't click exactly over the center of element)
GNEViewNetmyViewNet
 pointer to net

Detailed Description

struct used to group all variables related with movement of single elements

Definition at line 1190 of file GNEViewNetHelper.h.

Constructor & Destructor Documentation

◆ MoveSingleElementModul() [1/2]

GNEViewNetHelper::MoveSingleElementModul::MoveSingleElementModul ( GNEViewNet * viewNet)

constructor

Definition at line 1498 of file GNEViewNetHelper.cpp.

References myViewNet.

Referenced by MoveSingleElementModul(), and operator=().

Here is the caller graph for this function:

◆ MoveSingleElementModul() [2/2]

GNEViewNetHelper::MoveSingleElementModul::MoveSingleElementModul ( const MoveSingleElementModul & )
privatedelete

Invalidated copy constructor.

References MoveSingleElementModul().

Member Function Documentation

◆ beginMoveNetworkElementShape()

bool GNEViewNetHelper::MoveSingleElementModul::beginMoveNetworkElementShape ( )

begin move network elementshape

Definition at line 1504 of file GNEViewNetHelper.cpp.

References myMoveOperation, myRelativeClickedPosition, and myViewNet.

◆ beginMoveSingleElementDemandMode()

bool GNEViewNetHelper::MoveSingleElementModul::beginMoveSingleElementDemandMode ( )

begin move single element in Demand mode

Definition at line 1657 of file GNEViewNetHelper.cpp.

References myMoveOperation, myRelativeClickedPosition, and myViewNet.

◆ beginMoveSingleElementNetworkMode()

bool GNEViewNetHelper::MoveSingleElementModul::beginMoveSingleElementNetworkMode ( )

begin move single element in Network mode

Definition at line 1561 of file GNEViewNetHelper.cpp.

References myMoveOperation, myRelativeClickedPosition, and myViewNet.

◆ calculateMoveOffset()

const GNEMoveOffset GNEViewNetHelper::MoveSingleElementModul::calculateMoveOffset ( ) const
protected

calculate offset

Definition at line 1731 of file GNEViewNetHelper.cpp.

References myViewNet, Position::x(), and Position::y().

Referenced by finishMoveSingleElement(), and moveSingleElement().

Here is the caller graph for this function:

◆ finishMoveSingleElement()

void GNEViewNetHelper::MoveSingleElementModul::finishMoveSingleElement ( )

finish moving single elements in Network AND Demand mode

Definition at line 1702 of file GNEViewNetHelper.cpp.

References calculateMoveOffset(), GNEMoveElement::commitMove(), myMoveOperation, and myViewNet.

◆ getMovedElement()

GNEMoveElement * GNEViewNetHelper::MoveSingleElementModul::getMovedElement ( ) const

get moved element

Definition at line 1721 of file GNEViewNetHelper.cpp.

References myMoveOperation.

◆ isCurrentlyMovingSingleElement()

bool GNEViewNetHelper::MoveSingleElementModul::isCurrentlyMovingSingleElement ( ) const

check if there are moving elements

Definition at line 1715 of file GNEViewNetHelper.cpp.

References myMoveOperation.

◆ moveSingleElement()

void GNEViewNetHelper::MoveSingleElementModul::moveSingleElement ( const bool mouseLeftButtonPressed)

move single element in Network AND Demand mode

Definition at line 1682 of file GNEViewNetHelper.cpp.

References calculateMoveOffset(), GNEMoveElement::commitMove(), GNEMoveElement::moveElement(), myMoveOperation, and myViewNet.

◆ operator=()

MoveSingleElementModul & GNEViewNetHelper::MoveSingleElementModul::operator= ( const MoveSingleElementModul & )
privatedelete

Invalidated assignment operator.

References MoveSingleElementModul().

Field Documentation

◆ myMoveOperation

GNEMoveOperation* GNEViewNetHelper::MoveSingleElementModul::myMoveOperation = nullptr
private

◆ myRelativeClickedPosition

Position GNEViewNetHelper::MoveSingleElementModul::myRelativeClickedPosition
private

relative position of Clicked Position regarding to originalGeometryPointPosition (Used when user doesn't click exactly over the center of element)

Definition at line 1225 of file GNEViewNetHelper.h.

Referenced by beginMoveNetworkElementShape(), beginMoveSingleElementDemandMode(), and beginMoveSingleElementNetworkMode().

◆ myViewNet


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