QGIS API Documentation 4.1.0-Master (9af12b5a203)
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"
21#include "qgsskyboxentity.h"
22
23#include <QMap>
24#include <QString>
25
26#define SIP_NO_FILE
27
29class QDomElement;
30
31// this is broken for z-up coordinate system
32#define ENABLE_PANORAMIC_SKYBOX 0
33
41{
42 public:
43 QgsSkyboxSettings() = default;
46
48 QgsSkyboxSettings *clone() const override SIP_FACTORY;
49
51 void readXml( const QDomElement &element, const QgsReadWriteContext &context ) override;
53 void writeXml( QDomElement &element, const QgsReadWriteContext &context ) const override;
54
55#if ENABLE_PANORAMIC_SKYBOX
57 QString panoramicTexturePath() const { return mPanoramicTexturePath; }
59 void setPanoramicTexturePath( const QString &texturePath ) { mPanoramicTexturePath = texturePath; }
60#endif
61
66 QMap<QString, QString> cubeMapFacesPaths() const { return mCubeMapFacesPaths; }
67
72 void setCubeMapFace( const QString &face, const QString &path ) { mCubeMapFacesPaths[face] = path; }
73
80 Qgis::SkyboxCubeMapping cubeMapping() const;
81
88 void setCubeMapping( Qgis::SkyboxCubeMapping mapping );
89
90 private:
91#if ENABLE_PANORAMIC_SKYBOX
92 QString mPanoramicTexturePath;
93#endif
94
96 QMap<QString, QString> mCubeMapFacesPaths;
97};
98
99#endif // QGSSKYBOXSETTINGS_H
Map3DBackgroundType
Background types for 3D map view.
Definition qgis.h:4415
@ DistinctTextureSkybox
Skybox with 6 distinct textures for different faces.
Definition qgis.h:4418
SkyboxCubeMapping
Skybox texture cube mapping for distinct texture skyboxes.
Definition qgis.h:4428
@ NativeZUp
Textures exported for Z-up (+X Right, +Y Forward, +Z Up).
Definition qgis.h:4429
Base class for all background settings classes used in a 3D map view.
virtual QgsAbstract3DMapBackgroundSettings * clone() const =0
Returns a deep copy of this background settings object.
A container for the context for various read/write operations on objects.
Contains the configuration of a skybox entity.
QgsSkyboxSettings()=default
QMap< QString, QString > cubeMapFacesPaths() const
Returns a map containing the path of each texture specified by the user.
Qgis::Map3DBackgroundType type() const override
Returns the unique type for this background settings class.
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...
#define SIP_FACTORY
Definition qgis_sip.h:83