| Constructor and Description |
|---|
Force() |
| Modifier and Type | Method and Description |
|---|---|
abstract float[] |
computeAttractiveForce(float deltaX,
float deltaY,
float distance,
float squareDistance,
int v1Deg,
int v2Deg)
This method computes the attractive force between two vertices.
|
abstract float[] |
computeRepulsiveForce(float deltaX,
float deltaY,
float distance,
float squareDistance,
int v1Deg,
int v2Deg)
This method computes the repulsive force module between two vertices.
|
abstract void |
generateForce(java.lang.String[] args,
float k)
This method builds the force instance with the given arguments and the optimal spring length.
|
public abstract float[] computeAttractiveForce(float deltaX,
float deltaY,
float distance,
float squareDistance,
int v1Deg,
int v2Deg)
deltaX - The vertices distance on the X axis.deltaY - The vertices distance on the Y axis.distance - The distance module.squareDistance - The distance square module.v1Deg - The degree of the first vertex.v2Deg - The degree of the second vertex.public abstract float[] computeRepulsiveForce(float deltaX,
float deltaY,
float distance,
float squareDistance,
int v1Deg,
int v2Deg)
deltaX - The vertices distance on the X axis.deltaY - The vertices distance on the Y axis.distance - The distance module.squareDistance - The distance square module.v1Deg - The degree of the first vertex.v2Deg - The degree of the second vertex.public abstract void generateForce(java.lang.String[] args,
float k)
args - The arguments.k - The optimal spring length.