19 #ifndef GEOS_OP_BUFFER_OFFSETSEGMENTGENERATOR_H
20 #define GEOS_OP_BUFFER_OFFSETSEGMENTGENERATOR_H
22 #include <geos/export.h>
26 #include <geos/algorithm/LineIntersector.h>
27 #include <geos/geom/Coordinate.h>
28 #include <geos/geom/LineSegment.h>
29 #include <geos/operation/buffer/BufferParameters.h>
30 #include <geos/operation/buffer/OffsetSegmentString.h>
34 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
40 class CoordinateSequence;
61 class GEOS_DLL OffsetSegmentGenerator {
72 OffsetSegmentGenerator(
const geom::PrecisionModel* newPrecisionModel,
73 const BufferParameters& bufParams,
double distance);
88 hasNarrowConcaveAngle()
const
90 return _hasNarrowConcaveAngle;
105 getCoordinates(std::vector<geom::CoordinateSequence*>& to)
107 to.push_back(segList.getCoordinates());
126 segList.addPt(offset1.p0);
133 segList.addPt(offset1.p1);
147 segList.addPts(pts, isForward);
156 static const double OFFSET_SEGMENT_SEPARATION_FACTOR;
162 static const double INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR;
167 static const double CURVE_VERTEX_SNAP_DISTANCE_FACTOR;
172 static const int MAX_CLOSING_SEG_LEN_FACTOR = 80;
178 double maxCurveSegmentError;
184 double filletAngleQuantum;
203 int closingSegLengthFactor;
213 OffsetSegmentString segList;
219 const BufferParameters& bufParams;
235 bool _hasNarrowConcaveAngle;
237 void addCollinear(
bool addStartPoint);
260 void addLimitedMitreJoin(
263 double distance,
double mitreLimit);
275 static const double PI;
280 void init(
double newDistance);
289 static const double SIMPLIFY_FACTOR;
296 void addOutsideTurn(
int orientation,
bool addStartPoint);
303 void addInsideTurn(
int orientation,
bool addStartPoint);
318 int side,
double distance,
334 int direction,
double radius);
346 double endAngle,
int direction,
double radius);
350 OffsetSegmentGenerator(
const OffsetSegmentGenerator&);
351 void operator=(
const OffsetSegmentGenerator&);
363 #endif // ndef GEOS_OP_BUFFER_OFFSETSEGMENTGENERATOR_H