QTextureImageData Class
(Qt3DRender::QTextureImageData)QTextureImageData stores data representing a texture. 更多...
头文件: | #include <QTextureImageData> |
qmake: | QT += 3drender |
开始支持版本: | Qt 5.5 |
公有函数
QTextureImageData() | |
void | cleanup() |
QByteArray | data(int layer = 0, int face = 0, int mipmapLevel = 0) const |
int | depth() const |
int | faces() const |
QOpenGLTexture::TextureFormat | format() const |
int | height() const |
bool | isCompressed() const |
int | layers() const |
int | mipLevels() const |
QOpenGLTexture::PixelFormat | pixelFormat() const |
QOpenGLTexture::PixelType | pixelType() const |
void | setData(const QByteArray &data, int blockSize, bool isCompressed = false) |
void | setDepth(int depth) |
void | setFaces(int faces) |
void | setFormat(QOpenGLTexture::TextureFormat format) |
void | setHeight(int height) |
void | setImage(const QImage &image) |
void | setLayers(int layers) |
void | setMipLevels(int mipLevels) |
void | setPixelFormat(QOpenGLTexture::PixelFormat pixelFormat) |
void | setPixelType(QOpenGLTexture::PixelType pixelType) |
void | setTarget(QOpenGLTexture::Target target) |
void | setWidth(int width) |
QOpenGLTexture::Target | target() const |
int | width() const |
QTextureImageData & | operator=(const QTextureImageData &other) |
详细描述
QTextureImageData stores data representing a texture.
成员函数
QTextureImageData::QTextureImageData()
Constructs a new Qt3DRender::QTextureImageData.
void QTextureImageData::cleanup()
Remove stored texture data and return the object to its initial state
QByteArray QTextureImageData::data(int layer = 0, int face = 0, int mipmapLevel = 0) const
Returns the raw image data for the texture at layer layer, face face and mipmapLevel mipmapLevel
参见 setData().
int QTextureImageData::depth() const
Returns the depth of the stored texture
参见 setDepth().
int QTextureImageData::faces() const
Returns the number of faces in the stored texture
参见 setFaces().
QOpenGLTexture::TextureFormat QTextureImageData::format() const
Returns the format of the stored texture
参见 setFormat().
int QTextureImageData::height() const
Returns the height of the stored texture
参见 setHeight().
bool QTextureImageData::isCompressed() const
Returns true if the stored texture is in a compressed format
int QTextureImageData::layers() const
Returns the number of layers in the stored texture
参见 setLayers().
int QTextureImageData::mipLevels() const
Returns the number of mip levels in the stored texture
参见 setMipLevels().
QOpenGLTexture::PixelFormat QTextureImageData::pixelFormat() const
Returns the pixel format of the stored texture
参见 setPixelFormat().
QOpenGLTexture::PixelType QTextureImageData::pixelType() const
Returns the pixel type of the stored texture
参见 setPixelType().
void QTextureImageData::setData(const QByteArray &data, int blockSize, bool isCompressed = false)
Store the data data with blocksize blockSize and if the data to be stored is compressed isCompressed
参见 data().
void QTextureImageData::setDepth(int depth)
Sets the depth to depth. setDepth
参见 depth().
void QTextureImageData::setFaces(int faces)
Sets the faces to faces. setFaces
参见 faces().
void QTextureImageData::setFormat(QOpenGLTexture::TextureFormat format)
Sets the format to format.
参见 format().
void QTextureImageData::setHeight(int height)
Sets the height to height. setHeight
参见 height().
void QTextureImageData::setImage(const QImage &image)
Copies the image image as raw data within this object
void QTextureImageData::setLayers(int layers)
Sets the layers to layers. setLayers
参见 layers().
void QTextureImageData::setMipLevels(int mipLevels)
Sets the mip levels to mipLevels. setMipLevels
参见 mipLevels().
void QTextureImageData::setPixelFormat(QOpenGLTexture::PixelFormat pixelFormat)
Sets the pixel format to pixelFormat. setPixelFormat
参见 pixelFormat().
void QTextureImageData::setPixelType(QOpenGLTexture::PixelType pixelType)
Sets the pixel type to pixelType setPixelType
参见 pixelType().
void QTextureImageData::setTarget(QOpenGLTexture::Target target)
Sets the target to target. target
参见 target().
void QTextureImageData::setWidth(int width)
Sets the width to width. setWidth
参见 width().
QOpenGLTexture::Target QTextureImageData::target() const
Returns the target for the stored texture
参见 setTarget().
int QTextureImageData::width() const
Returns the width of the stored texture
参见 setWidth().
QTextureImageData &QTextureImageData::operator=(const QTextureImageData &other)
Copy-assignment operator.