Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEMoveOperation Class Reference

move operation More...

#include <GNEMoveElement.h>

Collaboration diagram for GNEMoveOperation:
[legend]

Public Types

enum class  OperationType {
  POSITION , ENTIRE_SHAPE , GEOMETRY_POINTS , WIDTH ,
  HEIGHT , LENGTH , ONE_LANE , ONE_LANE_MOVEFIRST ,
  ONE_LANE_MOVESECOND , ONE_LANE_MOVEBOTH , TWO_LANES_MOVEFIRST , TWO_LANES_MOVESECOND ,
  TWO_LANES_MOVEBOTH_FIRST , TWO_LANES_MOVEBOTH_SECOND
}
 

Public Member Functions

 GNEMoveOperation (GNEMoveElement *moveElement, const GNELane *firstLane, const double firstStartPos, const GNELane *secondLane, const double secondStartPos, const bool allowChangeLane, const OperationType operationType)
 constructor for elements placed over two lanes with two positions (E2 Multilane, vehicles..)
 
 GNEMoveOperation (GNEMoveElement *moveElement, const GNELane *lane, const double firstPosition, const bool allowChangeLane)
 constructor for elements placed over lanes with one position (detectors, vehicles...)
 
 GNEMoveOperation (GNEMoveElement *moveElement, const GNELane *lane, const double firstPosition, const double secondPosition, const bool allowChangeLane, const OperationType operationType)
 constructor for elements placed over same lanes with two positions (StoppingPlaces)
 
 GNEMoveOperation (GNEMoveElement *moveElement, const Position originalPosition)
 constructor for values with a single position (junctions, E3, ParkingSpaces...)
 
 GNEMoveOperation (GNEMoveElement *moveElement, const PositionVector originalShape)
 constructor for entire geometries (Polygon with blocked shapes)
 
 GNEMoveOperation (GNEMoveElement *moveElement, const PositionVector originalShape, const bool firstGeometryPoint, const OperationType operationType)
 constructor for entire geometries (Polygon with blocked shapes)
 
 GNEMoveOperation (GNEMoveElement *moveElement, const PositionVector originalShape, const std::vector< int > originalgeometryPoints, const PositionVector shapeToMove, const std::vector< int > geometryPointsToMove)
 constructor for elements with editable shapes (edges, polygons...)
 
 ~GNEMoveOperation ()
 destructor
 

Data Fields

const bool allowChangeLane
 allow change lane
 
const bool firstGeometryPoint
 first position (used for edit with/height
 
const GNELanefirstLane = nullptr
 original first lane
 
const double firstPosition = INVALID_DOUBLE
 original first Position
 
const std::vector< int > geometryPointsToMove
 shape points to move (of shapeToMove)
 
GNEMoveElementmoveElement
 move element
 
const OperationType operationType
 operation type
 
const std::vector< int > originalGeometryPoints
 original shape points to move (of original shape)
 
const PositionVector originalShape
 original shape
 
const GNELanesecondLane = nullptr
 original second lane
 
const double secondPosition = INVALID_DOUBLE
 original second Position
 
const PositionVector shapeToMove
 shape to move
 

Private Member Functions

 GNEMoveOperation (const GNEMoveOperation &)=delete
 Invalidated copy constructor.
 
GNEMoveOperationoperator= (const GNEMoveOperation &)=delete
 Invalidated assignment operator.
 

Detailed Description

move operation

Definition at line 40 of file GNEMoveElement.h.

Member Enumeration Documentation

◆ OperationType

Enumerator
POSITION 
ENTIRE_SHAPE 
GEOMETRY_POINTS 
WIDTH 
HEIGHT 
LENGTH 
ONE_LANE 
ONE_LANE_MOVEFIRST 
ONE_LANE_MOVESECOND 
ONE_LANE_MOVEBOTH 
TWO_LANES_MOVEFIRST 
TWO_LANES_MOVESECOND 
TWO_LANES_MOVEBOTH_FIRST 
TWO_LANES_MOVEBOTH_SECOND 

Definition at line 43 of file GNEMoveElement.h.

Constructor & Destructor Documentation

◆ GNEMoveOperation() [1/8]

GNEMoveOperation::GNEMoveOperation ( GNEMoveElement moveElement,
const Position  originalPosition 
)

constructor for values with a single position (junctions, E3, ParkingSpaces...)

Definition at line 32 of file GNEMoveElement.cpp.

◆ GNEMoveOperation() [2/8]

GNEMoveOperation::GNEMoveOperation ( GNEMoveElement moveElement,
const PositionVector  originalShape 
)

constructor for entire geometries (Polygon with blocked shapes)

Definition at line 43 of file GNEMoveElement.cpp.

◆ GNEMoveOperation() [3/8]

GNEMoveOperation::GNEMoveOperation ( GNEMoveElement moveElement,
const PositionVector  originalShape,
const bool  firstGeometryPoint,
const OperationType  operationType 
)

constructor for entire geometries (Polygon with blocked shapes)

Definition at line 53 of file GNEMoveElement.cpp.

◆ GNEMoveOperation() [4/8]

GNEMoveOperation::GNEMoveOperation ( GNEMoveElement moveElement,
const PositionVector  originalShape,
const std::vector< int >  originalgeometryPoints,
const PositionVector  shapeToMove,
const std::vector< int >  geometryPointsToMove 
)

constructor for elements with editable shapes (edges, polygons...)

Definition at line 65 of file GNEMoveElement.cpp.

◆ GNEMoveOperation() [5/8]

GNEMoveOperation::GNEMoveOperation ( GNEMoveElement moveElement,
const GNELane lane,
const double  firstPosition,
const bool  allowChangeLane 
)

constructor for elements placed over lanes with one position (detectors, vehicles...)

Definition at line 81 of file GNEMoveElement.cpp.

◆ GNEMoveOperation() [6/8]

GNEMoveOperation::GNEMoveOperation ( GNEMoveElement moveElement,
const GNELane lane,
const double  firstPosition,
const double  secondPosition,
const bool  allowChangeLane,
const OperationType  operationType 
)

constructor for elements placed over same lanes with two positions (StoppingPlaces)

Definition at line 94 of file GNEMoveElement.cpp.

◆ GNEMoveOperation() [7/8]

GNEMoveOperation::GNEMoveOperation ( GNEMoveElement moveElement,
const GNELane firstLane,
const double  firstStartPos,
const GNELane secondLane,
const double  secondStartPos,
const bool  allowChangeLane,
const OperationType  operationType 
)

constructor for elements placed over two lanes with two positions (E2 Multilane, vehicles..)

Definition at line 110 of file GNEMoveElement.cpp.

◆ ~GNEMoveOperation()

GNEMoveOperation::~GNEMoveOperation ( )

destructor

Definition at line 128 of file GNEMoveElement.cpp.

◆ GNEMoveOperation() [8/8]

GNEMoveOperation::GNEMoveOperation ( const GNEMoveOperation )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ operator=()

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

Invalidated assignment operator.

Field Documentation

◆ allowChangeLane

const bool GNEMoveOperation::allowChangeLane

allow change lane

Definition at line 137 of file GNEMoveElement.h.

Referenced by GNEMoveElement::commitMove(), and GNEMoveElement::moveElement().

◆ firstGeometryPoint

const bool GNEMoveOperation::firstGeometryPoint

first position (used for edit with/height

Definition at line 140 of file GNEMoveElement.h.

Referenced by GNEMoveElement::calculateExtrapolatedVector().

◆ firstLane

const GNELane* GNEMoveOperation::firstLane = nullptr

◆ firstPosition

const double GNEMoveOperation::firstPosition = INVALID_DOUBLE

◆ geometryPointsToMove

const std::vector<int> GNEMoveOperation::geometryPointsToMove

shape points to move (of shapeToMove)

Definition at line 134 of file GNEMoveElement.h.

Referenced by GNEMoveElement::commitMove(), and GNEMoveElement::moveElement().

◆ moveElement

GNEMoveElement* GNEMoveOperation::moveElement

move element

Definition at line 108 of file GNEMoveElement.h.

Referenced by GNEMoveElement::commitMove(), and GNEMoveElement::moveElement().

◆ operationType

const OperationType GNEMoveOperation::operationType

◆ originalGeometryPoints

const std::vector<int> GNEMoveOperation::originalGeometryPoints

original shape points to move (of original shape)

Definition at line 114 of file GNEMoveElement.h.

Referenced by GNEMoveElement::commitMove().

◆ originalShape

const PositionVector GNEMoveOperation::originalShape

original shape

Definition at line 111 of file GNEMoveElement.h.

Referenced by GNEMoveElement::calculateExtrapolatedVector(), and GNEMoveElement::commitMove().

◆ secondLane

const GNELane* GNEMoveOperation::secondLane = nullptr

original second lane

Definition at line 123 of file GNEMoveElement.h.

Referenced by GNEMoveElement::adjustBothPositions(), GNEMoveElement::commitMove(), and GNEMoveElement::moveElement().

◆ secondPosition

const double GNEMoveOperation::secondPosition = INVALID_DOUBLE

◆ shapeToMove

const PositionVector GNEMoveOperation::shapeToMove

shape to move

Note
: it can be different of originalShape, for example due a new geometry point

Definition at line 131 of file GNEMoveElement.h.

Referenced by GNEMoveElement::calculateExtrapolatedVector(), GNEMoveElement::commitMove(), and GNEMoveElement::moveElement().


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