NBNodeShapeComputer.h
Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef NBNodeShapeComputer_h
00020 #define NBNodeShapeComputer_h
00021
00022
00023
00024
00025
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031
00032 #include <utils/geom/Position2DVector.h>
00033
00034
00035
00036
00037
00038 class NBNode;
00039 class NBEdge;
00040
00041
00042
00043
00044
00049 class NBNodeShapeComputer {
00050 public:
00052 NBNodeShapeComputer(const NBNode &node);
00053
00055 ~NBNodeShapeComputer();
00056
00058 Position2DVector compute(bool leftHand);
00059
00060 private:
00061 Position2DVector computeContinuationNodeShape(bool simpleContinuation);
00062
00071 Position2DVector computeNodeShapeByCrosses();
00072
00073
00074 void replaceLastChecking(Position2DVector &g, bool decenter,
00075 Position2DVector counter, size_t counterLanes, SUMOReal counterDist,
00076 int laneDiff);
00077
00078
00079 void replaceFirstChecking(Position2DVector &g, bool decenter,
00080 Position2DVector counter, size_t counterLanes, SUMOReal counterDist,
00081 int laneDiff);
00082
00092 void joinSameDirectionEdges(std::map<NBEdge*, std::vector<NBEdge*> > &same,
00093 std::map<NBEdge*, Position2DVector> &geomsCCW,
00094 std::map<NBEdge*, Position2DVector> &geomsCW);
00095
00103 std::vector<NBEdge*> computeUniqueDirectionList(
00104 const std::map<NBEdge*, std::vector<NBEdge*> > &same,
00105 std::map<NBEdge*, Position2DVector> &geomsCCW,
00106 std::map<NBEdge*, Position2DVector> &geomsCW,
00107 std::map<NBEdge*, NBEdge*> &ccwBoundary,
00108 std::map<NBEdge*, NBEdge*> &cwBoundary);
00109
00110
00111 private:
00113 const NBNode &myNode;
00114
00115 };
00116
00117
00118 #endif
00119
00120
00121