|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Force
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 |
|---|
void init(ForceSimulator fsim)
fsim - the encompassing ForceSimulatorint getParameterCount()
float getParameter(int i)
i - the index of the parameter to return
float getMinValue(int param)
param - the parameter index
float getMaxValue(int param)
param - the parameter index
java.lang.String getParameterName(int i)
i - the index of the parameter
void setParameter(int i,
float val)
i - the index of the parameterval - the new value of the parameter
void setMinValue(int i,
float val)
i - the parameter indexval - the suggested minimum value to use
void setMaxValue(int i,
float val)
i - the parameter indexboolean isSpringForce()
boolean isItemForce()
void getForce(ForceItem item)
item - the ForceItem on which to compute updated forcesvoid 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 | |||||||||