org.wilmascope.forcelayout
Class RepulsionSpring

java.lang.Object
  extended by org.wilmascope.patterns.Prototype
      extended by org.wilmascope.forcelayout.Force
          extended by org.wilmascope.forcelayout.RepulsionSpring
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class RepulsionSpring
extends Force

A repulsive (electrostatic style) force between all nodes. Note, this version of repulsion is compatible with RepulsionlessSpring.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.wilmascope.forcelayout.Force
strengthConstant
 
Constructor Summary
RepulsionSpring(float strengthConstant, float limitRadius)
           
 
Method Summary
 void calculate()
          Calculate deltas for the repulsive (electrostatic) forces between all nodes
 javax.vecmath.Vector3f calculate(NodeForceLayout nl1, NodeForceLayout nl2, javax.vecmath.Vector3f vector)
           
 void setCluster(Cluster root)
           
 
Methods inherited from class org.wilmascope.forcelayout.Force
getStrengthConstant, setStrengthConstant, toString
 
Methods inherited from class org.wilmascope.patterns.Prototype
clone, getTypeName, setTypeName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RepulsionSpring

public RepulsionSpring(float strengthConstant,
                       float limitRadius)
Method Detail

setCluster

public void setCluster(Cluster root)
Specified by:
setCluster in class Force

calculate

public void calculate()
Calculate deltas for the repulsive (electrostatic) forces between all nodes

Specified by:
calculate in class Force
Parameters:
nodes - The nodes to which this force applies
edges - Not used in this method (here to match the interface)

calculate

public javax.vecmath.Vector3f calculate(NodeForceLayout nl1,
                                        NodeForceLayout nl2,
                                        javax.vecmath.Vector3f vector)