org.cybertory.MSS
Class AngleBias
java.lang.Object
org.cybertory.MSS.AngleBias
- public class AngleBias
- extends java.lang.Object
Provides a bias in the calculation of radius in a particular direction
for vertices of a randomly generated polygon.
See CircleFeatureShapeFactory
and PolygonFactory
.
Constructor Summary |
AngleBias(float angle,
float sweep,
float factor)
|
Method Summary |
static float |
getMultiple(AngleBias[] biases,
float vertexAngle)
Calculate the number to be multiplied by the vertex radius, given the
angle of the vertex and a list of angle biases. |
float |
getMultiple(float vertexAngle)
Calculate the number to be multiplied by the vertex radius, given the
angle of the vertex. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AngleBias
public AngleBias(float angle,
float sweep,
float factor)
- Parameters:
angle
- the general direction of vertices to be affected
by the bias.sweep
- the range of angles affected by the bias.factor
- the number to multiply by the radius (modified
by how far from the center of the sweep).
getMultiple
public float getMultiple(float vertexAngle)
- Calculate the number to be multiplied by the vertex radius, given the
angle of the vertex.
- Parameters:
vertexAngle
- the angle of the vertex
- Returns:
- the number to be multiplied.
getMultiple
public static float getMultiple(AngleBias[] biases,
float vertexAngle)
- Calculate the number to be multiplied by the vertex radius, given the
angle of the vertex and a list of angle biases.
- Parameters:
biases
- a list of angle biasesvertexAngle
- the angle of the vertex
- Returns:
- the number to be multiplied.