j3d.org Code

org.j3d.geom.particle
Class ParticleSystemManager

java.lang.Object
  extended by org.j3d.geom.particle.ParticleSystemManager

public class ParticleSystemManager
extends java.lang.Object

The ParticleSystemManager is a simple manager that controls all of the available particle systems as a single set of updates.

The manager needs to have a clock ticking it to drive the updates of the managed particles. It has a List of registered ParticleSystems and calls the update method on each whenever it is triggered.

Version:
$Revision: 2.1 $
Author:
Daniel Selman

Field Summary
protected  ErrorReporter errorReporter
          Local reporter to put errors in
 
Constructor Summary
ParticleSystemManager()
          Create a new manager, with no systems registered.
 
Method Summary
 void addParticleSystem(ParticleSystem system)
          Add a new particle system to this manager.
 void removeParticleSystem(ParticleSystem system)
          Remove a system from this manager.
 void setErrorReporter(ErrorReporter reporter)
          Register an error reporter with the object so that any errors generated by the object can be reported in a nice, pretty fashion.
 void update()
          Update the registered particle systems now.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errorReporter

protected ErrorReporter errorReporter
Local reporter to put errors in

Constructor Detail

ParticleSystemManager

public ParticleSystemManager()
Create a new manager, with no systems registered.

Method Detail

setErrorReporter

public void setErrorReporter(ErrorReporter reporter)
Register an error reporter with the object so that any errors generated by the object can be reported in a nice, pretty fashion. Setting a value of null will clear the currently set reporter. If one is already set, the new value replaces the old.

Parameters:
reporter - The instance to use or null

update

public void update()
Update the registered particle systems now. If any registered systems have completed their function, they will be automatically removed.


addParticleSystem

public void addParticleSystem(ParticleSystem system)
Add a new particle system to this manager. No checks are made for duplications.

Parameters:
system - The new system to add to the manager

removeParticleSystem

public void removeParticleSystem(ParticleSystem system)
Remove a system from this manager. If the system is not currently registered, the request is silently ignored.

Parameters:
system - The system instance to remove

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org