public class WallForce extends AbstractForce
| Modifier and Type | Field and Description |
|---|---|
static float |
DEFAULT_GRAV_CONSTANT |
static float |
DEFAULT_MAX_GRAV_CONSTANT |
static float |
DEFAULT_MIN_GRAV_CONSTANT |
static int |
GRAVITATIONAL_CONST |
maxValues, minValues, params| Constructor and Description |
|---|
WallForce(float x1,
float y1,
float x2,
float y2)
Create a new WallForce with default gravitational constant.
|
WallForce(float gravConst,
float x1,
float y1,
float x2,
float y2)
Create a new WallForce.
|
| Modifier and Type | Method and Description |
|---|---|
void |
getForce(ForceItem item)
Throws an UnsupportedOperationException.
|
protected java.lang.String[] |
getParameterNames() |
boolean |
isItemForce()
Returns true.
|
getForce, getMaxValue, getMinValue, getParameter, getParameterCount, getParameterName, init, isSpringForce, setMaxValue, setMinValue, setParameterpublic static final float DEFAULT_GRAV_CONSTANT
public static final float DEFAULT_MIN_GRAV_CONSTANT
public static final float DEFAULT_MAX_GRAV_CONSTANT
public static final int GRAVITATIONAL_CONST
public WallForce(float gravConst,
float x1,
float y1,
float x2,
float y2)
gravConst - the gravitational constant of the wallx1 - the first x-coordinate of the wally1 - the first y-coordinate of the wallx2 - the second x-coordinate of the wally2 - the second y-coordinate of the wallpublic WallForce(float x1,
float y1,
float x2,
float y2)
x1 - the first x-coordinate of the wally1 - the first y-coordinate of the wallx2 - the second x-coordinate of the wally2 - the second y-coordinate of the wallpublic boolean isItemForce()
isItemForce in interface ForceisItemForce in class AbstractForceForce.isItemForce()protected java.lang.String[] getParameterNames()
getParameterNames in class AbstractForceAbstractForce.getParameterNames()public void getForce(ForceItem item)
AbstractForcegetForce in interface ForcegetForce in class AbstractForceitem - the ForceItem on which to compute updated forcesForce.getForce(prefuse.util.force.ForceItem)