00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GEOS_UTIL_SINESTARFACTORY_H
00020 #define GEOS_UTIL_SINESTARFACTORY_H
00021
00022 #include <geos/export.h>
00023
00024 #include <geos/util/GeometricShapeFactory.h>
00025
00026 #include <memory>
00027
00028 #ifdef _MSC_VER
00029 #pragma warning(push)
00030 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00031 #endif
00032
00033
00034 namespace geos {
00035 namespace geom {
00036 class Coordinate;
00037 class Envelope;
00038 class Polygon;
00039 class GeometryFactory;
00040 class PrecisionModel;
00041 class LineString;
00042 }
00043 }
00044
00045 namespace geos {
00046 namespace geom {
00047 namespace util {
00048
00058 class GEOS_DLL SineStarFactory : public geos::util::GeometricShapeFactory {
00059
00060 protected:
00061
00062 int numArms;
00063 double armLengthRatio;
00064
00065 public:
00066
00075 SineStarFactory(const geom::GeometryFactory* fact)
00076 :
00077 geos::util::GeometricShapeFactory(fact),
00078 numArms(8),
00079 armLengthRatio(0.5)
00080 {}
00081
00087 void setNumArms(int nArms)
00088 {
00089 numArms = nArms;
00090 }
00091
00099 void setArmLengthRatio(double armLenRatio)
00100 {
00101 armLengthRatio = armLenRatio;
00102 }
00103
00109 std::auto_ptr<Polygon> createSineStar() const;
00110
00111
00112 };
00113
00114 }
00115 }
00116 }
00117
00118 #ifdef _MSC_VER
00119 #pragma warning(pop)
00120 #endif
00121
00122 #endif // GEOS_UTIL_SINESTARFACTORY_H