com.jme3.effect.influencers
Class EmptyParticleInfluencer

java.lang.Object
  extended by com.jme3.effect.influencers.EmptyParticleInfluencer
All Implemented Interfaces:
ParticleInfluencer, Savable, java.lang.Cloneable

public class EmptyParticleInfluencer
extends java.lang.Object
implements ParticleInfluencer

This influencer does not influence particle at all. It makes particles not to move.


Constructor Summary
EmptyParticleInfluencer()
           
 
Method Summary
 ParticleInfluencer clone()
          This method clones the influencer instance.
 Vector3f getInitialVelocity()
          This method returns the initial velocity.
 float getVelocityVariation()
          This method returns the velocity variation.
 void influenceParticle(Particle particle, EmitterShape emitterShape)
          This method influences the particle.
 void read(JmeImporter im)
           
 void setInitialVelocity(Vector3f initialVelocity)
           
 void setVelocityVariation(float variation)
           
 void write(JmeExporter ex)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyParticleInfluencer

public EmptyParticleInfluencer()
Method Detail

write

public void write(JmeExporter ex)
           throws java.io.IOException
Specified by:
write in interface Savable
Throws:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
Specified by:
read in interface Savable
Throws:
java.io.IOException

influenceParticle

public void influenceParticle(Particle particle,
                              EmitterShape emitterShape)
Description copied from interface: ParticleInfluencer
This method influences the particle.

Specified by:
influenceParticle in interface ParticleInfluencer
Parameters:
particle - particle to be influenced
emitterShape - the shape of it emitter

setInitialVelocity

public void setInitialVelocity(Vector3f initialVelocity)
Specified by:
setInitialVelocity in interface ParticleInfluencer
Parameters:
initialVelocity - Set the initial velocity a particle is spawned with, the initial velocity given in the parameter will be varied according to the velocity variation set in ParticleEmitter.setVelocityVariation(float). A particle will move toward its velocity unless it is effected by the gravity.

getInitialVelocity

public Vector3f getInitialVelocity()
Description copied from interface: ParticleInfluencer
This method returns the initial velocity.

Specified by:
getInitialVelocity in interface ParticleInfluencer
Returns:
the initial velocity

setVelocityVariation

public void setVelocityVariation(float variation)
Specified by:
setVelocityVariation in interface ParticleInfluencer
Parameters:
variation - Set the variation by which the initial velocity of the particle is determined. variation should be a value from 0 to 1, where 0 means particles are to spawn with exactly the velocity given in ParticleEmitter.setInitialVelocity(com.jme3.math.Vector3f), and 1 means particles are to spawn with a completely random velocity.

getVelocityVariation

public float getVelocityVariation()
Description copied from interface: ParticleInfluencer
This method returns the velocity variation.

Specified by:
getVelocityVariation in interface ParticleInfluencer
Returns:
the velocity variation

clone

public ParticleInfluencer clone()
Description copied from interface: ParticleInfluencer
This method clones the influencer instance.

Specified by:
clone in interface ParticleInfluencer
Overrides:
clone in class java.lang.Object
Returns:
cloned instance