A collection of assets of type Qt3DRender::QEffect. More...
Header: | #include <Kuesa/EffectCollection> |
Since: | Kuesa 1.0 |
Inherits: | Kuesa::AbstractAssetCollection |
This class was introduced in Kuesa 1.0.
Qt3DRender::QEffect * | addEffect(const QString &name, const QString &id, const QVariantMap &properties) |
void | registerType(const QString &id, Kuesa::EffectCreator f) |
void | unregisterType(const QString &id) |
Kuesa::EffectCollection manages a set of Qt3DRender::QEffect assets.
It also works as a factory and provides a way of creating instances of effects based on a unique key.
Factory functions are created by calling EffectCollection::registerType.
These functions are used to create specific instances of QEffect derived class when calling EffectCollection::addEffect.
Creates a new instance of an asset using a previously registered factory method.
id is used to find the appropriate factory. Once the effect is created, the content of the properties map will be assigned on the new effect. The effect is then added to the collection and returned to the caller.
Any pre-existing effect with the same name will be deleted.
Register a new functor with the factory.
The functor f can be any callable function that returns an new QEffect (or derived) instance.
The registered id should be passed to EffectCollection::addEffect for the functor to be invoked.
Removes a previous registered functor with identified id from the factory.