Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/netedit/GNELane2laneConnection.h
169667 views
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
/****************************************************************************/
14
/// @file GNELane2laneConnection.h
15
/// @author Pablo Alvarez Lopez
16
/// @date Nov 2019
17
///
18
// File for lane2lane geometry classes and functions
19
/****************************************************************************/
20
#pragma once
21
#include <config.h>
22
23
#include <utils/gui/div/GUIGeometry.h>
24
25
26
// ===========================================================================
27
// class declarations
28
// ===========================================================================
29
class GNELane;
30
31
// ===========================================================================
32
// class definitions
33
// ===========================================================================
34
35
/// @brief class lane2lane connection geometry
36
class GNELane2laneConnection {
37
38
public:
39
/// @brief constructor
40
GNELane2laneConnection(const GNELane* fromLane);
41
42
/// @brief update
43
void updateLane2laneConnection();
44
45
/// @brief check if exist a lane2lane geometry for the given toLane
46
bool exist(const GNELane* toLane) const;
47
48
/// @brief get lane2lane geometry
49
const GUIGeometry& getLane2laneGeometry(const GNELane* toLane) const;
50
51
protected:
52
/// @brief from lane
53
const GNELane* myFromLane;
54
55
/// @brief connection shape
56
std::map<const GNELane*, GUIGeometry> myConnectionsMap;
57
58
private:
59
/// @brief constructor
60
GNELane2laneConnection();
61
62
/// @brief Invalidated assignment operator
63
GNELane2laneConnection& operator=(const GNELane2laneConnection& other) = delete;
64
};
65
66