com.jmex.effects.particles
Class SimpleParticleInfluenceFactory

java.lang.Object
  extended by com.jmex.effects.particles.SimpleParticleInfluenceFactory

public final class SimpleParticleInfluenceFactory
extends java.lang.Object

SimpleParticleForceFactory

Version:
$Id: SimpleParticleInfluenceFactory.java 4133 2009-03-19 20:40:11Z blaine.dev $
Author:
Joshua Slack

Nested Class Summary
static class SimpleParticleInfluenceFactory.BasicDrag
           
static class SimpleParticleInfluenceFactory.BasicGravity
           
static class SimpleParticleInfluenceFactory.BasicVortex
           
static class SimpleParticleInfluenceFactory.BasicWind
           
 
Method Summary
static ParticleInfluence createBasicDrag(float dragCoef)
          Create a basic drag force that will use the given drag coefficient.
static ParticleInfluence createBasicGravity(Vector3f gravForce, boolean rotateWithScene)
          Create a basic gravitational force.
static ParticleInfluence createBasicVortex(float strength, float divergence, Line axis, boolean random, boolean transformWithScene)
          Creates a basic vortex.
static ParticleInfluence createBasicWind(float windStr, Vector3f windDir, boolean addRandom, boolean rotateWithScene)
          Creates a basic wind that always blows in a single direction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createBasicWind

public static ParticleInfluence createBasicWind(float windStr,
                                                Vector3f 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(Vector3f gravForce,
                                                   boolean rotateWithScene)
Create a basic gravitational force.

Parameters:
rotateWithScene - rotate the gravity vector with the particle system
Returns:
ParticleInfluence

createBasicDrag

public static ParticleInfluence createBasicDrag(float dragCoef)
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(float strength,
                                                  float divergence,
                                                  Line axis,
                                                  boolean random,
                                                  boolean transformWithScene)
Creates a basic vortex.

Parameters:
strength - Max strength of vortex.
divergence - The divergence in radians from the tangent vector
axis - 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