|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cybertory.MSS.CircleFeatureShapeFactory
A flavor of FeatureShapeFactory that produces circular features,
including support for the variability of location, size, and shape.
Relies heavily on the PolygonFactory
.
Note that all random effects in this class are related to array
manufacture -- therefore in the Cybertory, the random seed should be
based on the serial number.
Constructor Summary | |
CircleFeatureShapeFactory()
Constructor; variability can be added by setVariability(java.util.Random, float, float, int, boolean, org.cybertory.MSS.AngleBias[]) . |
Method Summary | |
java.awt.Shape |
createFeatureShape(float featurePixelSize)
Generate a specific shape, centered at 0,0. |
java.awt.Shape |
createFeatureShape(float featurePixelSize,
java.awt.geom.Point2D featureCenter)
Generate a specific shape, given the design location of a feature. |
void |
setVariability(java.util.Random rand,
float locationVariability,
float sizeVariability,
int shapeVariability,
boolean roundedCorners,
AngleBias[] biases)
Add variability factors to the shape generation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CircleFeatureShapeFactory()
setVariability(java.util.Random, float, float, int, boolean, org.cybertory.MSS.AngleBias[])
.
Method Detail |
public java.awt.Shape createFeatureShape(float featurePixelSize, java.awt.geom.Point2D featureCenter)
createFeatureShape
in interface FeatureShapeFactory
featurePixelSize
- size of feature in pixel unitsfeatureCenter
- the design location of a feature; this could
by altered if setVariability is called.
Shape
of the feature.public void setVariability(java.util.Random rand, float locationVariability, float sizeVariability, int shapeVariability, boolean roundedCorners, AngleBias[] biases)
rand
- random number object (which caller has seeded)locationVariability
- Standard deviation of location from
design location using a random angle.sizeVariability
- This number is used as a base for an
exponential with random number as exponent, the result is
multiplied by the design size.shapeVariability
- 0=none, 1=low, 2=medium, 3=highroundedCorners
- public java.awt.Shape createFeatureShape(float featurePixelSize)
featurePixelSize
- size of feature in pixel units
Shape
of the feature.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |