QAbstractTextureImage Class

(Qt3DRender::QAbstractTextureImage)

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

头文件: #include <QAbstractTextureImage>
qmake: QT += 3drender
开始支持版本: Qt 5.5
Instantiated By: AbstractTextureImage
基类: Qt3DCore::QNode
派生类:

Qt3DRender::QPaintedTextureImage and Qt3DRender::QTextureImage

属性

公有函数

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)

受保护的函数

QAbstractTextureImage(QAbstractTextureImagePrivate &dd, Qt3DCore::QNode *parent = nullptr)
virtual QTextureImageDataGeneratorPtr dataGenerator() const = 0
void notifyDataGeneratorChanged()

其他继承的成员

  • 1 个公有变量继承自 QObject
  • 10 个静态公有成员继承自 QObject
  • 2 个受保护的变量继承自 QObject

详细描述

Encapsulates the necessary information to create an OpenGL texture image.

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.

Note: : 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.

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

访问函数:

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

Notifier signal:

void faceChanged(QAbstractTexture::CubeMapFace face)

layer : int

Returns the layer of the texture image.

访问函数:

int layer() const
void setLayer(int layer)

Notifier signal:

void layerChanged(int layer)

mipLevel : int

Holds the mipmap level of the texture image.

访问函数:

int mipLevel() const
void setMipLevel(int level)

Notifier signal:

void mipLevelChanged(int mipLevel)

成员函数

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

Default constructs an instance of QAbstractTextureImage.

[protected] QAbstractTextureImage::QAbstractTextureImage(QAbstractTextureImagePrivate &dd, Qt3DCore::QNode *parent = nullptr)

Copy constructor.

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

Implement this method to return the QTextureImageDataGeneratorPtr, 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.

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

Sets the texture image face to face. face

Note: Setter function for property face.

参见 face().

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

Sets the layer of a texture to layer. layer

Note: Setter function for property layer.

参见 layer().

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

Sets the mip level of a texture to level. level

Note: Setter function for property mipLevel.

参见 mipLevel().