/** * Building Model * $Id$ * $HeadURL$ * $Author$ * Created by Gerlinde Rudolphus, ESZS, 2016-04-14 */ #pragma once #include #include #include #include #include #include using namespace CentralEffectSimulation; namespace CesBuildings { /////////////////////////////////////////////////////////////////////////////////////////////////// // BuildingModel // class BuildingModel : public QObject , public BuildingControlUnit::VWM::Building { Q_OBJECT public: static bool isValid(const LtsUtils::QPoint3D &point); static bool isValid(const Core::GeoPosition &point); static LtsUtils::QPoint3D invalidPosition(); static Core::GeoPosition invalidGeoPosition(); explicit BuildingModel(QObject *parent = nullptr); ~BuildingModel(); bool init(const InfrastructureManagement::MainFootprint &mfp, const InfrastructureManagement::MainStructureElement &mse, const QByteArray &vmd, const int buildingId); bool hasIntersectionSimplified(const LtsUtils::QPoint3D &start, const LtsUtils::QPoint3D &end) const; bool hasIntersectionSimplified(const Core::GeoPosition &start, const Core::GeoPosition &end) const; bool hasIntersectionSimplified(const QVector &trajectory) const; bool hasIntersectionSimplified(const std::vector &trajectory) const; bool hasIntersection(const LtsUtils::QPoint3D &start, const LtsUtils::QPoint3D &end) const; bool hasIntersection(const Core::GeoPosition &start, const Core::GeoPosition &end) const; bool hasIntersection(const QVector &trajectory) const; bool hasIntersection(const std::vector &trajectory) const; Core::GeoPosition intersection(const LtsUtils::QPoint3D &start, const LtsUtils::QPoint3D &end) const; Core::GeoPosition intersection(const Core::GeoPosition &start, const Core::GeoPosition &end) const; Core::GeoPosition intersection(const QVector &trajectory) const; Core::GeoPosition intersection(const std::vector &trajectory) const; LtsUtils::QPoint3D fromGeographic(const Core::GeoPosition &point) const; QVector fromGeographic(const std::vector &points) const; Core::GeoPosition toGeographic(const LtsUtils::QPoint3D &point) const; std::vector toGeographic(const QVector &points) const; LtsUtils::QPoint3D fromReference(const LtsUtils::QPoint3D &point) const; QVector fromReference(const QVector &points) const; LtsUtils::QPoint3D toReference(const LtsUtils::QPoint3D &point) const; QVector toReference(const QVector &points) const; const int &buildingId() const { return m_buildingId; } const double &height() const { return m_height; } const double &angle() const { return m_angle; } const Core::GeoPosition &refPosGeo() const { return m_refPosGeo; } const LtsCoordTrans::UtmCoordinate &refPosUtm() const { return m_refPosUtm; } const LtsUtils::QPoint3D &refPos() const { return m_refPos; } const QPolygonF &footprint() const { return m_footprint; } const QRectF &boundingRect() const { return m_boundingRect; } bool operator ==(const BuildingModel &other) const; bool operator !=(const BuildingModel &other) const; private: int m_buildingId{0}; double m_height{0.}; double m_angle{0.}; Core::GeoPosition m_refPosGeo; LtsCoordTrans::UtmCoordinate m_refPosUtm; LtsUtils::QPoint3D m_refPos; // UTM QPolygonF m_footprint; QRectF m_boundingRect; LOGGER_T &m_logger; }; // class BuildingModel } // namespace CesBuildings