SUMO - Simulation of Urban MObility
NIVissimAbstractEdge.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
16 // -------------------
17 /****************************************************************************/
18 #ifndef NIVissimAbstractEdge_h
19 #define NIVissimAbstractEdge_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <map>
29 
30 
31 // ===========================================================================
32 // class definitions
33 // ===========================================================================
38 public:
39  NIVissimAbstractEdge(int id, const PositionVector& geom);
40  virtual ~NIVissimAbstractEdge();
41  Position getGeomPosition(double pos) const;
42  void splitAssigning();
43  bool crossesEdge(NIVissimAbstractEdge* c) const;
45  bool overlapsWith(const AbstractPoly& p, double offset = 0.0) const;
46  virtual void setNodeCluster(int nodeid) = 0;
47  bool hasNodeCluster() const;
48 
49  virtual void buildGeom() = 0;
50  int getID() const;
51  const PositionVector& getGeometry() const;
52 
53  void addDisturbance(int disturbance);
54 
55  const std::vector<int>& getDisturbances() const;
56 
57 public:
58  static bool dictionary(int id, NIVissimAbstractEdge* e);
59  static NIVissimAbstractEdge* dictionary(int id);
60  static void splitAndAssignToNodes();
61  static std::vector<int> getWithin(const AbstractPoly& p, double offset = 0.0);
62  static void clearDict();
63 
64 
65 protected:
66  int myID;
68  std::vector<int> myDisturbances;
69  int myNode;
70 
71 private:
72  typedef std::map<int, NIVissimAbstractEdge*> DictType;
73  static DictType myDict;
74 };
75 
76 
77 #endif
78 
79 /****************************************************************************/
80 
Position getGeomPosition(double pos) const
const std::vector< int > & getDisturbances() const
static bool dictionary(int id, NIVissimAbstractEdge *e)
void addDisturbance(int disturbance)
const PositionVector & getGeometry() const
virtual void setNodeCluster(int nodeid)=0
static void splitAndAssignToNodes()
bool overlapsWith(const AbstractPoly &p, double offset=0.0) const
NIVissimAbstractEdge(int id, const PositionVector &geom)
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
A list of positions.
virtual void buildGeom()=0
static std::vector< int > getWithin(const AbstractPoly &p, double offset=0.0)
Position crossesEdgeAtPoint(NIVissimAbstractEdge *c) const
std::vector< int > myDisturbances
bool crossesEdge(NIVissimAbstractEdge *c) const
std::map< int, NIVissimAbstractEdge * > DictType