QSkyboxEntity Class
class Qt3DExtras::QSkyboxEntityQt3DExtras::QSkyboxEntity is a convenience Qt3DCore::QEntity subclass that can be used to insert a skybox in a 3D scene. More...
Header: | #include <Qt3DExtras/QSkyboxEntity> |
qmake: | QT += 3dextras |
Since: | Qt 5.5 |
Instantiated By: | SkyboxEntity |
Inherits: | Qt3DCore::QEntity |
This class was introduced in Qt 5.5.
Public Functions
QSkyboxEntity(Qt3DCore::QNode *parent = nullptr) | |
QString | baseName() const |
QString | extension() const |
bool | isGammaCorrectEnabled() const |
void | setBaseName(const QString &baseName) |
void | setExtension(const QString &extension) |
void | setGammaCorrectEnabled(bool enabled) |
Detailed Description
By specifying a base name and an extension, Qt3DExtras::QSkyboxEntity will take care of building a TextureCubeMap to be rendered at runtime. The images in the source directory should match the pattern: base name + * "_posx|_posy|_posz|_negx|_negy|_negz" + extension
By default the extension defaults to .png.
Be sure to disable frustum culling in the FrameGraph through which the skybox rendering happens.
Note: Please note that you shouldn't try to render a skybox with an orthographic projection.
Member Function Documentation
QSkyboxEntity::QSkyboxEntity(Qt3DCore::QNode *parent = nullptr)
Constructs a new Qt3DExtras::QSkyboxEntity object with parent as parent.
QString QSkyboxEntity::baseName() const
Returns the base name of the Skybox.
See also setBaseName().
QString QSkyboxEntity::extension() const
Returns the extension
See also setExtension().
bool QSkyboxEntity::isGammaCorrectEnabled() const
Returns true if gamma correction is enabled for this skybox.
This function was introduced in Qt 5.9.
void QSkyboxEntity::setBaseName(const QString &baseName)
Sets the base name to baseName.
See also baseName().
void QSkyboxEntity::setExtension(const QString &extension)
Sets the extension to extension.
See also extension().
void QSkyboxEntity::setGammaCorrectEnabled(bool enabled)
Sets the gamma correction enable state to enabled.
This function was introduced in Qt 5.9.
See also isGammaCorrectEnabled().