Class SimpleParticleInfluenceFactory
java.lang.Object
com.ardor3d.extension.effect.particle.SimpleParticleInfluenceFactory
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
-
Method Summary
Modifier and TypeMethodDescriptionstatic ParticleInfluence
createBasicDrag
(double dragCoef) Create a basic drag force that will use the given drag coefficient.static ParticleInfluence
createBasicGravity
(ReadOnlyVector3 gravForce, boolean rotateWithScene) Create a basic gravitational force.static ParticleInfluence
createBasicVortex
(double strength, double divergence, ReadOnlyLine3 axis, boolean random, boolean transformWithScene) Creates a basic vortex.static ParticleInfluence
createBasicWind
(double windStr, ReadOnlyVector3 windDir, boolean addRandom, boolean rotateWithScene) Creates a basic wind that always blows in a single direction.
-
Method Details
-
createBasicWind
public static ParticleInfluence createBasicWind(double windStr, ReadOnlyVector3 windDir, boolean addRandom, boolean rotateWithScene) Creates a basic wind that always blows in a single direction.- Parameters:
windStr
- Max strength of wind.windDir
- Direction wind should blow.addRandom
- randomly alter the strength of the wind by 0-100%rotateWithScene
- rotate the wind direction with the particle system- Returns:
- ParticleInfluence
-
createBasicGravity
public static ParticleInfluence createBasicGravity(ReadOnlyVector3 gravForce, boolean rotateWithScene) Create a basic gravitational force.- Parameters:
gravForce
- the gravitational forcerotateWithScene
- rotate the gravity vector with the particle system- Returns:
- ParticleInfluence
-
createBasicDrag
Create a basic drag force that will use the given drag coefficient. Drag is determined by figuring the current velocity and reversing it, then multiplying by the drag coefficient and dividing by the particle mass.- Parameters:
dragCoef
- Should be positive. Larger values mean more drag but possibly more instability.- Returns:
- ParticleInfluence
-
createBasicVortex
public static ParticleInfluence createBasicVortex(double strength, double divergence, ReadOnlyLine3 axis, boolean random, boolean transformWithScene) Creates a basic vortex.- Parameters:
strength
- Max strength of vortex.divergence
- The divergence in radians from the tangent vectoraxis
- The center of the vortex.random
- randomly alter the strength of the vortex by 0-100%transformWithScene
- transform the axis with the particle system- Returns:
- ParticleInfluence
-