j3d.examples.particles.influences
Class FadeShape

java.lang.Object
  extended by j3d.examples.particles.influences.Shape3DInfluence
      extended by j3d.examples.particles.influences.FadeShape
All Implemented Interfaces:
IExternalInfluence

public class FadeShape
extends Shape3DInfluence
implements IExternalInfluence


Constructor Summary
FadeShape()
          Fade the opacity of a particle shape from fully opaque (transparency = 0) to fully transparent (transparency = 1) over the life of the affected particles.
FadeShape(ParticleAgeAlpha anAlpha)
          Fade the alpha component of the color of a shape based on the ParticleAgeAlpha object over the life of the affected particle.
 
Method Summary
 void apply(Particle aParticle, float dt)
          Apply this (possibly time varying) influence to the particle for the time interval.
 void initializeParticle(Particle aParticle)
          Initialize a particle prior to the first emission.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FadeShape

public FadeShape()
Fade the opacity of a particle shape from fully opaque (transparency = 0) to fully transparent (transparency = 1) over the life of the affected particles.


FadeShape

public FadeShape(ParticleAgeAlpha anAlpha)
Fade the alpha component of the color of a shape based on the ParticleAgeAlpha object over the life of the affected particle. The value returned by the ParticleAgeAlpha object represents the opacity of the particle.

Parameters:
anAlpha - - The particle age alpha to control the opacity of the shape.
Method Detail

initializeParticle

public void initializeParticle(Particle aParticle)
Description copied from interface: IExternalInfluence
Initialize a particle prior to the first emission.

Specified by:
initializeParticle in interface IExternalInfluence
Parameters:
aParticle - - the particle to initialize.

apply

public void apply(Particle aParticle,
                  float dt)
Description copied from interface: IExternalInfluence
Apply this (possibly time varying) influence to the particle for the time interval.

Specified by:
apply in interface IExternalInfluence
Parameters:
aParticle - - The particle to update
dt - - The time interval (in seconds) since the last apply