/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file AbstractPoly.h14/// @author Daniel Krajzewicz15/// @author Michael Behrisch16/// @date Sept 200217///18// The base class for polygons19/****************************************************************************/20#pragma once21#include <config.h>2223#include "Position.h"242526// ===========================================================================27// class definitions28// ===========================================================================29/**30*31*/32class AbstractPoly {33public:34/// @brief destructor35virtual ~AbstractPoly() { }3637/// @brief Returns whether the AbstractPoly the given coordinate38virtual bool around(const Position& p, double offset = 0) const = 0;3940/// @brief Returns whether the AbstractPoly overlaps with the given polygon41virtual bool overlapsWith(const AbstractPoly& poly, double offset = 0) const = 0;4243/// @brief Returns whether the AbstractPoly is partially within the given polygon44virtual bool partialWithin(const AbstractPoly& poly, double offset = 0) const = 0;4546/// @brief Returns whether the AbstractPoly crosses the given line47virtual bool crosses(const Position& p1, const Position& p2) const = 0;48};495051