|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for force functions in a force simulation.
Method Summary | |
void |
getForce(ForceItem item)
Updates the force calculation on the given ForceItem |
void |
getForce(Spring spring)
Updates the force calculation on the given Spring. |
float |
getMaxValue(int param)
Get the suggested maximum value for a parameter. |
float |
getMinValue(int param)
Get the suggested minimum value for a parameter. |
float |
getParameter(int i)
Returns the specified, numbered parameter. |
int |
getParameterCount()
Returns the number of parameters (e.g., gravitational constant or spring force coefficient) affecting this force function. |
java.lang.String |
getParameterName(int i)
Gets the text name of the requested parameter. |
void |
init(ForceSimulator fsim)
Initialize this force function. |
boolean |
isItemForce()
Indicates if this force function will compute forces on ForceItem instances |
boolean |
isSpringForce()
Indicates if this force function will compute forces on Spring instances. |
void |
setMaxValue(int i,
float val)
Set the suggested maximum value for a parameter. |
void |
setMinValue(int i,
float val)
Set the suggested minimum value for a parameter. |
void |
setParameter(int i,
float val)
Sets the specified parameter value. |
Method Detail |
public void init(ForceSimulator fsim)
fsim
- the encompassing ForceSimulatorpublic int getParameterCount()
public float getParameter(int i)
i
- the index of the parameter to return
public float getMinValue(int param)
param
- the parameter index
public float getMaxValue(int param)
param
- the parameter index
public java.lang.String getParameterName(int i)
i
- the index of the parameter
public void setParameter(int i, float val)
i
- the index of the parameterval
- the new value of the parameterpublic void setMinValue(int i, float val)
i
- the parameter indexval
- the suggested minimum value to usepublic void setMaxValue(int i, float val)
i
- the parameter index
public boolean isSpringForce()
public boolean isItemForce()
public void getForce(ForceItem item)
item
- the ForceItem on which to compute updated forcespublic void getForce(Spring spring)
spring
- the Spring on which to compute updated forces
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |