Class PolygonsSet.ConnectableSegment
- java.lang.Object
-
- org.apache.commons.math3.geometry.euclidean.twod.Segment
-
- org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet.ConnectableSegment
-
- Enclosing class:
- PolygonsSet
private static class PolygonsSet.ConnectableSegment extends Segment
Private extension of Segment allowing connection.
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description ConnectableSegment(Vector2D start, Vector2D end, Line line, BSPTree<Euclidean2D> node, BSPTree<Euclidean2D> startNode, BSPTree<Euclidean2D> endNode)
Build a segment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
node
private final BSPTree<Euclidean2D> node
Node containing segment.
-
startNode
private final BSPTree<Euclidean2D> startNode
Node whose intersection with current node defines start point.
-
endNode
private final BSPTree<Euclidean2D> endNode
Node whose intersection with current node defines end point.
-
previous
private PolygonsSet.ConnectableSegment previous
Previous segment.
-
next
private PolygonsSet.ConnectableSegment next
Next segment.
-
processed
private boolean processed
Indicator for completely processed segments.
-
-
Constructor Detail
-
ConnectableSegment
ConnectableSegment(Vector2D start, Vector2D end, Line line, BSPTree<Euclidean2D> node, BSPTree<Euclidean2D> startNode, BSPTree<Euclidean2D> endNode)
Build a segment.- Parameters:
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 point
-
-
Method Detail
-
getNode
public BSPTree<Euclidean2D> getNode()
Get the node containing segment.- Returns:
- node containing segment
-
getStartNode
public BSPTree<Euclidean2D> getStartNode()
Get the node whose intersection with current node defines start point.- Returns:
- node whose intersection with current node defines start point
-
getEndNode
public BSPTree<Euclidean2D> getEndNode()
Get the node whose intersection with current node defines end point.- Returns:
- node whose intersection with current node defines end point
-
getPrevious
public PolygonsSet.ConnectableSegment getPrevious()
Get the previous segment.- Returns:
- previous segment
-
setPrevious
public void setPrevious(PolygonsSet.ConnectableSegment previous)
Set the previous segment.- Parameters:
previous
- previous segment
-
getNext
public PolygonsSet.ConnectableSegment getNext()
Get the next segment.- Returns:
- next segment
-
setNext
public void setNext(PolygonsSet.ConnectableSegment next)
Set the next segment.- Parameters:
next
- previous segment
-
setProcessed
public void setProcessed(boolean processed)
Set the processed flag.- Parameters:
processed
- processed flag to set
-
isProcessed
public boolean isProcessed()
Check if the segment has been processed.- Returns:
- true if the segment has been processed
-
-