QSkyboxEntity Class


Qt3DRender::QSkyboxEntity is a convenience Qt3DCore::QEntity subclass that can be used to insert a skybox in a 3D scene. More...

Header: #include <QSkyboxEntity>
qmake: QT += 3drender
Since: Qt 5.5
Inherits: Qt3DCore::QEntity

Public Functions

QSkyboxEntity(Qt3DCore::QNode *parent = Q_NULLPTR)
QString baseName() const
QVector3D cameraPosition() const
QString extension() const
void setBaseName(const QString &baseName)
void setCameraPosition(const QVector3D &cameraPosition)
void setExtension(const QString &extension)


void cameraPositionChanged(const QVector3D &cameraPosition)
void extensionChanged(const QString &extension)
void sourceDirectoryChanged(const QString &path)

Additional Inherited Members

Detailed Description

Qt3DRender::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, Qt3DCore::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.

Note: Please note that you shouldn't try to render skybox with an orthographic projection.

Member Function Documentation

QSkyboxEntity::QSkyboxEntity(Qt3DCore::QNode *parent = Q_NULLPTR)

Default constructs an instance of QSkyboxEntity.


Destroys the instance of QSkyboxEntity.

QString QSkyboxEntity::baseName() const

Returns the base name.

See also setBaseName().

QVector3D QSkyboxEntity::cameraPosition() const

Returns the camera postion.

See also setCameraPosition().

[signal] void QSkyboxEntity::cameraPositionChanged(const QVector3D &cameraPosition)

QString QSkyboxEntity::extension() const

Returns the extension

See also setExtension().

[signal] void QSkyboxEntity::extensionChanged(const QString &extension)

void QSkyboxEntity::setBaseName(const QString &baseName)

Sets the base name to baseName.

See also baseName().

void QSkyboxEntity::setCameraPosition(const QVector3D &cameraPosition)

Sets the camera position to cameraPosition.

See also cameraPosition().

void QSkyboxEntity::setExtension(const QString &extension)

Sets the extension to extension.

See also extension().

[signal] void QSkyboxEntity::sourceDirectoryChanged(const QString &path)

© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.