16#ifndef QGSSKYBOXENTITY_H
17#define QGSSKYBOXENTITY_H
25#include <Qt3DCore/QEntity>
26#include <Qt3DRender/QTexture>
52#define ENABLE_PANORAMIC_SKYBOX 0
85 Qt3DExtras::QCuboidMesh *
mMesh =
nullptr;
91#if ENABLE_PANORAMIC_SKYBOX
105 QgsPanoramicSkyboxEntity(
const QString &texturePath, Qt3DCore::QNode *parent =
nullptr );
108 QString texturePath()
const {
return mTexturePath; }
112 void reloadTexture();
115 QString mTexturePath;
116 Qt3DRender::QTextureLoader *mLoadedTexture =
nullptr;
117 Qt3DRender::QShaderProgram *mGlShader =
nullptr;
142 bool enableEnvironmentalLighting,
143 Qt3DCore::QNode *parent =
nullptr
150 void reloadTexture();
153 struct FaceTransformation
156 bool mirrorHorizontal =
false;
157 bool mirrorVertical =
false;
160 QMap<Qt3DRender::QTextureCubeMap::CubeMapFace, FaceTransformation> generateFaceTransformation()
const;
169 bool mEnableEnvironmentalLighting =
true;
171 Qt3DRender::QShaderProgram *mGlShader =
nullptr;
172 QVector<Qt3DRender::QAbstractTextureImage *> mFacesTextureImages;
173 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).
QgsCubeFacesSkyboxEntity(Qgis::SkyboxCubeMapping mapping, const QString &posX, const QString &posY, const QString &posZ, const QString &negX, const QString &negY, const QString &negZ, bool enableEnvironmentalLighting, Qt3DCore::QNode *parent=nullptr)
Constructs a skybox from 6 different images.
Qgis::Map3DBackgroundType type() const override
Returns the background type of skybox entity.
An environment light entity.
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 void updateEnvironmentLight(QgsEnvironmentLight *light) const =0
Updates the specified environment light to match the skybox settings.
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