The QTextureData class stores texture information such as the target, height, width, depth, layers, wrap, and if mipmaps are enabled. 更多...
头: | #include <Qt3DRender/QTextureData> |
CMake: |
find_package(Qt6 COMPONENTS 3drender REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::3drender) |
qmake: | QT += 3drender |
Since: | Qt 5.7 |
QTextureData () | |
void | addImageData (const Qt3DRender::QTextureImageDataPtr & imageData ) |
QAbstractTexture::ComparisonFunction | comparisonFunction () const |
QAbstractTexture::ComparisonMode | comparisonMode () const |
int | depth () const |
QAbstractTexture::TextureFormat | format () const |
int | height () const |
QList<Qt3DRender::QTextureImageDataPtr> | imageData () const |
bool | isAutoMipMapGenerationEnabled () const |
int | layers () const |
QAbstractTexture::Filter | magnificationFilter () const |
float | maximumAnisotropy () const |
QAbstractTexture::Filter | minificationFilter () const |
void | setAutoMipMapGenerationEnabled (bool autoMipMap ) |
void | setComparisonFunction (QAbstractTexture::ComparisonFunction comparisonFunction ) |
void | setComparisonMode (QAbstractTexture::ComparisonMode comparisonMode ) |
void | setDepth (int depth ) |
void | setFormat (QAbstractTexture::TextureFormat format ) |
void | setHeight (int height ) |
void | setLayers (int layers ) |
void | setMagnificationFilter (QAbstractTexture::Filter filter ) |
void | setMaximumAnisotropy (float maximumAnisotropy ) |
void | setMinificationFilter (QAbstractTexture::Filter filter ) |
void | setTarget (QAbstractTexture::Target target ) |
void | setWidth (int width ) |
void | setWrapModeX (QTextureWrapMode::WrapMode wrapModeX ) |
void | setWrapModeY (QTextureWrapMode::WrapMode wrapModeY ) |
void | setWrapModeZ (QTextureWrapMode::WrapMode wrapModeZ ) |
QAbstractTexture::Target | target () const |
int | width () const |
QTextureWrapMode::WrapMode | wrapModeX () const |
QTextureWrapMode::WrapMode | wrapModeY () const |
QTextureWrapMode::WrapMode | wrapModeZ () const |
Creates a new QTextureData instance.
Adds an extra image layer to the texture using imageData .
注意: The texture image should be loaded with the size specified on the texture. However, if no size is specified, the size of the first texture image file is used as default.
Returns the current comparison function.
另请参阅 setComparisonFunction ().
Returns the current comparison mode.
另请参阅 setComparisonMode ().
Returns the texture depth.
另请参阅 setDepth ().
Returns the texture format
另请参阅 setFormat ().
Returns the texture height.
另请参阅 setHeight ().
Returns the data of the images used by this texture.
Returns whether the texture has auto mipmap generation enabled.
Returns the texture layers.
另请参阅 setLayers ().
Returns the current magnification filter.
另请参阅 setMagnificationFilter ().
Returns the current maximum anisotropy.
另请参阅 setMaximumAnisotropy ().
Returns the current minification filter.
另请参阅 setMinificationFilter ().
Sets whether the texture has automatic mipmap generation enabled, to autoMipMap .
另请参阅 isAutoMipMapGenerationEnabled ().
Sets the comparison function to comparisonFunction .
另请参阅 comparisonFunction ().
Sets the comparison mode to comparisonMode .
另请参阅 comparisonMode ().
Sets the texture depth to depth
另请参阅 depth ().
Sets the texture format to format .
另请参阅 format ().
Sets the target height to height .
另请参阅 height ().
Sets the texture layers to layers .
另请参阅 layers ().
Sets the magnification filter to filter .
另请参阅 magnificationFilter ().
Sets the maximum anisotropy to maximumAnisotropy .
另请参阅 maximumAnisotropy ().
Sets the minification filter to filter .
另请参阅 minificationFilter ().
Sets the target texture to target .
另请参阅 target ().
Sets the texture width to width .
另请参阅 width ().
Sets the wrap mode X to wrapModeX .
另请参阅 wrapModeX ().
Sets the wrap mode Y to wrapModeY .
另请参阅 wrapModeY ().
Sets the wrap mode Z to wrapModeZ .
另请参阅 wrapModeZ ().
Returns the texture data target.
另请参阅 setTarget ().
Returns the texture width.
另请参阅 setWidth ().
Returns the current wrap mode X.
另请参阅 setWrapModeX ().
Returns the current wrap mode Y.
另请参阅 setWrapModeY ().
Returns the current wrap mode Z.
另请参阅 setWrapModeZ ().