private static class PolygonsSet.ComparableSegment extends Segment implements java.lang.Comparable<PolygonsSet.ComparableSegment>
| Modifier and Type | Field and Description |
|---|---|
private OrderedTuple |
sortingKey
Sorting key.
|
| Constructor and Description |
|---|
PolygonsSet.ComparableSegment(Vector2D start,
double dx,
double dy)
Build a dummy segment.
|
PolygonsSet.ComparableSegment(Vector2D start,
Vector2D end,
Line line)
Build a segment.
|
private OrderedTuple sortingKey
public PolygonsSet.ComparableSegment(Vector2D start, Vector2D end, Line line)
start - start point of the segmentend - end point of the segmentline - line containing the segmentpublic PolygonsSet.ComparableSegment(Vector2D start, double dx, double dy)
The object built is not a real segment, only the sorting key is used to allow searching in the neighborhood of a point. This is an horrible hack ...
start - start point of the segmentdx - abscissa offset from the start pointdy - ordinate offset from the start pointpublic int compareTo(PolygonsSet.ComparableSegment o)
compareTo in interface java.lang.Comparable<PolygonsSet.ComparableSegment>public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright (c) 2003-2013 Apache Software Foundation