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-sim.org/
12 // Copyright (C) 2001-2013 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 
PositionVector computeContinuationNodeShape(bool simpleContinuation)
NBNodeShapeComputer & operator=(const NBNodeShapeComputer &s)
Invalidated assignment operator.
This class computes shapes of junctions.
The representation of a single edge during network building.
Definition: NBEdge.h:71
const NBNode & myNode
The node to compute the geometry for.
NBNodeShapeComputer(const NBNode &node)
Constructor.
A list of positions.
void replaceLastChecking(PositionVector &g, bool decenter, PositionVector counter, size_t counterLanes, SUMOReal counterDist, int laneDiff)
PositionVector compute(bool leftHand)
Computes the shape of the assigned junction.
void replaceFirstChecking(PositionVector &g, bool decenter, PositionVector counter, size_t counterLanes, SUMOReal counterDist, int laneDiff)
void joinSameDirectionEdges(std::map< NBEdge *, EdgeVector > &same, std::map< NBEdge *, PositionVector > &geomsCCW, std::map< NBEdge *, PositionVector > &geomsCW)
Joins edges and computes ccw/cw boundaries.
~NBNodeShapeComputer()
Destructor.
PositionVector computeNodeShapeByCrosses()
Computes the node geometry using normals.
std::vector< NBEdge * > EdgeVector
Definition: NBCont.h:38
Represents a single node (junction) during network building.
Definition: NBNode.h:74
#define SUMOReal
Definition: config.h:221
EdgeVector computeUniqueDirectionList(const std::map< NBEdge *, EdgeVector > &same, std::map< NBEdge *, PositionVector > &geomsCCW, std::map< NBEdge *, PositionVector > &geomsCW, std::map< NBEdge *, NBEdge * > &ccwBoundary, std::map< NBEdge *, NBEdge * > &cwBoundary)
Joins edges and computes ccw/cw boundaries.