@Override
public ForceVector calculateForce(Spatial node1, Spatial node2,
float distance) {
ForceVector f = new ForceVector(node2.x() - node1.x(),
node2.y() - node1.y());
f.multiply(distance / optimalDistance);
return f;
}
public void setOptimalDistance(Float optimalDistance) {
this.optimalDistance = optimalDistance;