net.jinx.physics.spring
Class GeneralSpring

java.lang.Object
  extended by net.jinx.physics.spring.Spring
      extended by net.jinx.physics.spring.DampedSpring
          extended by net.jinx.physics.spring.GeneralSpring

public class GeneralSpring
extends DampedSpring


Constructor Summary
GeneralSpring(float k, float b, float d, PhysicalObject p1, PhysicalObject p2)
           
GeneralSpring(float k, float b, float d, PhysicalObject p1, Vector p2)
           
 
Method Summary
protected  void applyForce(PhysicalObject obj)
           
protected  float getDesiredDistance()
           
 
Methods inherited from class net.jinx.physics.spring.DampedSpring
getDampingConstant
 
Methods inherited from class net.jinx.physics.spring.Spring
destroy, getNodeOne, getNodeTwo, getPositionOne, getPositionTwo, getSpringConstant, getVelocityOne, getVelocityTwo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneralSpring

public GeneralSpring(float k,
                     float b,
                     float d,
                     PhysicalObject p1,
                     PhysicalObject p2)

GeneralSpring

public GeneralSpring(float k,
                     float b,
                     float d,
                     PhysicalObject p1,
                     Vector p2)
Method Detail

getDesiredDistance

protected float getDesiredDistance()

applyForce

protected void applyForce(PhysicalObject obj)
Overrides:
applyForce in class DampedSpring