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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 // -------------------
19 /****************************************************************************/
20 #ifndef NIVissimAbstractEdge_h
21 #define NIVissimAbstractEdge_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <map>
35 
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
44 public:
45  NIVissimAbstractEdge(int id, const PositionVector& geom);
46  virtual ~NIVissimAbstractEdge();
47  Position getGeomPosition(double pos) const;
48  void splitAssigning();
49  bool crossesEdge(NIVissimAbstractEdge* c) const;
51  bool overlapsWith(const AbstractPoly& p, double offset = 0.0) const;
52  virtual void setNodeCluster(int nodeid) = 0;
53  bool hasNodeCluster() const;
54 
55  virtual void buildGeom() = 0;
56  int getID() const;
57  const PositionVector& getGeometry() const;
58 
59  void addDisturbance(int disturbance);
60 
61  const std::vector<int>& getDisturbances() const;
62 
63 public:
64  static bool dictionary(int id, NIVissimAbstractEdge* e);
65  static NIVissimAbstractEdge* dictionary(int id);
66  static void splitAndAssignToNodes();
67  static std::vector<int> getWithin(const AbstractPoly& p, double offset = 0.0);
68  static void clearDict();
69 
70 
71 protected:
72  int myID;
74  std::vector<int> myDisturbances;
75  int myNode;
76 
77 private:
78  typedef std::map<int, NIVissimAbstractEdge*> DictType;
79  static DictType myDict;
80 };
81 
82 
83 #endif
84 
85 /****************************************************************************/
86 
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
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:45
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