22 #ifndef GEOS_GEOM_LINESEGMENT_H
23 #define GEOS_GEOM_LINESEGMENT_H
25 #include <geos/export.h>
26 #include <geos/geom/Coordinate.h>
28 #include <geos/inline.h>
36 class CoordinateSequence;
37 class GeometryFactory;
74 LineSegment(
double x0,
double y0,
double x1,
double y1);
83 const Coordinate& operator[](std::size_t i)
const;
89 double getLength()
const;
95 bool isHorizontal()
const;
101 bool isVertical()
const;
124 int orientationIndex(
const LineSegment& seg)
const;
127 int orientationIndex(
const LineSegment* seg)
const;
145 int orientationIndex(
const Coordinate& p)
const;
158 double angle()
const;
176 double distancePerpendicular(
const Coordinate& p)
const;
192 void pointAlong(
double segmentLengthFraction,
Coordinate& ret)
const;
218 void pointAlongOffset(
double segmentLengthFraction,
219 double offsetDistance,
239 double projectionFactor(
const Coordinate& p)
const;
256 double segmentFraction(
const Coordinate& inputPt)
const;
382 # include "geos/geom/LineSegment.inl"
385 #endif // ndef GEOS_GEOM_LINESEGMENT_H