GEOS 3.9.1
SineStarFactory.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2011 Sandro Santilli <strk@kbt.io
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 **********************************************************************
14 *
15 * Last port: geom/util/SineStarFactory.java r378 (JTS-1.12)
16 *
17 **********************************************************************/
18
19#ifndef GEOS_UTIL_SINESTARFACTORY_H
20#define GEOS_UTIL_SINESTARFACTORY_H
21
22#include <geos/export.h>
23
24#include <geos/util/GeometricShapeFactory.h> // for inheritance
25
26#include <memory>
27
28#ifdef _MSC_VER
29#pragma warning(push)
30#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
31#endif
32
33// Forward declarations
34namespace geos {
35namespace geom {
36class Coordinate;
37class Envelope;
38class Polygon;
39class GeometryFactory;
40class PrecisionModel;
41class LineString;
42}
43}
44
45namespace geos {
46namespace geom { // geos::geom
47namespace util { // geos::geom::util
48
59
60protected:
61
62 int numArms;
63 double armLengthRatio;
64
65public:
66
76 :
77 geos::util::GeometricShapeFactory(fact),
78 numArms(8),
79 armLengthRatio(0.5)
80 {}
81
87 void
88 setNumArms(int nArms)
89 {
90 numArms = nArms;
91 }
92
100 void
101 setArmLengthRatio(double armLenRatio)
102 {
103 armLengthRatio = armLenRatio;
104 }
105
111 std::unique_ptr<Polygon> createSineStar() const;
112
113
114};
115
116} // namespace geos::geom::util
117} // namespace geos::geom
118} // namespace geos
119
120#ifdef _MSC_VER
121#pragma warning(pop)
122#endif
123
124#endif // GEOS_UTIL_SINESTARFACTORY_H
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:68
Definition SineStarFactory.h:58
void setArmLengthRatio(double armLenRatio)
Definition SineStarFactory.h:101
void setNumArms(int nArms)
Definition SineStarFactory.h:88
SineStarFactory(const geom::GeometryFactory *fact)
Definition SineStarFactory.h:75
std::unique_ptr< Polygon > createSineStar() const
Computes various kinds of common geometric shapes.
Definition GeometricShapeFactory.h:67
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26