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; }
101 Qgis::SkyboxType type()
const override {
return Qgis::SkyboxType::Panoramic; }
104 void reloadTexture();
107 QString mTexturePath;
108 Qt3DRender::QTextureLoader *mLoadedTexture =
nullptr;
109 Qt3DRender::QShaderProgram *mGlShader =
nullptr;
127 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
133 void reloadTexture();
136 struct FaceTransformation
139 bool mirrorHorizontal =
false;
140 bool mirrorVertical =
false;
143 QMap<Qt3DRender::QTextureCubeMap::CubeMapFace, FaceTransformation> generateFaceTransformation()
const;
153 Qt3DRender::QShaderProgram *mGlShader =
nullptr;
154 QVector<Qt3DRender::QAbstractTextureImage *> mFacesTextureImages;
155 Qt3DRender::QTextureCubeMap *mCubeMap =
nullptr;
SkyboxCubeMapping
Skybox texture cube mapping for distinct texture skyboxes.
@ NativeZUp
Textures exported for Z-up (+X Right, +Y Forward, +Z Up).
SkyboxType
Skybox types for 3D scenes.
Qgis::SkyboxType type() const override
Returns the type of the skybox.
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::SkyboxType type() const =0
Returns the type of the skybox.
Qt3DExtras::QCuboidMesh * mMesh
Qt3DRender::QParameter * mTextureParameter
Qt3DRender::QMaterial * mMaterial
Qt3DRender::QTechnique * mGl3Technique