GEOS 3.3.8

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes | List of all members
geos::geom::util::SineStarFactory Class Reference

`#include <SineStarFactory.h>`

Inheritance diagram for geos::geom::util::SineStarFactory:

## Public Member Functions
| SineStarFactory (const geom::GeometryFactory *fact)
void | setNumArms (int nArms)
void | setArmLengthRatio (double armLenRatio)
std::auto_ptr< Polygon > | createSineStar () const
Public Member Functions inherited from geos::util::GeometricShapeFactory
| GeometricShapeFactory (const geom::GeometryFactory *factory)
| Create a shape factory which will create shapes using the given GeometryFactory.
geom::LineString * | createArc (double startAng, double angExtent)
| Creates an elliptical arc, as a LineString.
geom::Polygon * | createArcPolygon (double startAng, double angExt)
| Creates an elliptical arc polygon.
geom::Polygon * | createCircle ()
| Creates a circular Polygon.
geom::Polygon * | createRectangle ()
| Creates a rectangular Polygon.
void | setBase (const geom::Coordinate &base)
| Sets the location of the shape by specifying the base coordinate (which in most cases is the * lower left point of the envelope containing the shape).
void | setCentre (const geom::Coordinate &centre)
| Sets the location of the shape by specifying the centre of the shape's bounding box.
void | setHeight (double height)
| Sets the height of the shape.
void | setNumPoints (int nNPts)
| Sets the total number of points in the created Geometry.
void | setSize (double size)
| Sets the size of the extent of the shape in both x and y directions.
void | setWidth (double width)
| Sets the width of the shape.

## Protected Attributes
int | numArms
double | armLengthRatio
Protected Attributes inherited from geos::util::GeometricShapeFactory
const geom::GeometryFactory * | geomFact
const geom::PrecisionModel * | precModel
Dimensions | dim
int | nPts

## Additional Inherited Members
Protected Member Functions inherited from geos::util::GeometricShapeFactory
geom::Coordinate | coord (double x, double y) const

## Detailed Description

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

## Constructor & Destructor Documentation

geos::geom::util::SineStarFactory::SineStarFactory | ( | const geom::GeometryFactory * | fact | ) |
| inline

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

      @param fact the factory to use. You need to keep the
        factory alive for the whole SineStarFactory
        life time.

## Member Function Documentation

std::auto_ptr<Polygon> geos::geom::util::SineStarFactory::createSineStar | ( |  | ) | const

Generates the geometry for the sine star

Returns
  the geometry representing the sine star

void geos::geom::util::SineStarFactory::setArmLengthRatio | ( | double | armLenRatio | ) |
| inline

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

  armLenRatio |

void geos::geom::util::SineStarFactory::setNumArms | ( | int | nArms | ) |
| inline

Sets the number of arms in the star

Parameters

  nArms | the number of arms to generate

The documentation for this class was generated from the following file:

- SineStarFactory.h