Class WanderInfluence
java.lang.Object
com.ardor3d.extension.effect.particle.ParticleInfluence
com.ardor3d.extension.effect.particle.WanderInfluence
- All Implemented Interfaces:
Savable
-
Field Summary
Modifier and TypeFieldDescriptionstatic final double
static final double
static final double
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Apply the influence defined by this class on a given particle.Class
<? extends WanderInfluence> double
double
double
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
setWanderDistance
(double wanderDistance) void
setWanderJitter
(double wanderJitter) void
setWanderRadius
(double wanderRadius) void
write
(OutputCapsule capsule) Methods inherited from class com.ardor3d.extension.effect.particle.ParticleInfluence
isEnabled, setEnabled
-
Field Details
-
DEFAULT_RADIUS
public static final double DEFAULT_RADIUS- See Also:
-
DEFAULT_DISTANCE
public static final double DEFAULT_DISTANCE- See Also:
-
DEFAULT_JITTER
public static final double DEFAULT_JITTER- See Also:
-
-
Constructor Details
-
WanderInfluence
public WanderInfluence()
-
-
Method Details
-
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.particle
- 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.
-
getWanderDistance
public double getWanderDistance() -
setWanderDistance
public void setWanderDistance(double wanderDistance) -
getWanderJitter
public double getWanderJitter() -
setWanderJitter
public void setWanderJitter(double wanderJitter) -
getWanderRadius
public double getWanderRadius() -
setWanderRadius
public void setWanderRadius(double wanderRadius) -
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
-