GEOS  3.3.6
Public Member Functions | Protected Attributes
geos::geom::util::SineStarFactory Class Reference

#include <SineStarFactory.h>

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

List of all members.

Public Member Functions

 SineStarFactory (const geom::GeometryFactory *fact)
void setNumArms (int nArms)
void setArmLengthRatio (double armLenRatio)
std::auto_ptr< PolygoncreateSineStar () const

Protected Attributes

int numArms
double armLengthRatio

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

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

Parameters:
factthe factory to use. You need to keep the factory alive for the whole SineStarFactory life time.

Member Function Documentation

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:
nArmsthe number of arms to generate

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