QSkyboxEntity Class
(Qt3DExtras::QSkyboxEntity)Qt3DExtras::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 |
Inherits: | Qt3DCore::QEntity |
Properties
- baseName : QString
- extension : QString
- gammaCorrect : bool
- 3 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject
Public Functions
QSkyboxEntity(Qt3DCore::QNode *parent = nullptr) | |
QString | baseName() const |
QString | extension() const |
bool | isGammaCorrectEnabled() const |
- 4 public functions inherited from Qt3DCore::QEntity
- 13 public functions inherited from Qt3DCore::QNode
- 31 public functions inherited from QObject
Public Slots
void | setBaseName(const QString &baseName) |
void | setExtension(const QString &extension) |
void | setGammaCorrectEnabled(bool enabled) |
- 3 public slots inherited from Qt3DCore::QNode
- 1 public slot inherited from QObject
Signals
void | baseNameChanged(const QString &path) |
void | extensionChanged(const QString &extension) |
void | gammaCorrectEnabledChanged(bool enabled) |
- 4 signals inherited from Qt3DCore::QNode
- 2 signals inherited from QObject
Static Public Members
const QMetaObject | staticMetaObject |
- 9 static public members inherited from QObject
Additional Inherited Members
- 2 protected functions inherited from Qt3DCore::QNode
- 9 protected functions inherited from QObject
Detailed Description
Qt3DExtras::QSkyboxEntity is a convenience Qt3DCore::QEntity subclass that can be used to insert a skybox in a 3D scene.
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.
Property Documentation
baseName : QString
Contains the base name of the Skybox.
Access functions:
QString | baseName() const |
void | setBaseName(const QString &baseName) |
Notifier signal:
void | baseNameChanged(const QString &path) |
extension : QString
Contains the extension of the filename for the skybox image, including the leading '.'.
The default value is: .png
Access functions:
QString | extension() const |
void | setExtension(const QString &extension) |
Notifier signal:
void | extensionChanged(const QString &extension) |
gammaCorrect : bool
A boolean indicating whether gamma correction is enabled.
Access functions:
bool | isGammaCorrectEnabled() const |
void | setGammaCorrectEnabled(bool enabled) |
Notifier signal:
void | gammaCorrectEnabledChanged(bool enabled) |
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.
Note: Getter function for property baseName.
See also setBaseName().
QString QSkyboxEntity::extension() const
Returns the extension
Note: Getter function for property 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.
Note: Getter function for property gammaCorrect.
[slot]
void QSkyboxEntity::setBaseName(const QString &baseName)
Sets the base name to baseName.
Note: Setter function for property baseName.
See also baseName().
[slot]
void QSkyboxEntity::setExtension(const QString &extension)
Sets the extension to extension.
Note: Setter function for property extension.
See also extension().
[slot]
void QSkyboxEntity::setGammaCorrectEnabled(bool enabled)
Sets the gamma correction enable state to enabled.
This function was introduced in Qt 5.9.
Note: Setter function for property gammaCorrect.
See also isGammaCorrectEnabled().
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.12/qt3dextras-qskyboxentity.html