Packageorg.flintparticles.common.renderers
Classpublic class RendererBase
InheritanceRendererBase Inheritance Object
Implements Renderer

The base class used by all the Flint renderers. This class manages various aspects of the rendering process.

The class will add every emitter it should renderer to it's internal array of emitters. It will listen for the appropriate events on the emitter and will then call the protected methods addParticle, removeParticle and renderParticles at the appropriate times. Many derived classes need only implement these three methods to manage the rendering of the particles.



Public Properties
 PropertyDefined By
  emitters : Vector.<Emitter>
The array of all emitters being rendered by this renderer.
RendererBase
Public Methods
 MethodDefined By
  
The constructor creates a RendererBase class.
RendererBase
  
addEmitter(emitter:Emitter):void
Adds the emitter to the renderer.
RendererBase
  
removeEmitter(emitter:Emitter):void
Removes the emitter from the renderer.
RendererBase
Protected Methods
 MethodDefined By
  
addParticle(particle:Particle):void
The addParticle method is called when a particle is added to one of the emitters that is being rendered by this renderer.
RendererBase
  
removeParticle(particle:Particle):void
The removeParticle method is called when a particle is removed from one of the emitters that is being rendered by this renderer.
RendererBase
  
renderParticles(particles:Array):void
The renderParticles method is called during the render phase of every frame if the state of one of the emitters being rendered by this renderer has changed.
RendererBase
Property Detail
emittersproperty
emitters:Vector.<Emitter>

The array of all emitters being rendered by this renderer.


Implementation
    public function get emitters():Vector.<Emitter>
    public function set emitters(value:Vector.<Emitter>):void
Constructor Detail
RendererBase()Constructor
public function RendererBase()

The constructor creates a RendererBase class.

Method Detail
addEmitter()method
public function addEmitter(emitter:Emitter):void

Adds the emitter to the renderer. When an emitter is added, the renderer invalidates its display so the renderParticles method will be called on the next render event in the frame update.

Parameters

emitter:Emitter — The emitter that is added to the renderer.

addParticle()method 
protected function addParticle(particle:Particle):void

The addParticle method is called when a particle is added to one of the emitters that is being rendered by this renderer.

Parameters

particle:Particle — The particle.

removeEmitter()method 
public function removeEmitter(emitter:Emitter):void

Removes the emitter from the renderer. When an emitter is removed, the renderer invalidates its display so the renderParticles method will be called on the next render event in the frame update.

Parameters

emitter:Emitter — The emitter that is removed from the renderer.

removeParticle()method 
protected function removeParticle(particle:Particle):void

The removeParticle method is called when a particle is removed from one of the emitters that is being rendered by this renderer.

Parameters

particle:Particle — The particle.

renderParticles()method 
protected function renderParticles(particles:Array):void

The renderParticles method is called during the render phase of every frame if the state of one of the emitters being rendered by this renderer has changed.

Parameters

particles:Array — The particles being managed by all the emitters being rendered by this renderer. The particles are in no particular order.