com.jme3.effect.influencers
Class NewtonianParticleInfluencer

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

public class NewtonianParticleInfluencer
extends DefaultParticleInfluencer

This influencer calculates initial velocity with the use of the emitter's shape.


Field Summary
protected  float normalVelocity
          Normal to emitter's shape factor.
protected  float surfaceTangentFactor
          Emitter's surface tangent factor.
protected  float surfaceTangentRotation
          Emitters tangent rotation factor.
 
Fields inherited from class com.jme3.effect.influencers.DefaultParticleInfluencer
startVelocity, temp, velocityVariation
 
Constructor Summary
NewtonianParticleInfluencer()
          Constructor.
 
Method Summary
protected  void applyVelocityVariation(Particle particle)
          This method applies the variation to the particle with already set velocity.
 ParticleInfluencer clone()
          This method clones the influencer instance.
 float getNormalVelocity()
          This method returns the normal velocity factor.
 float getSurfaceTangentFactor()
          This method returns the surface tangent factor.
 float getSurfaceTangentRotation()
          This method returns the surface tangent rotation factor.
 void influenceParticle(Particle particle, EmitterShape emitterShape)
          This method influences the particle.
 void read(JmeImporter im)
           
 void setNormalVelocity(float normalVelocity)
          This method sets the normal velocity factor.
 void setSurfaceTangentFactor(float surfaceTangentFactor)
          This method sets the surface tangent factor.
 void setSurfaceTangentRotation(float surfaceTangentRotation)
          This method sets the surface tangent rotation factor.
 void write(JmeExporter ex)
           
 
Methods inherited from class com.jme3.effect.influencers.DefaultParticleInfluencer
getInitialVelocity, getVelocityVariation, setInitialVelocity, setVelocityVariation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

normalVelocity

protected float normalVelocity
Normal to emitter's shape factor.


surfaceTangentFactor

protected float surfaceTangentFactor
Emitter's surface tangent factor.


surfaceTangentRotation

protected float surfaceTangentRotation
Emitters tangent rotation factor.

Constructor Detail

NewtonianParticleInfluencer

public NewtonianParticleInfluencer()
Constructor. Sets velocity variation to 0.0f.

Method Detail

influenceParticle

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

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

getNormalVelocity

public float getNormalVelocity()
This method returns the normal velocity factor.

Returns:
the normal velocity factor

setNormalVelocity

public void setNormalVelocity(float normalVelocity)
This method sets the normal velocity factor.

Parameters:
normalVelocity - the normal velocity factor

setSurfaceTangentFactor

public void setSurfaceTangentFactor(float surfaceTangentFactor)
This method sets the surface tangent factor.

Parameters:
surfaceTangentFactor - the surface tangent factor

getSurfaceTangentFactor

public float getSurfaceTangentFactor()
This method returns the surface tangent factor.

Returns:
the surface tangent factor

setSurfaceTangentRotation

public void setSurfaceTangentRotation(float surfaceTangentRotation)
This method sets the surface tangent rotation factor.

Parameters:
surfaceTangentRotation - the surface tangent rotation factor

getSurfaceTangentRotation

public float getSurfaceTangentRotation()
This method returns the surface tangent rotation factor.

Returns:
the surface tangent rotation factor

applyVelocityVariation

protected void applyVelocityVariation(Particle particle)
Description copied from class: DefaultParticleInfluencer
This method applies the variation to the particle with already set velocity.

Overrides:
applyVelocityVariation in class DefaultParticleInfluencer
Parameters:
particle - the particle to be affected

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 DefaultParticleInfluencer
Returns:
cloned instance

write

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

read

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