prefuse.util.force
Class CircularWallForce
java.lang.Object
prefuse.util.force.AbstractForce
prefuse.util.force.CircularWallForce
- All Implemented Interfaces:
- Force
public class CircularWallForce
- extends AbstractForce
Uses a gravitational force model to act as a circular "wall". Can be used to
construct circles which either attract or repel items.
- Author:
- jeffrey heer
|
Constructor Summary |
CircularWallForce(float x,
float y,
float r)
Create a new CircularWallForce with default gravitational constant. |
CircularWallForce(float gravConst,
float x,
float y,
float r)
Create a new CircularWallForce. |
| 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 |
DEFAULT_GRAV_CONSTANT
public static final float DEFAULT_GRAV_CONSTANT
- See Also:
- Constant Field Values
DEFAULT_MIN_GRAV_CONSTANT
public static final float DEFAULT_MIN_GRAV_CONSTANT
- See Also:
- Constant Field Values
DEFAULT_MAX_GRAV_CONSTANT
public static final float DEFAULT_MAX_GRAV_CONSTANT
- See Also:
- Constant Field Values
GRAVITATIONAL_CONST
public static final int GRAVITATIONAL_CONST
- See Also:
- Constant Field Values
CircularWallForce
public CircularWallForce(float gravConst,
float x,
float y,
float r)
- Create a new CircularWallForce.
- Parameters:
gravConst - the gravitational constant to usex - the center x-coordinate of the circley - the center y-coordinate of the circler - the radius of the circle
CircularWallForce
public CircularWallForce(float x,
float y,
float r)
- Create a new CircularWallForce with default gravitational constant.
- Parameters:
x - the center x-coordinate of the circley - the center y-coordinate of the circler - the radius of the circle
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 ? 2010 Regents of the University of California