IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QSkyboxEntity Class

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

This class was introduced in Qt 5.5.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QSkyboxEntity Class

  • Header: Qt3DExtras/QSkyboxEntity

  • Since: Qt 5.5

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS 3dextras)

    target_link_libraries(mytarget PRIVATE Qt6::3dextras)

  • qmake: QT += 3dextras

  • Inherited By:

  • Instantiated By: qml-qt3d-extras-skyboxentity.xml

  • Inherits: Qt3DCore::QEntity

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.

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:

Notifier signal:

  • void baseNameChanged(const &path)

extension : QString

Contains the extension of the filename for the skybox image, including the leading '.'.

The default value is: .png

Access functions:

Notifier signal:

  • void extensionChanged(const &extension)

[since 5.9] gammaCorrect : bool

A boolean indicating whether gamma correction is enabled.

This property was introduced in Qt 5.9.

Access functions:

Notifier signal:

  • void gammaCorrectEnabledChanged(bool enabled)

Member Function Documentation

 

[explicit] 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.

Getter function for property baseName.

See Also

See also setBaseName()

QString QSkyboxEntity::extension() const

Returns the extension

Getter function for property extension.

See Also

See also setExtension()

[since 5.9] bool QSkyboxEntity::isGammaCorrectEnabled() const

Returns true if gamma correction is enabled for this skybox.

Getter function for property gammaCorrect.

This function was introduced in Qt 5.9.

void QSkyboxEntity::setBaseName(const QString &baseName)

Sets the base name to baseName.

Setter function for property baseName.

See Also

See also baseName()

void QSkyboxEntity::setExtension(const QString &extension)

Sets the extension to extension.

Setter function for property extension.

See Also

See also extension()

[since 5.9] void QSkyboxEntity::setGammaCorrectEnabled(bool enabled)

Sets the gamma correction enable state to enabled.

Setter function for property gammaCorrect.

This function was introduced in Qt 5.9.

See Also

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+