Class SimpleParticleInfluenceFactory.BasicVortex
java.lang.Object
com.ardor3d.extension.effect.particle.ParticleInfluence
com.ardor3d.extension.effect.particle.SimpleParticleInfluenceFactory.BasicVortex
- All Implemented Interfaces:
Savable
- Enclosing class:
SimpleParticleInfluenceFactory
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBasicVortex
(double strength, double divergence, ReadOnlyLine3 axis, boolean random, boolean transformWithScene) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Apply the influence defined by this class on a given particle.getAxis()
Class
<? extends SimpleParticleInfluenceFactory.BasicVortex> double
double
double
double
int
getType()
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
setAxis
(ReadOnlyLine3 axis) void
setDivergence
(double divergence) void
setHeight
(double height) void
setRadius
(double radius) void
setRandom
(boolean random) void
setStrength
(double strength) void
setTransformWithScene
(boolean transformWithScene) void
setType
(int type) void
write
(OutputCapsule capsule) Methods inherited from class com.ardor3d.extension.effect.particle.ParticleInfluence
isEnabled, setEnabled
-
Field Details
-
VT_CYLINDER
public static final int VT_CYLINDER- See Also:
-
VT_TORUS
public static final int VT_TORUS- See Also:
-
-
Constructor Details
-
BasicVortex
public BasicVortex() -
BasicVortex
public BasicVortex(double strength, double divergence, ReadOnlyLine3 axis, boolean random, boolean transformWithScene)
-
-
Method Details
-
getType
public int getType() -
setType
public void setType(int type) -
getStrength
public double getStrength() -
setStrength
public void setStrength(double strength) -
getDivergence
public double getDivergence() -
setDivergence
public void setDivergence(double divergence) -
getAxis
-
setAxis
-
getHeight
public double getHeight() -
setHeight
public void setHeight(double height) -
getRadius
public double getRadius() -
setRadius
public void setRadius(double radius) -
isRandom
public boolean isRandom() -
setRandom
public void setRandom(boolean random) -
isTransformWithScene
public boolean isTransformWithScene() -
setTransformWithScene
public void setTransformWithScene(boolean transformWithScene) -
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
-