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 2001-2010 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/Position2DVector.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     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 

Generated on Wed May 5 00:06:33 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6