private static class PolygonsSet.ConnectableSegment extends Segment
Modifier and Type | Field and Description |
---|---|
private BSPTree<Euclidean2D> |
endNode
Node whose intersection with current node defines end point.
|
private PolygonsSet.ConnectableSegment |
next
Next segment.
|
private BSPTree<Euclidean2D> |
node
Node containing segment.
|
private PolygonsSet.ConnectableSegment |
previous
Previous segment.
|
private boolean |
processed
Indicator for completely processed segments.
|
private BSPTree<Euclidean2D> |
startNode
Node whose intersection with current node defines start point.
|
Constructor and Description |
---|
ConnectableSegment(Vector2D start,
Vector2D end,
Line line,
BSPTree<Euclidean2D> node,
BSPTree<Euclidean2D> startNode,
BSPTree<Euclidean2D> endNode)
Build a segment.
|
Modifier and Type | Method and Description |
---|---|
BSPTree<Euclidean2D> |
getEndNode()
Get the node whose intersection with current node defines end point.
|
PolygonsSet.ConnectableSegment |
getNext()
Get the next segment.
|
BSPTree<Euclidean2D> |
getNode()
Get the node containing segment.
|
PolygonsSet.ConnectableSegment |
getPrevious()
Get the previous segment.
|
BSPTree<Euclidean2D> |
getStartNode()
Get the node whose intersection with current node defines start point.
|
boolean |
isProcessed()
Check if the segment has been processed.
|
void |
setNext(PolygonsSet.ConnectableSegment next)
Set the next segment.
|
void |
setPrevious(PolygonsSet.ConnectableSegment previous)
Set the previous segment.
|
void |
setProcessed(boolean processed)
Set the processed flag.
|
private final BSPTree<Euclidean2D> node
private final BSPTree<Euclidean2D> startNode
private final BSPTree<Euclidean2D> endNode
private PolygonsSet.ConnectableSegment previous
private PolygonsSet.ConnectableSegment next
private boolean processed
public ConnectableSegment(Vector2D start, Vector2D end, Line line, BSPTree<Euclidean2D> node, BSPTree<Euclidean2D> startNode, BSPTree<Euclidean2D> endNode)
start
- start point of the segmentend
- end point of the segmentline
- line containing the segmentnode
- node containing the segmentstartNode
- node whose intersection with current node defines start pointendNode
- node whose intersection with current node defines end pointpublic BSPTree<Euclidean2D> getNode()
public BSPTree<Euclidean2D> getStartNode()
public BSPTree<Euclidean2D> getEndNode()
public PolygonsSet.ConnectableSegment getPrevious()
public void setPrevious(PolygonsSet.ConnectableSegment previous)
previous
- previous segmentpublic PolygonsSet.ConnectableSegment getNext()
public void setNext(PolygonsSet.ConnectableSegment next)
next
- previous segmentpublic void setProcessed(boolean processed)
processed
- processed flag to setpublic boolean isProcessed()