Skip to content

Kuesa::Qt3D::MeshCollection

Module: Kuesa Qt 3D API

A collection of assets of type QGeometryRenderer. More...

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

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

Public Functions

Name
MeshCollection(Qt3DCore::QNode * parent =nullptr)
~MeshCollection()
Qt3DRender::QMesh * 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::MeshCollection;

A collection of assets of type QGeometryRenderer.

Since: Kuesa 2.0

Kuesa::Qt3D::MeshCollection manages a set of QGeometryRenderer assets.

Public Functions Documentation

function MeshCollection

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

function ~MeshCollection

1
~MeshCollection()

function add

1
2
3
4
Qt3DRender::QMesh * 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::QMesh 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:09 +0000