net.jinx.physics.fountain
Class ParticleFountain

java.lang.Object
  extended by net.jinx.action.Actor
      extended by net.jinx.physics.fountain.ParticleFountain
All Implemented Interfaces:
ClockSensitive, OwnerListener, SceneListener, MultipassVisible, Visible

public class ParticleFountain
extends Actor
implements ClockSensitive, MultipassVisible, OwnerListener


Constructor Summary
ParticleFountain(java.lang.String name, Universe universe, ParticleFactory factory)
           
ParticleFountain(java.lang.String name, Universe universe, ParticleFactory factory, float releaseRate, float decayAfter)
           
ParticleFountain(java.lang.String name, Universe universe, ParticleFactory factory, ReleaseControl releaseControl, float decayAfter)
           
 
Method Summary
 void actorAdded(Actor actor, Scene scene)
          Called when an Actor has been added to the Scene.
 void actorRemoved(Actor actor, Scene scene)
          Called when an Actor has been removed from the Scene.
 void deinit(Context opt)
          Deinitializes this Visible, disposing of any resources that it may be using.
 void draw(Context opt)
          Renders this Visible to glDrawable.
 void drawPass(Context opt, Pass pass)
           
 float getDecayAfter()
           
 ReleaseControl getReleaseControl()
           
 void init(Context opt)
          Initializes this Visible, preparing it for rendering.
protected  void processEvent(ActorEvent event)
          Processes an ActorEvent.
protected  void release()
           
 void setDecayAfter(float decayAfter)
           
 void setParentUniverse(Universe parent)
           
 void setVisible(ParticleVisible visible)
           
 boolean shouldSubordinateUniverse()
           
 void subordinateUniverse(boolean subordinateUniverse)
           
 
Methods inherited from class net.jinx.action.Actor
checkAllowAdd, getName, getOwner, hashCode, ownerChanged, sendEvent, sendEvent, sendEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParticleFountain

public ParticleFountain(java.lang.String name,
                        Universe universe,
                        ParticleFactory factory)

ParticleFountain

public ParticleFountain(java.lang.String name,
                        Universe universe,
                        ParticleFactory factory,
                        float releaseRate,
                        float decayAfter)

ParticleFountain

public ParticleFountain(java.lang.String name,
                        Universe universe,
                        ParticleFactory factory,
                        ReleaseControl releaseControl,
                        float decayAfter)
Method Detail

getReleaseControl

public ReleaseControl getReleaseControl()

shouldSubordinateUniverse

public boolean shouldSubordinateUniverse()

subordinateUniverse

public void subordinateUniverse(boolean subordinateUniverse)

actorAdded

public void actorAdded(Actor actor,
                       Scene scene)
Description copied from interface: SceneListener
Called when an Actor has been added to the Scene. It is also called once for each actor when the Listener is added to the Scene.

Specified by:
actorAdded in interface SceneListener
Parameters:
actor - the Actor that has been added.
scene - the Scene that this event came from.

actorRemoved

public void actorRemoved(Actor actor,
                         Scene scene)
Description copied from interface: SceneListener
Called when an Actor has been removed from the Scene. It is also called once for each actor when the Listener is removed from the Scene.

Specified by:
actorRemoved in interface SceneListener
Parameters:
actor - the Actor that has been removed.
scene - the Scene that this event came from.

setParentUniverse

public void setParentUniverse(Universe parent)

processEvent

protected void processEvent(ActorEvent event)
Description copied from class: Actor
Processes an ActorEvent. This is what most Actor objects exist for.

Specified by:
processEvent in class Actor
Parameters:
event - the ActorEvent to process.

release

protected void release()

getDecayAfter

public float getDecayAfter()

setDecayAfter

public void setDecayAfter(float decayAfter)

setVisible

public void setVisible(ParticleVisible visible)

init

public void init(Context opt)
Description copied from interface: Visible
Initializes this Visible, preparing it for rendering. If this Visible contains other Visibles, then their init methods MUST be called first. This is essential for DisplayList objects to function properly and efficiently.

Specified by:
init in interface Visible
Parameters:
opt - describes the rendering options that are being used.

draw

public void draw(Context opt)
Description copied from interface: Visible
Renders this Visible to glDrawable.

Specified by:
draw in interface Visible
Parameters:
opt - describes the rendering options that are being used.

drawPass

public void drawPass(Context opt,
                     Pass pass)
Specified by:
drawPass in interface MultipassVisible

deinit

public void deinit(Context opt)
Description copied from interface: Visible
Deinitializes this Visible, disposing of any resources that it may be using. If this Visible contains other Visibles, then their deinit methods MUST be called last. This is important for display lists.

Specified by:
deinit in interface Visible
Parameters:
opt - describes the rendering options that are being used.