SUMO - Simulation of Urban MObility

NBNodeShapeComputer.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // This class computes shapes of junctions
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright (C) 2001-2011 DLR (http://www.dlr.de/) and contributors
00011 /****************************************************************************/
00012 //
00013 //   This program is free software; you can redistribute it and/or modify
00014 //   it under the terms of the GNU General Public License as published by
00015 //   the Free Software Foundation; either version 2 of the License, or
00016 //   (at your option) any later version.
00017 //
00018 /****************************************************************************/
00019 #ifndef NBNodeShapeComputer_h
00020 #define NBNodeShapeComputer_h
00021 
00022 
00023 // ===========================================================================
00024 // included modules
00025 // ===========================================================================
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031 
00032 #include <utils/geom/PositionVector.h>
00033 
00034 
00035 // ===========================================================================
00036 // class definitions
00037 // ===========================================================================
00038 class NBNode;
00039 class NBEdge;
00040 
00041 
00042 // ===========================================================================
00043 // class declarations
00044 // ===========================================================================
00049 class NBNodeShapeComputer {
00050 public:
00052     NBNodeShapeComputer(const NBNode& node);
00053 
00055     ~NBNodeShapeComputer();
00056 
00058     PositionVector compute(bool leftHand);
00059 
00060 private:
00061     PositionVector computeContinuationNodeShape(bool simpleContinuation);
00062 
00071     PositionVector computeNodeShapeByCrosses();
00072 
00073 
00074     void replaceLastChecking(PositionVector& g, bool decenter,
00075                              PositionVector counter, size_t counterLanes, SUMOReal counterDist,
00076                              int laneDiff);
00077 
00078 
00079     void replaceFirstChecking(PositionVector& g, bool decenter,
00080                               PositionVector counter, size_t counterLanes, SUMOReal counterDist,
00081                               int laneDiff);
00082 
00092     void joinSameDirectionEdges(std::map<NBEdge*, EdgeVector > &same,
00093                                 std::map<NBEdge*, PositionVector> &geomsCCW,
00094                                 std::map<NBEdge*, PositionVector> &geomsCW);
00095 
00103     EdgeVector computeUniqueDirectionList(
00104         const std::map<NBEdge*, EdgeVector > &same,
00105         std::map<NBEdge*, PositionVector> &geomsCCW,
00106         std::map<NBEdge*, PositionVector> &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 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines