GEOS
3.9.1dev
|
#include <SineStarFactory.h>
Public Member Functions | |
SineStarFactory (const geom::GeometryFactory *fact) | |
void | setNumArms (int nArms) |
void | setArmLengthRatio (double armLenRatio) |
std::unique_ptr< Polygon > | createSineStar () const |
![]() | |
GeometricShapeFactory (const geom::GeometryFactory *factory) | |
Create a shape factory which will create shapes using the given GeometryFactory. More... | |
virtual | ~GeometricShapeFactory () |
std::unique_ptr< geom::LineString > | createArc (double startAng, double angExtent) |
Creates an elliptical arc, as a LineString. More... | |
std::unique_ptr< geom::Polygon > | createArcPolygon (double startAng, double angExt) |
Creates an elliptical arc polygon. More... | |
std::unique_ptr< geom::Polygon > | createCircle () |
Creates a circular Polygon. More... | |
std::unique_ptr< geom::Polygon > | createRectangle () |
Creates a rectangular Polygon. More... | |
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). More... | |
void | setCentre (const geom::Coordinate ¢re) |
Sets the location of the shape by specifying the centre of the shape's bounding box. More... | |
void | setHeight (double height) |
Sets the height of the shape. More... | |
void | setNumPoints (uint32_t nNPts) |
Sets the total number of points in the created Geometry. More... | |
void | setSize (double size) |
Sets the size of the extent of the shape in both x and y directions. More... | |
void | setWidth (double width) |
Sets the width of the shape. More... | |
Protected Attributes | |
int | numArms |
double | armLengthRatio |
![]() | |
const geom::GeometryFactory * | geomFact |
const geom::PrecisionModel * | precModel |
Dimensions | dim |
uint32_t | nPts |
Additional Inherited Members | |
![]() | |
geom::Coordinate | coord (double x, double y) const |
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.
Definition at line 58 of file SineStarFactory.h.
|
inline |
Creates a factory which will create sine stars using the given GeometryFactory.
fact | the factory to use. You need to keep the factory alive for the whole SineStarFactory life time. |
Definition at line 75 of file SineStarFactory.h.
std::unique_ptr<Polygon> geos::geom::util::SineStarFactory::createSineStar | ( | ) | const |
Generates the geometry for the sine star
|
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
armLenRatio |
Definition at line 101 of file SineStarFactory.h.
|
inline |
Sets the number of arms in the star
nArms | the number of arms to generate |
Definition at line 88 of file SineStarFactory.h.
|
protected |
Definition at line 63 of file SineStarFactory.h.
|
protected |
Definition at line 62 of file SineStarFactory.h.