prefuse.util.force
Class ForceItem

java.lang.Object
  extended by prefuse.util.force.ForceItem
All Implemented Interfaces:
java.lang.Cloneable

public class ForceItem
extends java.lang.Object
implements java.lang.Cloneable

Represents a point particle in a force simulation, maintaining values for mass, forces, velocity, and position.

Author:
jeffrey heer

Field Summary
 float[] force
          The values of the forces acting on this ForceItem.
 float[][] k
          Temporary variables for Runge-Kutta integration
 float[][] l
          Temporary variables for Runge-Kutta integration
 float[] location
          The location values of this ForceItem.
 float mass
          The mass value of this ForceItem.
 float[] plocation
          The previous location values of this ForceItem.
 float[] velocity
          The velocity values of this ForceItem.
 
Constructor Summary
ForceItem()
          Create a new ForceItem.
 
Method Summary
 java.lang.Object clone()
          Clone a ForceItem.
static boolean isValid(ForceItem item)
          Checks a ForceItem to make sure its values are all valid numbers (i.e., not NaNs).
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mass

public float mass
The mass value of this ForceItem.


force

public float[] force
The values of the forces acting on this ForceItem.


velocity

public float[] velocity
The velocity values of this ForceItem.


location

public float[] location
The location values of this ForceItem.


plocation

public float[] plocation
The previous location values of this ForceItem.


k

public float[][] k
Temporary variables for Runge-Kutta integration


l

public float[][] l
Temporary variables for Runge-Kutta integration

Constructor Detail

ForceItem

public ForceItem()
Create a new ForceItem.

Method Detail

clone

public java.lang.Object clone()
Clone a ForceItem.

Overrides:
clone in class java.lang.Object
See Also:
Object.clone()

isValid

public static final boolean isValid(ForceItem item)
Checks a ForceItem to make sure its values are all valid numbers (i.e., not NaNs).

Parameters:
item - the item to check
Returns:
true if all the values are valid, false otherwise


Copyright © 2007 Regents of the University of California