SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00009 // Some mathematical helper methods 00010 /****************************************************************************/ 00011 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00012 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00013 /****************************************************************************/ 00014 // 00015 // This file is part of SUMO. 00016 // SUMO is free software: you can redistribute it and/or modify 00017 // it under the terms of the GNU General Public License as published by 00018 // the Free Software Foundation, either version 3 of the License, or 00019 // (at your option) any later version. 00020 // 00021 /****************************************************************************/ 00022 #ifndef NBHelpers_h 00023 #define NBHelpers_h 00024 00025 00026 // =========================================================================== 00027 // included modules 00028 // =========================================================================== 00029 #ifdef _MSC_VER 00030 #include <windows_config.h> 00031 #else 00032 #include <config.h> 00033 #endif 00034 00035 #include <string> 00036 00037 00038 // =========================================================================== 00039 // class declarations 00040 // =========================================================================== 00041 class NBNode; 00042 class Position; 00043 00044 00045 // =========================================================================== 00046 // class definitions 00047 // =========================================================================== 00052 class NBHelpers { 00053 public: 00056 static SUMOReal angle(SUMOReal x1, SUMOReal y1, SUMOReal x2, SUMOReal y2); 00057 00059 static SUMOReal relAngle(SUMOReal angle1, SUMOReal angle2); 00060 00063 static SUMOReal normRelAngle(SUMOReal angle1, SUMOReal angle2); 00064 00066 static std::string normalIDRepresentation(const std::string& id); 00067 00069 static SUMOReal distance(NBNode* node1, NBNode* node2); 00070 00071 }; 00072 00073 00074 #endif 00075 00076 /****************************************************************************/ 00077