-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding Viewr3DSettings to SettingsManager
- Loading branch information
1 parent
4c4ddfc
commit 1418ef9
Showing
16 changed files
with
115 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,12 @@ | |
|
||
/// @author Omid Esrafilian <[email protected]> | ||
|
||
class Viewer3DSettings; | ||
|
||
class CityMapGeometry : public QQuick3DGeometry | ||
{ | ||
Q_OBJECT | ||
Q_PROPERTY(QString modelName READ modelName WRITE setModelName NOTIFY modelNameChanged) | ||
Q_PROPERTY(QString osmFilePath READ osmFilePath WRITE setOsmFilePath NOTIFY osmFilePathChanged) | ||
Q_PROPERTY(OsmParser* osmParser READ osmParser WRITE setOsmParser NOTIFY osmParserChanged) | ||
|
||
public: | ||
|
@@ -24,7 +25,6 @@ class CityMapGeometry : public QQuick3DGeometry | |
void setModelName(QString modelName); | ||
|
||
QString osmFilePath() const {return _osmFilePath;} | ||
void setOsmFilePath(QString filePath); | ||
|
||
OsmParser* osmParser(){ return _osmParser;} | ||
void setOsmParser(OsmParser* newOsmParser); | ||
|
@@ -44,6 +44,12 @@ class CityMapGeometry : public QQuick3DGeometry | |
QByteArray _vertexData; | ||
OsmParser *_osmParser; | ||
bool _mapLoadedFlag; | ||
Viewer3DSettings* _viewer3DSettings = nullptr; | ||
|
||
private slots: | ||
void setOsmFilePath(QVariant value); | ||
|
||
|
||
}; | ||
|
||
#endif // CITYMAPGEOMETRY_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,12 @@ | |
#include <QVector3D> | ||
#include <QVector2D> | ||
#include "qgeocoordinate.h" | ||
#include <QVariant> | ||
|
||
/// @author Omid Esrafilian <[email protected]> | ||
|
||
class Viewer3DSettings; | ||
|
||
class OsmParser : public QObject | ||
{ | ||
struct BuildingType | ||
|
@@ -26,14 +29,14 @@ class OsmParser : public QObject | |
|
||
Q_OBJECT | ||
|
||
Q_PROPERTY(float buildingLevelHeight READ buildingLevelHeight WRITE setBuildingLevelHeight NOTIFY buildingLevelHeightChanged) | ||
// Q_PROPERTY(float buildingLevelHeight READ buildingLevelHeight WRITE setBuildingLevelHeight NOTIFY buildingLevelHeightChanged) | ||
|
||
public: | ||
explicit OsmParser(QObject *parent = nullptr); | ||
|
||
void setGpsRef(QGeoCoordinate gpsRef); | ||
QGeoCoordinate getGpsRef(){ return _gpsRefPoint;} | ||
void setBuildingLevelHeight(float levelHeight){_buildingLevelHeight = levelHeight; emit buildingLevelHeightChanged();} | ||
|
||
float buildingLevelHeight(void){return _buildingLevelHeight;} | ||
void parseOsmFile(QString filePath); | ||
void decodeNodeTags(QDomElement& xmlComponent, QMap<uint64_t, QGeoCoordinate> &nodeMap); | ||
|
@@ -45,21 +48,24 @@ class OsmParser : public QObject | |
void trianglateRectangle(std::vector<QVector3D>& triangulatedMesh, std::vector<QVector3D> verticesCcw, bool invertNormal); | ||
|
||
private: | ||
QThread* _mainThread; | ||
QGeoCoordinate _gpsRefPoint; | ||
QMap<uint64_t, QGeoCoordinate> _mapNodes; | ||
QMap<uint64_t, BuildingType> _mapBuildings; | ||
|
||
bool _gpsRefSet; | ||
float _buildingLevelHeight; | ||
bool _mapLoadedFlag; | ||
Viewer3DSettings* _viewer3DSettings = nullptr; | ||
|
||
|
||
signals: | ||
void gpsRefChanged(QGeoCoordinate newGpsRef); | ||
void mapChanged(); | ||
void buildingLevelHeightChanged(void); | ||
|
||
private slots: | ||
void setBuildingLevelHeight(QVariant value); | ||
|
||
}; | ||
|
||
#endif // OSMPARSER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.