org.wilmascope.forcelayout
Class RepulsionSpring
java.lang.Object
org.wilmascope.patterns.Prototype
org.wilmascope.forcelayout.Force
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
Constructor Summary |
RepulsionSpring(float strengthConstant,
float limitRadius)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RepulsionSpring
public RepulsionSpring(float strengthConstant,
float limitRadius)
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 appliesedges
- Not used in this method (here to match the interface)
calculate
public javax.vecmath.Vector3f calculate(NodeForceLayout nl1,
NodeForceLayout nl2,
javax.vecmath.Vector3f vector)