Kuesa::Qt3D::TextureImageCollection¶
Module: Kuesa Qt 3D API
A collection of assets of type Qt3DRender::QAbstractTextureImage. More...
#include <Kuesa/Qt3D/api/collections/textureimagecollection.h>
Inherits from Kuesa::Qt3D::AbstractAssetCollection, Qt3DCore::QNode
Public Functions¶
Name | |
---|---|
TextureImageCollection(Qt3DCore::QNode * parent =nullptr) | |
~TextureImageCollection() | |
Qt3DRender::QTextureImage * | add(const QString & name, const QUrl & source) |
Additional inherited members¶
Public Signals inherited from Kuesa::Qt3D::AbstractAssetCollection
Name | |
---|---|
void | namesChanged() |
void | sizeChanged() |
void | assetAdded(const QString & name) |
Public Functions inherited from Kuesa::Qt3D::AbstractAssetCollection
Name | |
---|---|
~AbstractAssetCollection() | |
QStringList | names() |
int | size() |
bool | contains(const QString & name) const |
bool | contains(Qt3DCore::QNode * asset) const |
Qt3DCore::QNode * | findAsset(const QString & name) |
void | remove(const QString & name) |
void | clear() |
Protected Functions inherited from Kuesa::Qt3D::AbstractAssetCollection
Name | |
---|---|
AbstractAssetCollection(Qt3DCore::QNode * parent =nullptr) | |
void | addAsset(const QString & name, Qt3DCore::QNode * asset) |
Public Properties inherited from Kuesa::Qt3D::AbstractAssetCollection
Name | |
---|---|
QStringList | names |
int | size |
Detailed Description¶
1 |
|
A collection of assets of type Qt3DRender::QAbstractTextureImage.
Since: Kuesa 2.0
Kuesa::Qt3D::TextureImageCollection manages a set of Qt3DRender::QAbstractTextureImage assets.
Public Functions Documentation¶
function TextureImageCollection¶
1 2 3 |
|
function ~TextureImageCollection¶
1 |
|
function add¶
1 2 3 4 |
|
Adds an asset to the collection with key name.
If the asset has no parent, it will be reparented to the collection.
If an asset is already registered with the same name, it will be removed from the collection and deleted if parented to the collection.
As of Qt 5.11, Qt3D doesn't support sharing of QAbstractTextureImage instances among several QTexture instances. It should therefore be noted that the collection should only be used as a way to reference images used by a single texture at a time.
Utility method to create an instance of Qt3DRender::QTextureImage for the source and register it in the collection with the name.
The generated instance is parented with the collection and returned to the caller.
Updated on 2023-07-03 at 11:02:11 +0000