QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
3d
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
31
class
_3D_EXPORT
Qgs3DMapExportSettings
32
{
33
public
:
35
Qgs3DMapExportSettings
();
36
38
~Qgs3DMapExportSettings
();
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
; }
97
void
setExportFormat
(
Qgis::Export3DSceneFormat
exportFormat
) { mExportFormat =
exportFormat
; }
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
;
117
Qgis::Export3DSceneFormat
mExportFormat =
Qgis::Export3DSceneFormat::Obj
;
118
};
119
120
#endif
// QGS3DMAPEXPORTSETTINGS_H
Qgis::Export3DSceneFormat
Export3DSceneFormat
The file format used when exporting a 3D scene.
Definition
qgis.h:4638
Qgis::Export3DSceneFormat::Obj
@ Obj
Wavefront OBJ format.
Definition
qgis.h:4639
Qgs3DMapExportSettings::setScale
void setScale(float scale)
Sets the scale of exported model.
Definition
qgs3dmapexportsettings.h:92
Qgs3DMapExportSettings::setTerrainResolution
void setTerrainResolution(int resolution)
Sets the terrain resolution.
Definition
qgs3dmapexportsettings.h:82
Qgs3DMapExportSettings::exportNormals
bool exportNormals() const
Returns whether normals will be exported.
Definition
qgs3dmapexportsettings.h:49
Qgs3DMapExportSettings::setExportTextures
void setExportTextures(bool exportTextures)
Sets whether textures will be exported.
Definition
qgs3dmapexportsettings.h:88
Qgs3DMapExportSettings::terrrainResolution
int terrrainResolution() const
Returns the terrain resolution.
Definition
qgs3dmapexportsettings.h:45
Qgs3DMapExportSettings::setSmoothEdges
void setSmoothEdges(bool smoothEdges)
Sets whether triangles edges will look smooth.
Definition
qgs3dmapexportsettings.h:84
Qgs3DMapExportSettings::setSceneName
void setSceneName(const QString &sceneName)
Sets the scene name.
Definition
qgs3dmapexportsettings.h:78
Qgs3DMapExportSettings::sceneFolderPath
QString sceneFolderPath() const
Returns the scene folder path.
Definition
qgs3dmapexportsettings.h:43
Qgs3DMapExportSettings::setTerrainExportEnabled
void setTerrainExportEnabled(bool enabled)
Sets whether terrain export is enabled.
Definition
qgs3dmapexportsettings.h:105
Qgs3DMapExportSettings::scale
float scale() const
Returns the scale of the exported model.
Definition
qgs3dmapexportsettings.h:55
Qgs3DMapExportSettings::terrainTextureResolution
int terrainTextureResolution() const
Returns the terrain texture resolution.
Definition
qgs3dmapexportsettings.h:53
Qgs3DMapExportSettings::setExportFormat
void setExportFormat(Qgis::Export3DSceneFormat exportFormat)
Sets the export format for the 3D scene.
Definition
qgs3dmapexportsettings.h:97
Qgs3DMapExportSettings::setTerrainTextureResolution
void setTerrainTextureResolution(int resolution)
Sets the terrain texture resolution.
Definition
qgs3dmapexportsettings.h:90
Qgs3DMapExportSettings::setExportNormals
void setExportNormals(bool exportNormals)
Sets whether normals should be exported.
Definition
qgs3dmapexportsettings.h:86
Qgs3DMapExportSettings::setSceneFolderPath
void setSceneFolderPath(const QString &sceneFolderPath)
Sets the folder path where exported 3D scene files will be saved.
Definition
qgs3dmapexportsettings.h:80
Qgs3DMapExportSettings::terrainExportEnabled
bool terrainExportEnabled() const
Returns whether terrain export is enabled.
Definition
qgs3dmapexportsettings.h:75
Qgs3DMapExportSettings::sceneName
QString sceneName() const
Returns the scene name.
Definition
qgs3dmapexportsettings.h:41
Qgs3DMapExportSettings::smoothEdges
bool smoothEdges() const
Returns whether triangles edges will look smooth.
Definition
qgs3dmapexportsettings.h:47
Qgs3DMapExportSettings::exportTextures
bool exportTextures() const
Returns whether textures will be exported.
Definition
qgs3dmapexportsettings.h:51
Qgs3DMapExportSettings::Qgs3DMapExportSettings
Qgs3DMapExportSettings()
Constructor.
Definition
qgs3dmapexportsettings.cpp:25
Qgs3DMapExportSettings::exportFormat
Qgis::Export3DSceneFormat exportFormat() const
Returns the export format for the 3D scene.
Definition
qgs3dmapexportsettings.h:60
qgis.h
Generated on
for QGIS API Documentation by
1.17.0