ch.epfl.craft.maglib.magnet
Class Spring
java.lang.Object
ch.epfl.craft.maglib.magnet.Spring
- public class Spring
- extends java.lang.Object
A spring to be manipulated in a spring layout
A Spring is a physical abstract spring between two points. Note not to make the k of the spring bigger than 1 - uncontrollable oscillatory motion in the springlayout model
- Version:
- 1.0
- Author:
- Gregory Dyke
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
head
protected SpringPoint head
tail
protected SpringPoint tail
length
protected double length
konstant
protected double konstant
Spring
public Spring(SpringPoint head,
SpringPoint tail,
double length,
double konstant)
- Create a new
SpringPoint
getHead
public SpringPoint getHead()
getTail
public SpringPoint getTail()
headForce
public Vector2D headForce()
tailForce
public Vector2D tailForce()
toString
public java.lang.String toString()
Copyright © CRAFT EPFL. All Rights Reserved.