com.jmex.effects.particles
Class SimpleParticleInfluenceFactory.BasicVortex

java.lang.Object
  extended by com.jmex.effects.particles.ParticleInfluence
      extended by com.jmex.effects.particles.SimpleParticleInfluenceFactory.BasicVortex
All Implemented Interfaces:
Savable
Enclosing class:
SimpleParticleInfluenceFactory

public static class SimpleParticleInfluenceFactory.BasicVortex
extends ParticleInfluence


Field Summary
static int VT_CYLINDER
           
static int VT_TORUS
           
 
Constructor Summary
SimpleParticleInfluenceFactory.BasicVortex()
           
SimpleParticleInfluenceFactory.BasicVortex(float strength, float divergence, Line axis, boolean random, boolean transformWithScene)
           
 
Method Summary
 void apply(float dt, Particle p, int index)
          Apply the influence defined by this class on a given particle.
 Line getAxis()
           
 java.lang.Class getClassTag()
           
 float getDivergence()
           
 float getHeight()
           
 float getRadius()
           
 float getStrength()
           
 int getType()
           
 boolean isRandom()
           
 boolean isTransformWithScene()
           
 void prepare(ParticleSystem system)
          Gives the influence a chance to perform any necessary initialization immediately before ParticleInfluence.apply(float, com.jmex.effects.particles.Particle, int) is called on each particle for the current frame.
 void read(JMEImporter e)
           
 void setAxis(Line axis)
           
 void setDivergence(float divergence)
           
 void setHeight(float height)
           
 void setRadius(float radius)
           
 void setRandom(boolean random)
           
 void setStrength(float strength)
           
 void setTransformWithScene(boolean transformWithScene)
           
 void setType(int type)
           
 void write(JMEExporter e)
           
 
Methods inherited from class com.jmex.effects.particles.ParticleInfluence
isEnabled, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VT_CYLINDER

public static final int VT_CYLINDER
See Also:
Constant Field Values

VT_TORUS

public static final int VT_TORUS
See Also:
Constant Field Values
Constructor Detail

SimpleParticleInfluenceFactory.BasicVortex

public SimpleParticleInfluenceFactory.BasicVortex()

SimpleParticleInfluenceFactory.BasicVortex

public SimpleParticleInfluenceFactory.BasicVortex(float strength,
                                                  float divergence,
                                                  Line axis,
                                                  boolean random,
                                                  boolean transformWithScene)
Method Detail

getType

public int getType()

setType

public void setType(int type)

getStrength

public float getStrength()

setStrength

public void setStrength(float strength)

getDivergence

public float getDivergence()

setDivergence

public void setDivergence(float divergence)

getAxis

public Line getAxis()

setAxis

public void setAxis(Line axis)

getHeight

public float getHeight()

setHeight

public void setHeight(float height)

getRadius

public float getRadius()

setRadius

public void setRadius(float radius)

isRandom

public boolean isRandom()

setRandom

public void setRandom(boolean random)

isTransformWithScene

public boolean isTransformWithScene()

setTransformWithScene

public void setTransformWithScene(boolean transformWithScene)

prepare

public void prepare(ParticleSystem system)
Description copied from class: ParticleInfluence
Gives the influence a chance to perform any necessary initialization immediately before ParticleInfluence.apply(float, com.jmex.effects.particles.Particle, int) is called on each particle for the current frame.

Overrides:
prepare in class ParticleInfluence
Parameters:
system - the particle system containing the influence

apply

public void apply(float dt,
                  Particle p,
                  int index)
Description copied from class: ParticleInfluence
Apply the influence defined by this class on a given particle. Should probably do this by making a call to particle.getSpeed().addLocal(....); etc.

Specified by:
apply in class ParticleInfluence
Parameters:
dt - amount of time since last apply call in ms.
p - the particle to apply the influence to.
index - the index of the particle we are working with. This is useful for adding small steady amounts of variation, or remembering information.

write

public void write(JMEExporter e)
           throws java.io.IOException
Specified by:
write in interface Savable
Overrides:
write in class ParticleInfluence
Throws:
java.io.IOException

read

public void read(JMEImporter e)
          throws java.io.IOException
Specified by:
read in interface Savable
Overrides:
read in class ParticleInfluence
Throws:
java.io.IOException

getClassTag

public java.lang.Class getClassTag()
Specified by:
getClassTag in interface Savable
Overrides:
getClassTag in class ParticleInfluence