net.jinx.physics.spring
Class Spring

java.lang.Object
  extended by net.jinx.physics.spring.Spring
Direct Known Subclasses:
DampedSpring

public class Spring
extends java.lang.Object


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

Constructor Detail

Spring

public Spring(float k,
              PhysicalObject p1,
              PhysicalObject p2)

Spring

public Spring(float k,
              PhysicalObject p1,
              Vector p2)
Method Detail

destroy

public void destroy()

applyForce

protected void applyForce(PhysicalObject obj)

getSpringConstant

protected float getSpringConstant()

getNodeOne

protected PhysicalObject getNodeOne()

getNodeTwo

protected java.lang.Object getNodeTwo()

getPositionOne

protected Vector getPositionOne()

getVelocityOne

protected Vector getVelocityOne()

getPositionTwo

protected Vector getPositionTwo()

getVelocityTwo

protected Vector getVelocityTwo()