SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NBNodeShapeComputer.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // This class computes shapes of junctions
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
12 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef NBNodeShapeComputer_h
23 #define NBNodeShapeComputer_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
41 class NBNode;
42 class NBEdge;
43 
44 
45 // ===========================================================================
46 // class declarations
47 // ===========================================================================
53 public:
55  NBNodeShapeComputer(const NBNode& node);
56 
59 
61  PositionVector compute(bool leftHand);
62 
63 private:
64  PositionVector computeContinuationNodeShape(bool simpleContinuation);
65 
75 
76 
77  void replaceLastChecking(PositionVector& g, bool decenter,
78  PositionVector counter, size_t counterLanes, SUMOReal counterDist,
79  int laneDiff);
80 
81 
82  void replaceFirstChecking(PositionVector& g, bool decenter,
83  PositionVector counter, size_t counterLanes, SUMOReal counterDist,
84  int laneDiff);
85 
95  void joinSameDirectionEdges(std::map<NBEdge*, EdgeVector >& same,
96  std::map<NBEdge*, PositionVector>& geomsCCW,
97  std::map<NBEdge*, PositionVector>& geomsCW);
98 
107  const std::map<NBEdge*, EdgeVector >& same,
108  std::map<NBEdge*, PositionVector>& geomsCCW,
109  std::map<NBEdge*, PositionVector>& geomsCW,
110  std::map<NBEdge*, NBEdge*>& ccwBoundary,
111  std::map<NBEdge*, NBEdge*>& cwBoundary);
112 
113 
114 private:
116  const NBNode& myNode;
117 
118 private:
121 
122 };
123 
124 #endif
125 
126 /****************************************************************************/
127