com.jme.effects.cloth
Class ClothUtils

java.lang.Object
  extended bycom.jme.effects.cloth.ClothUtils

public final class ClothUtils
extends java.lang.Object

ClothUtils

Version:
$Id: ClothUtils.java,v 1.1 2004/11/29 21:24:55 renanse Exp $
Author:
Joshua Slack

Method Summary
static SpringNodeForce createBasicDrag(float dragCoef)
          Create a basic drag force that will use the given drag coefficient.
static SpringNodeForce createBasicGravity()
          Create a basic gravitational force.
static SpringNodeForce 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 SpringNodeForce 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:
SpringNodeForce

createBasicGravity

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

Returns:
SpringNodeForce

createBasicDrag

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