TexturedEmitter s.
This class facilitates emitter management and particle rendering. The emitter class must extend the TexturedBase class. However, use of the TexturedEmitter template is recommended.
New emitters must be created through the ParticleSystem::createEmitter function in order to register them with this manager. The registered emitters are automatically sorted by their texture to minimize texture switches during rendering. Manual changes to the texture setting (via the setTexture function) will disturb the ordering. The ParticleSystem::sortEmitters function should then be called after all changes have been made. Rendering will still work otherwise, but efficiency may decrease.
Public Member Functions | |
| void | clear () |
| removes and destroys all registered emitters | |
| template<class EmtT> | |
| EmtT * | createEmitter (G3D::TextureRef) |
| creates an emitter that uses the given texture | |
| ParticleSystem () | |
| void | process (const float &) |
calls ParticleEmitter::process on all registered managers | |
| void | remove (Emitter *) |
| removes an emitter from the particle system | |
| void | render (G3D::RenderDevice *) |
| renders all registered emitters | |
| void | sortEmitters () |
| sorts the registered emitters | |
| ~ParticleSystem () | |
Classes | |
| struct | Comparator |
|
|
|
|
|
|
|
|
removes and destroys all registered emitters
|
|
||||||||||
|
creates an emitter that uses the given texture
The emitter is registered with this manager and will be destroyed at manager shutdown or when
|
|
|
calls See that function for details. |
|
|
removes an emitter from the particle system The emitter will no longer be processed or cleared by this manager. It must be deleted manually. |
|
|
renders all registered emitters
|
|
|
sorts the registered emitters The emitters are sorted to ensure efficient rendering with as few texture switches as possible. Calling this function is only necessary after emitter texture settings have been changed. |
1.4.3