com.vwp.j3d.utils.geometry
Class PointParticles

java.lang.Object
  extended by Shape3D
      extended by com.vwp.j3d.utils.geometry.Particles
          extended by com.vwp.j3d.utils.geometry.PointParticles

public class PointParticles
extends Particles

This class creates and controls a particle animated object which shows a fountain effect using points. It bases on code by Dr. Andrew Davison (http://fivedots.coe.psu.ac.th/~ad/jg)


Field Summary
 
Fields inherited from class com.vwp.j3d.utils.geometry.Particles
ENABLE_APPEARANCE_MODIFY, ENABLE_PICK_REPORTING
 
Constructor Summary
PointParticles(int flags, float radius, float height, int nps, int delay, Appearance app)
          Constructor for a PointParticle object
 
Method Summary
 Behavior getParticleBehavior()
          Returns an Behaviour object.
 void setColorFadeIncr(float newIncr)
          The PointParticles object fades the color (found using the handed over Appearance object) to a darker color for emitted particles.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointParticles

public PointParticles(int flags,
                      float radius,
                      float height,
                      int nps,
                      int delay,
                      Appearance app)
Constructor for a PointParticle object

Parameters:
flags - specifies which Primitive-flags have to be used for the object creation
radius - specifies some kind of radius the particles have to be calculated within; this value doesn't specifies an exact radius, it depends on the heights value
height - specifies some kind of height the particles have to be calculated within; this value doesn't specifies an exact height, it depends on the radius value
nps - the number of particles which have to be used
delay - specifies the delay in the calculation; the higher the delay is the lower is the speed of the particles
app - specifies an appearance for the object
Method Detail

getParticleBehavior

public Behavior getParticleBehavior()
Returns an Behaviour object. This object has to be attached to a branch group the generated particle object was attached too to let the particle calculation start. Otherwise the Particle object doesn't works like expected.

Specified by:
getParticleBehavior in class Particles

setColorFadeIncr

public void setColorFadeIncr(float newIncr)
The PointParticles object fades the color (found using the handed over Appearance object) to a darker color for emitted particles. This method allowes to specify the strength of this fade effect.

Parameters:
newIncr - specifies the new fade strength, a value of 0 means no fading