QGIS API Documentation 4.1.0-Master (01362494303)
Loading...
Searching...
No Matches
qgsskyboxsettings.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsskyboxsettings.h
3 --------------------------------------
4 Date : August 2020
5 Copyright : (C) 2020 by Belgacem Nedjima
6 Email : gb uderscore 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 QGSSKYBOXSETTINGS_H
17#define QGSSKYBOXSETTINGS_H
18
19#include "qgis_3d.h"
20#include "qgsskyboxentity.h"
21
22#include <QMap>
23#include <QString>
24
25#define SIP_NO_FILE
26
28class QDomElement;
29
30// this is broken for z-up coordinate system
31#define ENABLE_PANORAMIC_SKYBOX 0
32
39class _3D_EXPORT QgsSkyboxSettings
40{
41 public:
42 QgsSkyboxSettings() = default;
45
47 void readXml( const QDomElement &element, const QgsReadWriteContext &context );
49 void writeXml( QDomElement &element, const QgsReadWriteContext &context ) const;
50
52 Qgis::SkyboxType skyboxType() const { return mSkyboxType; }
54 void setSkyboxType( Qgis::SkyboxType type ) { mSkyboxType = type; }
55
56#if ENABLE_PANORAMIC_SKYBOX
58 QString panoramicTexturePath() const { return mPanoramicTexturePath; }
60 void setPanoramicTexturePath( const QString &texturePath ) { mPanoramicTexturePath = texturePath; }
61#endif
62
67 QMap<QString, QString> cubeMapFacesPaths() const { return mCubeMapFacesPaths; }
68
73 void setCubeMapFace( const QString &face, const QString &path ) { mCubeMapFacesPaths[face] = path; }
74
81 Qgis::SkyboxCubeMapping cubeMapping() const;
82
89 void setCubeMapping( Qgis::SkyboxCubeMapping mapping );
90
91 private:
93
94#if ENABLE_PANORAMIC_SKYBOX
95 QString mPanoramicTexturePath;
96#endif
97
99 QMap<QString, QString> mCubeMapFacesPaths;
100};
101
102#endif // QGSSKYBOXSETTINGS_H
SkyboxCubeMapping
Skybox texture cube mapping for distinct texture skyboxes.
Definition qgis.h:4385
@ NativeZUp
Textures exported for Z-up (+X Right, +Y Forward, +Z Up).
Definition qgis.h:4386
SkyboxType
Skybox types for 3D scenes.
Definition qgis.h:4372
@ DistinctTextures
Cube map built from distinct textures.
Definition qgis.h:4373
A container for the context for various read/write operations on objects.
QgsSkyboxSettings()=default
QMap< QString, QString > cubeMapFacesPaths() const
Returns a map containing the path of each texture specified by the user.
Qgis::SkyboxType skyboxType() const
Returns the type of the skybox.
void readXml(const QDomElement &element, const QgsReadWriteContext &context)
Reads settings from a DOM element.
void setSkyboxType(Qgis::SkyboxType type)
Sets the type of the skybox.
QgsSkyboxSettings & operator=(QgsSkyboxSettings const &rhs)
void setCubeMapFace(const QString &face, const QString &path)
Sets a face of one of the skybox 6 textures The face parameter needs to be one of the followings: "po...
void writeXml(QDomElement &element, const QgsReadWriteContext &context) const
Writes settings to a DOM element.