Class SimpleParticleInfluenceFactory.BasicWind
java.lang.Object
com.ardor3d.extension.effect.particle.ParticleInfluence
com.ardor3d.extension.effect.particle.SimpleParticleInfluenceFactory.BasicWind
- All Implemented Interfaces:
Savable
- Enclosing class:
SimpleParticleInfluenceFactory
-
Constructor Summary
ConstructorDescriptionBasicWind
(double windStr, ReadOnlyVector3 windDir, boolean addRandom, boolean rotateWithScene) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Apply the influence defined by this class on a given particle.Class
<? extends SimpleParticleInfluenceFactory.BasicWind> double
boolean
isRandom()
boolean
void
prepare
(ParticleSystem system) Gives the influence a chance to perform any necessary initialization immediately beforeParticleInfluence.apply(double, com.ardor3d.extension.effect.particle.Particle, int)
is called on each particle for the current frame.void
read
(InputCapsule capsule) void
setRandom
(boolean addRandom) void
setRotateWithScene
(boolean rotateWithScene) void
setStrength
(double windStr) void
setWindDirection
(ReadOnlyVector3 windDir) void
write
(OutputCapsule capsule) Methods inherited from class com.ardor3d.extension.effect.particle.ParticleInfluence
isEnabled, setEnabled
-
Constructor Details
-
BasicWind
public BasicWind() -
BasicWind
public BasicWind(double windStr, ReadOnlyVector3 windDir, boolean addRandom, boolean rotateWithScene)
-
-
Method Details
-
getStrength
public double getStrength() -
setStrength
public void setStrength(double windStr) -
getWindDirection
-
setWindDirection
-
isRandom
public boolean isRandom() -
setRandom
public void setRandom(boolean addRandom) -
isRotateWithScene
public boolean isRotateWithScene() -
setRotateWithScene
public void setRotateWithScene(boolean rotateWithScene) -
prepare
Description copied from class:ParticleInfluence
Gives the influence a chance to perform any necessary initialization immediately beforeParticleInfluence.apply(double, com.ardor3d.extension.effect.particle.Particle, int)
is called on each particle for the current frame.- Overrides:
prepare
in classParticleInfluence
- Parameters:
system
- the particle system containing the influence
-
apply
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 classParticleInfluence
- 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
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classParticleInfluence
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classParticleInfluence
- Throws:
IOException
-
getClassTag
- Specified by:
getClassTag
in interfaceSavable
- Overrides:
getClassTag
in classParticleInfluence
-