prefuse.util.force
Class DragForce

java.lang.Object
  extended by prefuse.util.force.AbstractForce
      extended by prefuse.util.force.DragForce
All Implemented Interfaces:
Force

public class DragForce
extends AbstractForce

Implements a viscosity/drag force to help stabilize items.

Author:
jeffrey heer

Field Summary
static float DEFAULT_DRAG_COEFF
           
static float DEFAULT_MAX_DRAG_COEFF
           
static float DEFAULT_MIN_DRAG_COEFF
           
static int DRAG_COEFF
           
 
Fields inherited from class prefuse.util.force.AbstractForce
maxValues, minValues, params
 
Constructor Summary
DragForce()
          Create a new DragForce with default drag co-efficient.
DragForce(float dragCoeff)
          Create a new DragForce.
 
Method Summary
 void getForce(ForceItem item)
          Throws an UnsupportedOperationException.
protected  java.lang.String[] getParameterNames()
           
 boolean isItemForce()
          Returns true.
 
Methods inherited from class prefuse.util.force.AbstractForce
getForce, getMaxValue, getMinValue, getParameter, getParameterCount, getParameterName, init, isSpringForce, setMaxValue, setMinValue, setParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DRAG_COEFF

public static final float DEFAULT_DRAG_COEFF
See Also:
Constant Field Values

DEFAULT_MIN_DRAG_COEFF

public static final float DEFAULT_MIN_DRAG_COEFF
See Also:
Constant Field Values

DEFAULT_MAX_DRAG_COEFF

public static final float DEFAULT_MAX_DRAG_COEFF
See Also:
Constant Field Values

DRAG_COEFF

public static final int DRAG_COEFF
See Also:
Constant Field Values
Constructor Detail

DragForce

public DragForce(float dragCoeff)
Create a new DragForce.

Parameters:
dragCoeff - the drag co-efficient

DragForce

public DragForce()
Create a new DragForce with default drag co-efficient.

Method Detail

isItemForce

public boolean isItemForce()
Returns true.

Specified by:
isItemForce in interface Force
Overrides:
isItemForce in class AbstractForce
Returns:
true if this force function processes Force instances
See Also:
Force.isItemForce()

getParameterNames

protected java.lang.String[] getParameterNames()
Specified by:
getParameterNames in class AbstractForce
See Also:
AbstractForce.getParameterNames()

getForce

public void getForce(ForceItem item)
Description copied from class: AbstractForce
Throws an UnsupportedOperationException.

Specified by:
getForce in interface Force
Overrides:
getForce in class AbstractForce
Parameters:
item - the ForceItem on which to compute updated forces
See Also:
Force.getForce(prefuse.util.force.ForceItem)


Copyright © 2007 Regents of the University of California