public class SplitSegment
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private double |
minimumLen |
private LineSegment |
seg |
private double |
segLen |
private Coordinate |
splitPt |
Constructor and Description |
---|
SplitSegment(LineSegment seg) |
Modifier and Type | Method and Description |
---|---|
private double |
getConstrainedLength(double len) |
Coordinate |
getSplitPoint() |
private static Coordinate |
pointAlongReverse(LineSegment seg,
double segmentLengthFraction)
Computes the
Coordinate that lies a given fraction along the line defined by the
reverse of the given segment. |
void |
setMinimumLength(double minLen) |
void |
splitAt(Coordinate pt) |
void |
splitAt(double length,
Coordinate endPt) |
private LineSegment seg
private double segLen
private Coordinate splitPt
private double minimumLen
public SplitSegment(LineSegment seg)
private static Coordinate pointAlongReverse(LineSegment seg, double segmentLengthFraction)
Coordinate
that lies a given fraction along the line defined by the
reverse of the given segment. A fraction of 0.0
returns the end point of the
segment; a fraction of 1.0
returns the start point of the segment.seg
- the LineSegmentsegmentLengthFraction
- the fraction of the segment length along the linepublic void setMinimumLength(double minLen)
public Coordinate getSplitPoint()
public void splitAt(double length, Coordinate endPt)
public void splitAt(Coordinate pt)
private double getConstrainedLength(double len)