Class SimpleParticleInfluenceFactory.BasicGravity
java.lang.Object
com.ardor3d.extension.effect.particle.ParticleInfluence
com.ardor3d.extension.effect.particle.SimpleParticleInfluenceFactory.BasicGravity
- All Implemented Interfaces:
Savable
- Enclosing class:
SimpleParticleInfluenceFactory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Apply the influence defined by this class on a given particle.Class
<? extends SimpleParticleInfluenceFactory.BasicGravity> 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
setGravityForce
(ReadOnlyVector3 gravForce) void
setRotateWithScene
(boolean rotateWithScene) void
write
(OutputCapsule capsule) Methods inherited from class com.ardor3d.extension.effect.particle.ParticleInfluence
isEnabled, setEnabled
-
Constructor Details
-
BasicGravity
public BasicGravity() -
BasicGravity
-
-
Method Details
-
getGravityForce
-
setGravityForce
-
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
-