Qt3DRender::QTextureImageData Class
class Qt3DRender::QTextureImageDataQTextureImageData 用于存储表示纹理的数据。更多内容...
| 头文件: | #include <qtextureimagedata.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
| qmake: | QT += 3drender |
| 状态: | 已弃用 |
该类已弃用。我们强烈建议不要在新代码中使用它。
公共函数
| QTextureImageData() | |
| int | alignment() const |
| 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 | setAlignment(int alignment) |
| 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::QTextureImageData()
创建一个新的Qt3DRender::QTextureImageData 。
[noexcept] int QTextureImageData::alignment() const
返回图像的对齐要求。
另请参阅 setAlignment()。
[noexcept] void QTextureImageData::cleanup()
清除存储的纹理数据,并将对象恢复到初始状态
QByteArray QTextureImageData::data(int layer = 0, int face = 0, int mipmapLevel = 0) const
返回位于图层layer 、面face 和 Mipmap 级别mipmapLevel 处的纹理的原始图像数据。
另请参阅 setData()。
[noexcept] int QTextureImageData::depth() const
返回存储纹理的深度
另请参阅 ` setDepth()`。
[noexcept] int QTextureImageData::faces() const
返回存储纹理中的面数
另请参阅 setFaces()。
[noexcept] QOpenGLTexture::TextureFormat QTextureImageData::format() const
返回存储纹理的格式。
另请参阅 setFormat()。
[noexcept] int QTextureImageData::height() const
返回存储纹理的高度
另请参阅 setHeight()。
[noexcept] bool QTextureImageData::isCompressed() const
如果存储的纹理为压缩格式,则返回 true
[noexcept] int QTextureImageData::layers() const
返回存储纹理的层数
另请参阅 setLayers()。
[noexcept] int QTextureImageData::mipLevels() const
返回存储纹理中的MIP级别数量
另请参阅 setMipLevels()。
[noexcept] QOpenGLTexture::PixelFormat QTextureImageData::pixelFormat() const
返回存储纹理的像素格式。
另请参阅 setPixelFormat()。
[noexcept] QOpenGLTexture::PixelType QTextureImageData::pixelType() const
返回存储纹理的像素类型。
另请参阅 setPixelType()。
[noexcept] void QTextureImageData::setAlignment(int alignment)
设置映像的alignment 要求。
另请参阅 alignment()。
void QTextureImageData::setData(const QByteArray &data, int blockSize, bool isCompressed = false)
存储数据data ,块大小为blockSize ;如果要存储的数据是压缩的,则为isCompressed 。
另请参阅 data()。
[noexcept] void QTextureImageData::setDepth(int depth)
将深度设置为depth 。setDepth
另请参阅 depth()。
[noexcept] void QTextureImageData::setFaces(int faces)
将面设置为faces 。setFaces
另请参阅 faces()。
[noexcept] void QTextureImageData::setFormat(QOpenGLTexture::TextureFormat format)
将格式设置为format 。
另请参阅 format()。
[noexcept] void QTextureImageData::setHeight(int height)
将高度设置为height 。setHeight
另请参阅 height()。
void QTextureImageData::setImage(const QImage &image)
将图像image 作为原始数据复制到该对象中。
[noexcept] void QTextureImageData::setLayers(int layers)
将图层设置为layers 。setLayers
另请参阅 layers()。
[noexcept] void QTextureImageData::setMipLevels(int mipLevels)
将MIP级别设置为mipLevels 。setMipLevels
另请参阅 mipLevels()。
[noexcept] void QTextureImageData::setPixelFormat(QOpenGLTexture::PixelFormat pixelFormat)
将像素格式设置为pixelFormat 。
另请参阅 pixelFormat()。
[noexcept] void QTextureImageData::setPixelType(QOpenGLTexture::PixelType pixelType)
将像素类型设置为pixelType 。
另请参阅 pixelType()。
[noexcept] void QTextureImageData::setTarget(QOpenGLTexture::Target target)
将目标设置为target 。
另请参阅 target()。
[noexcept] void QTextureImageData::setWidth(int width)
将宽度设置为width 。setWidth
另请参阅 width()。
[noexcept] QOpenGLTexture::Target QTextureImageData::target() const
返回存储纹理的目标。
另请参阅 setTarget()。
[noexcept] int QTextureImageData::width() const
返回存储纹理的宽度
另请参阅 setWidth()。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.