|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wilmascope.graph.NodeLayout
org.wilmascope.forcelayout.NodeForceLayout
public class NodeForceLayout
This class encapsulates the physical properties of a node
in relation to the ForceLayout
such as mass, and the
forces acting upon it.
Constructor Summary | |
---|---|
NodeForceLayout()
|
Method Summary | |
---|---|
void |
addForce(javax.vecmath.Vector3f force)
Add a force vector which will act on this NodeForceLayout |
void |
applyForce(float attenuation)
Adjust the node's position by calculating an acceleration due to the forces on the node, then applying that acceleration to the velocity of the node and then scale that velocity by the attenuation factor. |
javax.vecmath.Vector3f |
getNetForce()
Get the aggregate (or net) force acting on this NodeForceLayout |
void |
resetProperties()
Reset's properties common to all layouts, these include: FixedPosition Should be overridden with a call to this inherited method to load any properties from the node properties that are specific to the layout engine |
void |
subForce(javax.vecmath.Vector3f force)
'Subtract' a force vector |
Methods inherited from class org.wilmascope.graph.NodeLayout |
---|
delete, getNode, isFixedPosition, setFixedPosition, setNode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NodeForceLayout()
Method Detail |
---|
public void resetProperties()
NodeLayout
resetProperties
in class NodeLayout
public void addForce(javax.vecmath.Vector3f force)
public void subForce(javax.vecmath.Vector3f force)
public javax.vecmath.Vector3f getNetForce()
public void applyForce(float attenuation)
attenuation
- scale factor for the velocity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |