Path: blob/main/src/netimport/vissim/tempstructs/NIVissimAbstractEdge.h
169684 views
/****************************************************************************/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 NIVissimAbstractEdge.h14/// @author Daniel Krajzewicz15/// @author Michael Behrisch16/// @date Sept 200217///18// -------------------19/****************************************************************************/20#pragma once21#include <config.h>2223#include <map>24#include <utils/geom/PositionVector.h>252627// ===========================================================================28// class definitions29// ===========================================================================30/**31*32*/33class NIVissimAbstractEdge {34public:35NIVissimAbstractEdge(int id, const PositionVector& geom);36virtual ~NIVissimAbstractEdge();37Position getGeomPosition(double pos) const;38void splitAssigning();39bool crossesEdge(NIVissimAbstractEdge* c) const;40Position crossesEdgeAtPoint(NIVissimAbstractEdge* c) const;41bool overlapsWith(const AbstractPoly& p, double offset = 0.0) const;42virtual void setNodeCluster(int nodeid) = 0;43bool hasNodeCluster() const;4445virtual void buildGeom() = 0;46int getID() const;47const PositionVector& getGeometry() const;4849void addDisturbance(int disturbance);5051const std::vector<int>& getDisturbances() const;5253public:54static bool dictionary(int id, NIVissimAbstractEdge* e);55static NIVissimAbstractEdge* dictionary(int id);56static void splitAndAssignToNodes();57static std::vector<int> getWithin(const AbstractPoly& p, double offset = 0.0);58static void clearDict();596061protected:62int myID;63PositionVector myGeom;64std::vector<int> myDisturbances;65int myNode;6667private:68typedef std::map<int, NIVissimAbstractEdge*> DictType;69static DictType myDict;70};717273