com.jmex.effects.particles
Class SimpleParticleInfluenceFactory.BasicGravity
java.lang.Object
com.jmex.effects.particles.ParticleInfluence
com.jmex.effects.particles.SimpleParticleInfluenceFactory.BasicGravity
- All Implemented Interfaces:
- Savable
- Enclosing class:
- SimpleParticleInfluenceFactory
public static class SimpleParticleInfluenceFactory.BasicGravity
- extends ParticleInfluence
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleParticleInfluenceFactory.BasicGravity
public SimpleParticleInfluenceFactory.BasicGravity()
SimpleParticleInfluenceFactory.BasicGravity
public SimpleParticleInfluenceFactory.BasicGravity(Vector3f gravForce,
boolean rotateWithScene)
getGravityForce
public Vector3f getGravityForce()
setGravityForce
public void setGravityForce(Vector3f gravForce)
isRotateWithScene
public boolean isRotateWithScene()
setRotateWithScene
public void setRotateWithScene(boolean rotateWithScene)
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()
- Description copied from interface:
Savable
- The peristed type for the object.
Note that tag here does not mean XML tag, but the class that the object
is tagged with.
- Specified by:
getClassTag in interface Savable- Overrides:
getClassTag in class ParticleInfluence
Copyright 2003-2009 jMonkeyEngine