21 #ifndef GEOS_GEOM_LINESEGMENT_H
22 #define GEOS_GEOM_LINESEGMENT_H
24 #include <geos/export.h>
25 #include <geos/geom/Coordinate.h>
27 #include <geos/inline.h>
35 class CoordinateSequence;
36 class GeometryFactory;
73 LineSegment(
double x0,
double y0,
double x1,
double y1);
82 const Coordinate& operator[](std::size_t i)
const;
88 double getLength()
const;
94 bool isHorizontal()
const;
100 bool isVertical()
const;
123 int orientationIndex(
const LineSegment& seg)
const;
126 int orientationIndex(
const LineSegment* seg)
const;
144 int orientationIndex(
const Coordinate& p)
const;
157 double angle()
const;
175 double distancePerpendicular(
const Coordinate& p)
const;
191 void pointAlong(
double segmentLengthFraction,
Coordinate& ret)
const;
217 void pointAlongOffset(
double segmentLengthFraction,
218 double offsetDistance,
238 double projectionFactor(
const Coordinate& p)
const;
255 double segmentFraction(
const Coordinate& inputPt)
const;
381 # include "geos/geom/LineSegment.inl"
384 #endif // ndef GEOS_GEOM_LINESEGMENT_H