Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+99
@@ -0,0 +1,99 @@
|
||||
/**
|
||||
* Building Model
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, ESZS, 2016-04-14
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <CentralEffectSimulation/logger.h>
|
||||
|
||||
#include <Buildings/BuildingControlUnit/VWM/vwm_building.h>
|
||||
#include <InfrastructureManagement/ism.hpp>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <QPolygonF>
|
||||
|
||||
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<LtsUtils::QPoint3D> &trajectory) const;
|
||||
bool hasIntersectionSimplified(const std::vector<Core::GeoPosition> &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<LtsUtils::QPoint3D> &trajectory) const;
|
||||
bool hasIntersection(const std::vector<Core::GeoPosition> &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<LtsUtils::QPoint3D> &trajectory) const;
|
||||
Core::GeoPosition intersection(const std::vector<Core::GeoPosition> &trajectory) const;
|
||||
|
||||
LtsUtils::QPoint3D fromGeographic(const Core::GeoPosition &point) const;
|
||||
QVector<LtsUtils::QPoint3D> fromGeographic(const std::vector<Core::GeoPosition> &points) const;
|
||||
Core::GeoPosition toGeographic(const LtsUtils::QPoint3D &point) const;
|
||||
std::vector<Core::GeoPosition> toGeographic(const QVector<LtsUtils::QPoint3D> &points) const;
|
||||
|
||||
LtsUtils::QPoint3D fromReference(const LtsUtils::QPoint3D &point) const;
|
||||
QVector<LtsUtils::QPoint3D> fromReference(const QVector<LtsUtils::QPoint3D> &points) const;
|
||||
LtsUtils::QPoint3D toReference(const LtsUtils::QPoint3D &point) const;
|
||||
QVector<LtsUtils::QPoint3D> toReference(const QVector<LtsUtils::QPoint3D> &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
|
||||
Reference in new issue
Block a user