public interface Segment extends NodePair, Comparable<Segment>, Vector
Dataset
.FULL_CIRCLE, RIGHT_ANGLE, SEMI_CIRCLE
Modifier and Type | Method and Description |
---|---|
void |
addBestLeftMatch(Segment bestMatch) |
void |
addBestRightMatch(Segment bestMatch) |
void |
analyse(Analyser visitor) |
Node |
end() |
Node |
findPerpendicularFoot(Node node) |
SourceSegment |
root() |
boolean |
shouldIgnore()
Whether this
Segment was split into two new
Segment s. |
void |
splitAt(Node node,
SplitQueueListener sink)
Split this
Segment at the given node. |
void |
splitCloseParallels(SplitQueueListener sink) |
Collection<Segment> |
splitTargets() |
Node |
start() |
compareTo
SourceSegment root()
boolean shouldIgnore()
Segment
was split into two new
Segment
s.
The SPLITTEN algorithm is defined to remove the original segment that was split into two parts from the collection of line parts to be split. Keeping the original would only duplicate work as the splitting is based on nodes, and both of the original's nodes are also present in its two parts after it was split. Rather than removing (which would likely be expensive), we introduce a simple flag to skip any line part that has already been split.
splitAt(Node,SplitQueueListener)
Node start()
Node end()
Collection<Segment> splitTargets()
void splitCloseParallels(SplitQueueListener sink)
void splitAt(Node node, SplitQueueListener sink)
Segment
at the given node. This
Segment
will be marked as having been split so that it
will be ignored by future processing steps. The split will be reported
to the split queue listener so that the two fragments created by the
split can again be used for splitting.shouldIgnore()
void analyse(Analyser visitor)
void addBestLeftMatch(Segment bestMatch)
void addBestRightMatch(Segment bestMatch)