j3d.examples.particles.influences
Class FadePoint

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

public class FadePoint
extends java.lang.Object
implements IExternalInfluence


Constructor Summary
FadePoint()
          Fade the alpha component of the color of a point from fully opaque (alpha color = 1) to fully transparent (alpha color = 0) over the life of the affected particles.
FadePoint(ParticleAgeAlpha anAlpha)
          Fade the alpha component of the color of a point 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

FadePoint

public FadePoint()
Fade the alpha component of the color of a point from fully opaque (alpha color = 1) to fully transparent (alpha color = 0) over the life of the affected particles.


FadePoint

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

Parameters:
anAlpha - - The particle age alpha to control the opacity of the point.
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