GEOS: SineStarFactory.h Source File

GEOS 3.5.0

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

- File List

SineStarFactory.h
1 /**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2011 Sandro Santilli <strk@keybit.net
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
34 namespace geos {
35 namespace geom {
36 class Coordinate;
37 class Envelope;
38 class Polygon;
39 class GeometryFactory;
40 class PrecisionModel;
41 class LineString;
42 }
43 }
44
45 namespace geos {
46 namespace geom { // geos::geom
47 namespace util { // geos::geom::util
48
58 class GEOS_DLL SineStarFactory : public geos::util::GeometricShapeFactory {
59
60 protected:
61
62 int numArms;
63 double armLengthRatio;
64
65 public:
66
75 SineStarFactory(const geom::GeometryFactory* fact)
76 :
77 geos::util::GeometricShapeFactory(fact),
78 numArms(8),
79 armLengthRatio(0.5)
80 {}
81
87 void setNumArms(int nArms)
88 {
89 numArms = nArms;
90 }
91
99 void setArmLengthRatio(double armLenRatio)
100 {
101 armLengthRatio = armLenRatio;
102 }
103
109 std::auto_ptr<Polygon> createSineStar() const;
110
111
112 };
113
114 } // namespace geos::geom::util
115 } // namespace geos::geom
116 } // namespace geos
117
118 #ifdef _MSC_VER
119 #pragma warning(pop)
120 #endif
121
122 #endif // GEOS_UTIL_SINESTARFACTORY_H
geos::geom::util::SineStarFactory::setNumArms
void setNumArms(int nArms)
Definition: SineStarFactory.h:87
geos::geom::util::SineStarFactory::setArmLengthRatio
void setArmLengthRatio(double armLenRatio)
Definition: SineStarFactory.h:99
geos::geom::util::SineStarFactory::SineStarFactory
SineStarFactory(const geom::GeometryFactory *fact)
Definition: SineStarFactory.h:75
geos::geom::GeometryFactory
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:67
geos::util::GeometricShapeFactory
Definition: GeometricShapeFactory.h:66
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
geos::geom::util::SineStarFactory
Definition: SineStarFactory.h:58