Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEMoveOperation.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// Class used for define move operation
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
25
26// ===========================================================================
27// class declaration
28// ===========================================================================
29
30class GNELane;
31class GNEMoveElement;
32
33// ===========================================================================
34// class definitions
35// ===========================================================================
36
38
39public:
40 enum class OperationType {
44 WIDTH,
45 HEIGHT,
46 LENGTH,
47 LANE
48 };
49
52 const Position originalPosition);
53
57
61 const bool firstGeometryPoint,
63
67 const std::vector<int> originalgeometryPoints,
69 const std::vector<int> geometryPointsToMove);
70
73 const GNELane* lane,
74 const double firstPosition,
75 const bool allowChangeLane);
76
79 const GNELane* lane,
80 const double firstPosition,
81 const double lastPosition,
82 const bool allowChangeLane);
83
86 const GNELane* firstLane,
87 const double firstStartPos,
88 const GNELane* lastLane,
89 const double lastStartPos,
90 const double clickedFirstLane,
91 const bool allowChangeLane);
92
95
98
101
103 const std::vector<int> originalGeometryPoints;
104
106 const GNELane* firstLane = nullptr;
107
110
112 const GNELane* lastLane = nullptr;
113
116
118 const bool clickedFirstLane = false;
119
124
126 const std::vector<int> geometryPointsToMove;
127
129 const bool allowChangeLane = false;
130
132 const bool firstGeometryPoint = false;
133
136
137private:
140
143};
const double INVALID_DOUBLE
invalid double
Definition StdDefs.h:68
const OperationType operationType
operation type
GNEMoveOperation & operator=(const GNEMoveOperation &)=delete
Invalidated assignment operator.
const PositionVector originalShape
original shape
const std::vector< int > originalGeometryPoints
original shape points to move (of original shape)
const PositionVector shapeToMove
shape to move
const bool clickedFirstLane
@check if clicked the first lane or the last lane (used only in multilane elements like E2)
const GNELane * lastLane
original last lane
const double lastPosition
original last Position
~GNEMoveOperation()
destructor
GNEMoveOperation(const GNEMoveOperation &)=delete
Invalidated copy constructor.
const GNELane * firstLane
original first lane
const std::vector< int > geometryPointsToMove
shape points to move (of shapeToMove)
const double firstPosition
original first Position
const bool allowChangeLane
allow change lane
GNEMoveElement * moveElement
move element
const bool firstGeometryPoint
first position (used for edit with/height
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
A list of positions.