com.jmex.effects.cloth
Class ClothUtils

java.lang.Object
  extended by com.jmex.effects.cloth.ClothUtils

public final class ClothUtils
extends java.lang.Object

ClothUtils

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

Method Summary
static SpringPointForce createBasicDrag(float dragCoef)
          Create a basic drag force that will use the given drag coefficient.
static SpringPointForce createBasicGravity()
          Create a basic gravitational force.
static SpringPointForce createBasicWind(float windStr, Vector3f windDir, boolean addRandom)
          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 SpringPointForce createBasicWind(float windStr,
                                               Vector3f windDir,
                                               boolean addRandom)
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%
Returns:
SpringPointForce

createBasicGravity

public static SpringPointForce createBasicGravity()
Create a basic gravitational force.

Returns:
SpringPointForce

createBasicDrag

public static SpringPointForce 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:
SpringPointForce