Detailed Description
The QGLColladaFxEffectLoader class is a convenient way to load effects from collada files for use with Qt3D.
QGLColladaFxEffectLoader provides a simple class to create and store QGLColladaEffect objects from Collada Fx files. It currently supports a simple subset of the Collada 1.5 Fx specification.
The QGLColladaEffect effects are destroyed automatically when the loader is destroyed. If finer control over effect lifetime is required, use QGLColladaFxEffectFactory::loadEffectsFromFile() directly.
Member Function Documentation
QGLColladaFxEffectLoader::QGLColladaFxEffectLoader()
Constructs an empty QGLColladaFxEffectLoader object.
QGLColladaFxEffectLoader::~QGLColladaFxEffectLoader()
Destroys the QGLColladaFxEffectLoader and any generated QGLColladaFxEffect objects.
int QGLColladaFxEffectLoader::count()
Returns the number of effects the loader has generated and stored.
QGLColladaFxEffect * QGLColladaFxEffectLoader::effect(QString effectName)
Returns a pointer to the effect with an sid matching effectName, or 0 if no such effect exists.
See also load().
QStringList QGLColladaFxEffectLoader::effectNames()
Returns a list of the sid attributes of effects that have been generated
See also effect().
bool QGLColladaFxEffectLoader::load(QString filename)
Reads the collada file indicated by filename and generates QGLColladaFxEffect objects from it.
The QGLColladaFxEffectFactory owns all the effects it generates, and destroys them when it is destroyed, or when a new file is loaded.
If effects are needed from multiple files, use one QGLColladaFxEffectLoader per file.
Returns true if at least one effect was generated.
See also effectNames(), effect(), operator[](), and QGLColladaFxEffectFactory::loadEffectsFromFile().
QGLColladaFxEffect * QGLColladaFxEffectLoader::operator[](int i)
Returns a pointer to the effect in position i. QGLColladaFxEffectLoader makes no guarantee about the ordering of effects relative to their position in a collada document, but does not reorder effects once they have been read.
See also load().