Eclipse SUMO - Simulation of Urban MObility
NIVissimNodeParticipatingEdge.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 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 /****************************************************************************/
15 // -------------------
16 /****************************************************************************/
17 
18 
19 // ===========================================================================
20 // included modules
21 // ===========================================================================
22 #include <config.h>
23 
24 
25 #include "NIVissimEdge.h"
26 #include "NIVissimConnection.h"
28 
29 
30 
32  int edgeid, double frompos, double topos)
33  : myEdgeID(edgeid), myFromPos(frompos), myToPos(topos) {}
34 
36 
37 
38 int
40  return myEdgeID;
41 }
42 
43 
44 bool
46  return
47  (myFromPos < myToPos && myFromPos >= pos && myToPos <= pos)
48  ||
49  (myFromPos > myToPos && myFromPos <= pos && myToPos >= pos);
50 }
51 
52 double
54  return myFromPos;
55 }
56 
57 
58 double
60  return myToPos;
61 }
62 
63 
64 
65 /****************************************************************************/
66 
NIVissimNodeParticipatingEdge(int edgeid, double frompos, double topos)