GEOS 3.14.0dev
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#pragma once
20
21#include <geos/export.h>
22
23#include <geos/util/GeometricShapeFactory.h> // for inheritance
24
25#include <memory>
26
27#ifdef _MSC_VER
28#pragma warning(push)
29#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
30#endif
31
32// Forward declarations
33namespace geos {
34namespace geom {
35class Coordinate;
36class Envelope;
37class Polygon;
38class GeometryFactory;
39class PrecisionModel;
40class LineString;
41}
42}
43
44namespace geos {
45namespace geom { // geos::geom
46namespace util { // geos::geom::util
47
58
59protected:
60
61 int numArms;
62 double armLengthRatio;
63
64public:
65
75 :
76 geos::util::GeometricShapeFactory(fact),
77 numArms(8),
78 armLengthRatio(0.5)
79 {}
80
86 void
87 setNumArms(int nArms)
88 {
89 numArms = nArms;
90 }
91
99 void
100 setArmLengthRatio(double armLenRatio)
101 {
102 armLengthRatio = armLenRatio;
103 }
104
110 std::unique_ptr<Polygon> createSineStar() const;
111
112
113};
114
115} // namespace geos::geom::util
116} // namespace geos::geom
117} // namespace geos
118
119#ifdef _MSC_VER
120#pragma warning(pop)
121#endif
122
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:70
Definition SineStarFactory.h:57
void setArmLengthRatio(double armLenRatio)
Definition SineStarFactory.h:100
void setNumArms(int nArms)
Definition SineStarFactory.h:87
SineStarFactory(const geom::GeometryFactory *fact)
Definition SineStarFactory.h:74
std::unique_ptr< Polygon > createSineStar() const
Computes various kinds of common geometric shapes.
Definition GeometricShapeFactory.h:66
Basic namespace for all GEOS functionalities.
Definition geos.h:39