QGIS API Documentation 4.1.0-Master (376402f9aeb)
Loading...
Searching...
No Matches
qgs3dmapexportsettings.h
Go to the documentation of this file.
1/***************************************************************************
2 qgs3dmapexportsettings.h
3 --------------------------------------
4 Date : July 2020
5 Copyright : (C) 2020 by Belgacem Nedjima
6 Email : gb underscore nedjima at esi dot dz
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGS3DMAPEXPORTSETTINGS_H
17#define QGS3DMAPEXPORTSETTINGS_H
18
19#include "qgis.h"
20#include "qgis_3d.h"
21
22#include <QDir>
23#include <QObject>
24#include <QString>
25
31class _3D_EXPORT Qgs3DMapExportSettings
32{
33 public:
36
39
41 QString sceneName() const { return mSceneName; }
43 QString sceneFolderPath() const { return mSceneFolderPath; }
45 int terrrainResolution() const { return mTerrainResolution; }
47 bool smoothEdges() const { return mSmoothEdges; }
49 bool exportNormals() const { return mExportNormals; }
51 bool exportTextures() const { return mExportTextures; }
53 int terrainTextureResolution() const { return mTerrainTextureResolution; }
55 float scale() const { return mScale; }
60 Qgis::Export3DSceneFormat exportFormat() const { return mExportFormat; }
65 QString exportFileUri() const;
66
75 bool terrainExportEnabled() const { return mTerrainExportEnabled; }
76
78 void setSceneName( const QString &sceneName ) { mSceneName = sceneName; }
80 void setSceneFolderPath( const QString &sceneFolderPath ) { mSceneFolderPath = sceneFolderPath; }
82 void setTerrainResolution( int resolution ) { mTerrainResolution = resolution; }
84 void setSmoothEdges( bool smoothEdges ) { mSmoothEdges = smoothEdges; }
86 void setExportNormals( bool exportNormals ) { mExportNormals = exportNormals; }
88 void setExportTextures( bool exportTextures ) { mExportTextures = exportTextures; }
90 void setTerrainTextureResolution( int resolution ) { mTerrainTextureResolution = resolution; }
92 void setScale( float scale ) { mScale = scale; }
98
105 void setTerrainExportEnabled( bool enabled ) { mTerrainExportEnabled = enabled; }
106
107 private:
108 QString mSceneName = QString( "Scene" );
109 QString mSceneFolderPath = QDir::homePath();
110 int mTerrainResolution = 128;
111 bool mSmoothEdges = false;
112 bool mExportNormals = true;
113 bool mExportTextures = false;
114 int mTerrainTextureResolution = 512;
115 float mScale = 1.0f;
116 bool mTerrainExportEnabled = true;
118};
119
120#endif // QGS3DMAPEXPORTSETTINGS_H
Export3DSceneFormat
The file format used when exporting a 3D scene.
Definition qgis.h:4438
@ Obj
Wavefront OBJ format.
Definition qgis.h:4439
void setScale(float scale)
Sets the scale of exported model.
void setTerrainResolution(int resolution)
Sets the terrain resolution.
bool exportNormals() const
Returns whether normals will be exported.
void setExportTextures(bool exportTextures)
Sets whether textures will be exported.
int terrrainResolution() const
Returns the terrain resolution.
void setSmoothEdges(bool smoothEdges)
Sets whether triangles edges will look smooth.
void setSceneName(const QString &sceneName)
Sets the scene name.
QString sceneFolderPath() const
Returns the scene folder path.
void setTerrainExportEnabled(bool enabled)
Sets whether terrain export is enabled.
float scale() const
Returns the scale of the exported model.
int terrainTextureResolution() const
Returns the terrain texture resolution.
void setExportFormat(Qgis::Export3DSceneFormat exportFormat)
Sets the export format for the 3D scene.
void setTerrainTextureResolution(int resolution)
Sets the terrain texture resolution.
void setExportNormals(bool exportNormals)
Sets whether normals should be exported.
void setSceneFolderPath(const QString &sceneFolderPath)
Sets the folder path where exported 3D scene files will be saved.
bool terrainExportEnabled() const
Returns whether terrain export is enabled.
QString sceneName() const
Returns the scene name.
bool smoothEdges() const
Returns whether triangles edges will look smooth.
bool exportTextures() const
Returns whether textures will be exported.
Qgis::Export3DSceneFormat exportFormat() const
Returns the export format for the 3D scene.