QAbstractTextureImage Class

class Qt3DRender ::QAbstractTextureImage

Encapsulates the necessary information to create an OpenGL texture image. 更多...

头: #include <QAbstractTextureImage>
qmake: QT += 3drender
Since: Qt 5.5
实例化: AbstractTextureImage
继承: Qt3DCore::QNode
继承者:

Qt3DRender::QPaintedTextureImage and Qt3DRender::QTextureImage

该类在 Qt 5.5 引入。

特性

公共函数

QAbstractTextureImage (Qt3DCore::QNode * parent = nullptr)
QAbstractTexture::CubeMapFace face () const
int layer () const
int mipLevel () const

公共槽

void setFace (QAbstractTexture::CubeMapFace face )
void setLayer (int layer )
void setMipLevel (int level )

信号

void faceChanged (QAbstractTexture::CubeMapFace face )
void layerChanged (int layer )
void mipLevelChanged (int mipLevel )

保护函数

virtual Qt3DRender::QTextureImageDataGeneratorPtr dataGenerator () const = 0
void notifyDataGeneratorChanged ()

详细描述

QAbstractTextureImage should be used as the means of providing image data to a QAbstractTexture . It contains the necessary information: mipmap level, layer, cube face load at the proper place data into an OpenGL texture.

The actual data is provided through a QTextureImageDataGenerator that will be executed by Aspect jobs in the backend. QAbstractTextureImage should be subclassed to provide a functor and eventual additional properties needed by the functor to load actual data.

注意: : QAbstractTextureImage should never be shared. Expect crashes, undefined behavior at best if this rule is not respected.

特性文档编制

face : Qt3DRender::QAbstractTexture::CubeMapFace

Holds the cube map face of the texture image.

注意: The cube map face has a meaning only for TargetCubeMap and TargetCubeMapArray .

访问函数:

QAbstractTexture::CubeMapFace face () const
void setFace (QAbstractTexture::CubeMapFace face )

通知程序信号:

void faceChanged (QAbstractTexture::CubeMapFace face )

layer : int

Returns the layer of the texture image.

访问函数:

int layer () const
void setLayer (int layer )

通知程序信号:

void layerChanged (int layer )

mipLevel : int

Holds the mipmap level of the texture image.

访问函数:

int mipLevel () const
void setMipLevel (int level )

通知程序信号:

void mipLevelChanged (int mipLevel )

成员函数文档编制

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

Constructs a new QAbstractTextureImage instance with parent 作为父级。

[slot] void QAbstractTextureImage:: setFace ( QAbstractTexture::CubeMapFace face )

Sets the texture image face to face . face

注意: setter 函数对于特性 face .

另请参阅 face ().

[slot] void QAbstractTextureImage:: setLayer ( int layer )

Sets the layer of a texture to layer . layer

注意: setter 函数对于特性 layer .

另请参阅 layer ().

[slot] void QAbstractTextureImage:: setMipLevel ( int level )

Sets the mip level of a texture to level . level

注意: setter 函数对于特性 mipLevel .

另请参阅 mipLevel ().

[pure virtual protected] Qt3DRender::QTextureImageDataGeneratorPtr QAbstractTextureImage:: dataGenerator () const

Implement this method to return the QTextureImageDataGeneratorPtr instance, which will provide the data for the texture image.

[protected] void QAbstractTextureImage:: notifyDataGeneratorChanged ()

Triggers an update of the data generator that is sent to the backend.