Skip to content

Kuesa::Qt3D::TextureCollection

Module: Kuesa Qt 3D API

A collection of assets of type Qt3DRender::QAbstractTexture. More...

#include <Kuesa/Qt3D/api/collections/texturecollection.h>

Inherits from Kuesa::Qt3D::AbstractAssetCollection, Qt3DCore::QNode

Public Functions

Name
TextureCollection(Qt3DCore::QNode * parent =nullptr)
~TextureCollection()
Qt3DRender::QTextureLoader * 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
class Kuesa::Qt3D::TextureCollection;

A collection of assets of type Qt3DRender::QAbstractTexture.

Since: Kuesa 2.0

Kuesa::Qt3D::TextureCollection manages a set of Qt3DRender::QAbstractTexture assets.

Public Functions Documentation

function TextureCollection

1
2
3
explicit TextureCollection(
    Qt3DCore::QNode * parent =nullptr
)

function ~TextureCollection

1
~TextureCollection()

function add

1
2
3
4
Qt3DRender::QTextureLoader * add(
    const QString & name,
    const QUrl & source
)

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.

Utility method to create an instance of Qt3DRender::QTextureLoader 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 2022-10-18 at 11:12:51 +0200