Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vividsolutions.jts.geom.util
Class SineStarFactory

    java.lang.Object
      com.vividsolutions.jts.util.GeometricShapeFactory
          com.vividsolutions.jts.geom.util.SineStarFactory

public class SineStarFactory
extends GeometricShapeFactory

Creates geometries which are shaped like multi-armed stars with each arm shaped like a sine wave. These kinds of geometries are useful as a more complex geometry for testing algorithms.

Author:
  Martin Davis

Nested Class Summary

Nested classes inherited from class com.vividsolutions.jts.util.GeometricShapeFactory
`GeometricShapeFactory.Dimensions`

Field Summary
`protected double` | `armLengthRatio`
`protected int` | `numArms`

Fields inherited from class com.vividsolutions.jts.util.GeometricShapeFactory
`dim, geomFact, nPts, precModel`

Constructor Summary
`SineStarFactory()` Creates a factory which will create sine stars using the default `GeometryFactory`.
`SineStarFactory(GeometryFactory geomFact)` Creates a factory which will create sine stars using the given `GeometryFactory`.

Method Summary
`Geometry` | `createSineStar()` Generates the geometry for the sine star
`void` | `setArmLengthRatio(double armLengthRatio)` Sets the ration of the length of each arm to the distance from the tip of the arm to the centre of the star.
`void` | `setNumArms(int numArms)` Sets the number of arms in the star

Methods inherited from class com.vividsolutions.jts.util.GeometricShapeFactory
`createArc, createArcPolygon, createCircle, createCoord, createCoordTrans, createRectangle, createSquircle, createSupercircle, setBase, setCentre, setEnvelope, setHeight, setNumPoints, setSize, setWidth`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### numArms

    protected int numArms

### armLengthRatio

    protected double armLengthRatio

Constructor Detail

### SineStarFactory

    public SineStarFactory()

  Creates a factory which will create sine stars using the default `GeometryFactory`.

### SineStarFactory

    public SineStarFactory(GeometryFactory geomFact)

  Creates a factory which will create sine stars using the given `GeometryFactory`.

Parameters:
  `geomFact` - the factory to use

Method Detail

### setNumArms

    public void setNumArms(int numArms)

  Sets the number of arms in the star

  Parameters:
    `numArms` - the number of arms to generate

### setArmLengthRatio

    public void setArmLengthRatio(double armLengthRatio)

  Sets the ration of the length of each arm to the distance from the tip of the arm to the centre of the star. Value should be between 0.0 and 1.0

  Parameters:
    `armLengthRatio` -

### createSineStar

    public Geometry createSineStar()

  Generates the geometry for the sine star

  Returns:
    the geometry representing the sine star

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD