Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
NIVissimAbstractEdge.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-2024 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/****************************************************************************/
19// -------------------
20/****************************************************************************/
21#pragma once
22#include <config.h>
23
24#include <map>
26
27
28// ===========================================================================
29// class definitions
30// ===========================================================================
35public:
36 NIVissimAbstractEdge(int id, const PositionVector& geom);
37 virtual ~NIVissimAbstractEdge();
38 Position getGeomPosition(double pos) const;
39 void splitAssigning();
40 bool crossesEdge(NIVissimAbstractEdge* c) const;
42 bool overlapsWith(const AbstractPoly& p, double offset = 0.0) const;
43 virtual void setNodeCluster(int nodeid) = 0;
44 bool hasNodeCluster() const;
45
46 virtual void buildGeom() = 0;
47 int getID() const;
48 const PositionVector& getGeometry() const;
49
50 void addDisturbance(int disturbance);
51
52 const std::vector<int>& getDisturbances() const;
53
54public:
55 static bool dictionary(int id, NIVissimAbstractEdge* e);
56 static NIVissimAbstractEdge* dictionary(int id);
57 static void splitAndAssignToNodes();
58 static std::vector<int> getWithin(const AbstractPoly& p, double offset = 0.0);
59 static void clearDict();
60
61
62protected:
63 int myID;
65 std::vector<int> myDisturbances;
66 int myNode;
67
68private:
69 typedef std::map<int, NIVissimAbstractEdge*> DictType;
71};
static bool dictionary(int id, NIVissimAbstractEdge *e)
const PositionVector & getGeometry() const
static std::vector< int > getWithin(const AbstractPoly &p, double offset=0.0)
virtual void setNodeCluster(int nodeid)=0
bool overlapsWith(const AbstractPoly &p, double offset=0.0) const
Position crossesEdgeAtPoint(NIVissimAbstractEdge *c) const
const std::vector< int > & getDisturbances() const
virtual void buildGeom()=0
void addDisturbance(int disturbance)
std::map< int, NIVissimAbstractEdge * > DictType
std::vector< int > myDisturbances
bool crossesEdge(NIVissimAbstractEdge *c) const
Position getGeomPosition(double pos) const
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
A list of positions.