com.jme.math.spring
Class SpringPointForce

java.lang.Object
  extended by com.jme.math.spring.SpringPointForce
All Implemented Interfaces:
Savable

public abstract class SpringPointForce
extends java.lang.Object
implements Savable

SpringPointForce is an abstract class defining an external force to be used with the SpringSystem class.

Version:
$Id: SpringPointForce.java 4131 2009-03-19 20:15:28Z blaine.dev $
Author:
Joshua Slack

Constructor Summary
SpringPointForce()
           
 
Method Summary
abstract  void apply(float dt, SpringPoint node)
          Apply the force defined by this class on a given point.
 java.lang.Class getClassTag()
           
 boolean isEnabled()
          Return whether or not this system is enabled.
 void read(JMEImporter e)
           
 void setEnabled(boolean enabled)
          Set this force enabled or not.
 void write(JMEExporter e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringPointForce

public SpringPointForce()
Method Detail

setEnabled

public void setEnabled(boolean enabled)
Set this force enabled or not.

Parameters:
enabled - boolean

isEnabled

public boolean isEnabled()
Return whether or not this system is enabled.

Returns:
boolean

apply

public abstract void apply(float dt,
                           SpringPoint node)
Apply the force defined by this class on a given point. Should do this by making a call to node.acceleration.addLocal(....);

Parameters:
dt - amount of time since last apply call in ms.
node - the node to apply the force to.

write

public void write(JMEExporter e)
           throws java.io.IOException
Specified by:
write in interface Savable
Throws:
java.io.IOException

read

public void read(JMEImporter e)
          throws java.io.IOException
Specified by:
read in interface Savable
Throws:
java.io.IOException

getClassTag

public java.lang.Class getClassTag()
Specified by:
getClassTag in interface Savable