SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00008 // The base class for polygons 00009 /****************************************************************************/ 00010 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00011 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00012 /****************************************************************************/ 00013 // 00014 // This file is part of SUMO. 00015 // SUMO is free software: you can redistribute it and/or modify 00016 // it under the terms of the GNU General Public License as published by 00017 // the Free Software Foundation, either version 3 of the License, or 00018 // (at your option) any later version. 00019 // 00020 /****************************************************************************/ 00021 #ifndef AbstractPoly_h 00022 #define AbstractPoly_h 00023 00024 00025 // =========================================================================== 00026 // included modules 00027 // =========================================================================== 00028 #ifdef _MSC_VER 00029 #include <windows_config.h> 00030 #else 00031 #include <config.h> 00032 #endif 00033 00034 #include "Position.h" 00035 00036 00037 // =========================================================================== 00038 // class definitions 00039 // =========================================================================== 00043 class AbstractPoly { 00044 public: 00045 AbstractPoly() { } 00046 AbstractPoly(const AbstractPoly&) { } 00047 virtual ~AbstractPoly() { } 00048 virtual bool around(const Position& p, SUMOReal offset = 0) const = 0; 00049 virtual bool overlapsWith(const AbstractPoly& poly, SUMOReal offset = 0) const = 0; 00050 virtual bool partialWithin(const AbstractPoly& poly, SUMOReal offset = 0) const = 0; 00051 virtual bool crosses(const Position& p1, 00052 const Position& p2) const = 0; 00053 }; 00054 00055 00056 #endif 00057 00058 /****************************************************************************/ 00059