QSkyboxEntity Class

( Qt3DExtras::QSkyboxEntity )

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

头: #include <Qt3DExtras/QSkyboxEntity>
qmake: QT += 3dextras
Since: Qt 5.5
继承: Qt3DCore::QEntity

特性

公共函数

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 )

信号

void baseNameChanged (const QString & path )
void extensionChanged (const QString & extension )
void gammaCorrectEnabledChanged (bool enabled )

额外继承成员

详细描述

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.

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

特性文档编制

baseName : QString

Contains the base name of the Skybox.

访问函数:

QString baseName () const
void setBaseName (const QString & baseName )

通知程序信号:

void baseNameChanged (const QString & path )

extension : QString

Contains the extension of the Skybox.

访问函数:

QString extension () const
void setExtension (const QString & extension )

通知程序信号:

void extensionChanged (const QString & extension )

gammaCorrect : bool

A boolean indicating whether gamma correction is enabled.

访问函数:

bool isGammaCorrectEnabled () const
void setGammaCorrectEnabled (bool enabled )

通知程序信号:

void gammaCorrectEnabledChanged (bool enabled )

成员函数文档编制

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

Default constructs an instance of QSkyboxEntity.

QString QSkyboxEntity:: baseName () const

Returns the base name of the Skybox.

注意: Getter 函数对于特性 baseName .

另请参阅 setBaseName ().

QString QSkyboxEntity:: extension () const

Returns the extension

注意: Getter 函数对于特性 extension .

另请参阅 setExtension ().

bool QSkyboxEntity:: isGammaCorrectEnabled () const

Returns true if gamma correction is enabled for this skybox.

该函数在 Qt 5.9 引入。

注意: Getter 函数对于特性 gammaCorrect .

[slot] void QSkyboxEntity:: setBaseName (const QString & baseName )

Sets the base name to baseName .

注意: Setter 函数对于特性 baseName .

另请参阅 baseName ().

[slot] void QSkyboxEntity:: setExtension (const QString & extension )

Sets the extension to extension .

注意: Setter 函数对于特性 extension .

另请参阅 extension ().

[slot] void QSkyboxEntity:: setGammaCorrectEnabled ( bool enabled )

Sets the gamma correction enable state to enabled .

该函数在 Qt 5.9 引入。

注意: Setter 函数对于特性 gammaCorrect .

另请参阅 isGammaCorrectEnabled ().