Kuesa::Qt3D::AbstractAssetCollection¶
Module: Kuesa Qt 3D API
An abstract base class for managing collections of assets in 3d models. More...
#include <Kuesa/Qt3D/api/collections/abstractassetcollection.h>
Inherits from Qt3DCore::QNode
Inherited by Kuesa::Qt3D::AnimationClipCollection, Kuesa::Qt3D::AnimationMappingCollection, Kuesa::Qt3D::ArmatureCollection, Kuesa::Qt3D::CameraCollection, Kuesa::Qt3D::EffectCollection, Kuesa::Qt3D::EntityCollection, Kuesa::Qt3D::LayerCollection, Kuesa::Qt3D::LightCollection, Kuesa::Qt3D::MaterialCollection, Kuesa::Qt3D::MeshCollection, Kuesa::Qt3D::PlaceholderCollection, Kuesa::Qt3D::ReflectionPlaneCollection, Kuesa::Qt3D::SkeletonCollection, Kuesa::Qt3D::TextureCollection, Kuesa::Qt3D::TextureImageCollection, Kuesa::Qt3D::TransformCollection
Public Signals¶
Name | |
---|---|
void | namesChanged() |
void | sizeChanged() |
void | assetAdded(const QString & name) |
Public Functions¶
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¶
Name | |
---|---|
AbstractAssetCollection(Qt3DCore::QNode * parent =nullptr) | |
void | addAsset(const QString & name, Qt3DCore::QNode * asset) |
Public Properties¶
Name | |
---|---|
QStringList | names |
int | size |
Detailed Description¶
1 |
|
An abstract base class for managing collections of assets in 3d models.
Since: Kuesa 2.0
Kuesa::Qt3D::AbstractAssetCollection is an abstract class used to implement collections of shared assets in 3d models.
It manages a set of QNode derived classes, each associated with a unique name.
Assets can be added and removed. Assets which do not have a valid parent will be reparented to the asset collection.
If no asset can be found for a given name, nullptr will be returned.
If a new asset is added with a name matching that of an already existing asset in the collection, the existing asset will be replaced with the new one, the old one will be removed.
When an asset referenced by the collection is destroyed, it will automatically be removed from the collection.
Removing an asset from the collection also results in the asset being destroyed if the asset's parent is the collection itself.
Public Signals Documentation¶
signal namesChanged¶
1 |
|
signal sizeChanged¶
1 |
|
signal assetAdded¶
1 2 3 |
|
Public Functions Documentation¶
function ~AbstractAssetCollection¶
1 |
|
function names¶
1 |
|
function size¶
1 |
|
function contains¶
1 2 3 |
|
Returns true if the name name exists in the collection
function contains¶
1 2 3 |
|
Returns true if the asset asset exists in the collection
function findAsset¶
1 2 3 |
|
function remove¶
1 2 3 |
|
Removes the asset corresponding to name, if it exists
function clear¶
1 |
|
Removes all assets from the collection
Protected Functions Documentation¶
function AbstractAssetCollection¶
1 2 3 |
|
function addAsset¶
1 2 3 4 |
|
Public Property Documentation¶
property names¶
1 |
|
Holds the list of names for the currently managed assets.
property size¶
1 |
|
Updated on 2023-07-03 at 11:02:09 +0000