16#ifndef QGSSKYBOXENTITY_H
17#define QGSSKYBOXENTITY_H
25#include <Qt3DCore/QEntity>
26#include <Qt3DRender/QTexture>
50#define ENABLE_PANORAMIC_SKYBOX 0
76 Qt3DExtras::QCuboidMesh *
mMesh =
nullptr;
82#if ENABLE_PANORAMIC_SKYBOX
96 QgsPanoramicSkyboxEntity(
const QString &texturePath, Qt3DCore::QNode *parent =
nullptr );
99 QString texturePath()
const {
return mTexturePath; }
103 void reloadTexture();
106 QString mTexturePath;
107 Qt3DRender::QTextureLoader *mLoadedTexture =
nullptr;
108 Qt3DRender::QShaderProgram *mGlShader =
nullptr;
126 Qgis::SkyboxCubeMapping mapping,
const QString &posX,
const QString &posY,
const QString &posZ,
const QString &negX,
const QString &negY,
const QString &negZ, Qt3DCore::QNode *parent =
nullptr
132 void reloadTexture();
135 struct FaceTransformation
138 bool mirrorHorizontal =
false;
139 bool mirrorVertical =
false;
142 QMap<Qt3DRender::QTextureCubeMap::CubeMapFace, FaceTransformation> generateFaceTransformation()
const;
152 Qt3DRender::QShaderProgram *mGlShader =
nullptr;
153 QVector<Qt3DRender::QAbstractTextureImage *> mFacesTextureImages;
154 Qt3DRender::QTextureCubeMap *mCubeMap =
nullptr;
Map3DBackgroundType
Background types for 3D map view.
@ DistinctTextureSkybox
Skybox with 6 distinct textures for different faces.
@ NoBackground
No background.
SkyboxCubeMapping
Skybox texture cube mapping for distinct texture skyboxes.
@ NativeZUp
Textures exported for Z-up (+X Right, +Y Forward, +Z Up).
Qgis::Map3DBackgroundType type() const override
Returns the background type of skybox entity.
QgsCubeFacesSkyboxEntity(Qgis::SkyboxCubeMapping mapping, const QString &posX, const QString &posY, const QString &posZ, const QString &negX, const QString &negY, const QString &negZ, Qt3DCore::QNode *parent=nullptr)
Constructs a skybox from 6 different images.
Holds an image that can be used as a texture in the 3D view.
Base class for all skybox types.
QgsSkyboxEntity(QNode *parent=nullptr)
Constructor.
Qt3DRender::QRenderPass * mGl3RenderPass
Qt3DRender::QParameter * mGammaStrengthParameter
Qt3DRender::QFilterKey * mFilterKey
Qt3DRender::QEffect * mEffect
virtual Qgis::Map3DBackgroundType type() const =0
Returns the background type of skybox entity.
Qt3DExtras::QCuboidMesh * mMesh
Qt3DRender::QParameter * mTextureParameter
Qt3DRender::QMaterial * mMaterial
Qt3DRender::QTechnique * mGl3Technique