#pragma once #include #include #include namespace InfrastructureManagement { class MainStructureElement; namespace Interface { class Dtc; } } namespace ParticipantManagement { namespace Interface { class Dtc; } } class QLineF; class QPointF; class QPolygonF; namespace CollateralDamageSimulation { namespace Calculations { struct ParticipantProtectionInfo { QVector withProtection; QVector withoutProtection; QVector participantsInUnderground; }; QHash getBuildingFootprints(const QVector &buildingIds, const std::shared_ptr &ismDtc, const QPointF &impactPosition); QVector getDirectlyHitBuildings(const QHash &footprints, const QPointF &impactPosition); int getNearestBlockedBuildingId(const QLineF &ray, const QHash &buildings); QPolygonF getBuildingFootprint(int buildingId, const std::shared_ptr &ismDtc); QVector getProtectionAreas(const QHash &buildingFootprints, double radius, const QPointF &impactPosition); bool isPointVisible(const QPointF ¢er, const QPointF &point, const QPolygonF &polygon); bool doLinesIntersect(const QPointF &a1, const QPointF &a2, const QPointF &b1, const QPointF &b2); void addOuterBounds(QPolygonF &polygon, const QPointF ¢er, double radius); QPointF getStartPosForOuterBounds(const QPolygonF &polygon, const QPolygonF &circle); QPointF getEndPosForOuterBounds(const QPolygonF &polygon, const QPolygonF &circle); QPointF firstIntersection(const QLineF &line, const QPolygonF &circle); ParticipantProtectionInfo getParticipantProtectionInfo(const QVector &participantIds, const QVector &protectionAreas, const QVector &undergroundBuildingIds, const QVector &directlyHitBuildingIds, const QHash &buildingFootprints, const std::shared_ptr &ppmDtc, const std::shared_ptr &ismDtc); bool isPointInAnyPolygon(const QHash &polygons, const QPointF &point); QVector mergePolygons(const QVector &geoPolygons); QVector getScaledPolygons(const QVector &polygons, double factor); QVector getUndergroundBuildingIds(const QVector &buildingIds, const std::shared_ptr &ismDtc); QList getGeoRect(const QPointF ¢er, double edgeLength); } }