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 extension of Segment allowing connection.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BSPTree
<Euclidean2D> Node whose intersection with current node defines end point.private PolygonsSet.ConnectableSegment
Next segment.private final BSPTree
<Euclidean2D> Node containing segment.private PolygonsSet.ConnectableSegment
Previous segment.private boolean
Indicator for completely processed segments.private final BSPTree
<Euclidean2D> Node whose intersection with current node defines start point. -
Constructor Summary
ConstructorsConstructorDescriptionConnectableSegment
(Vector2D start, Vector2D end, Line line, BSPTree<Euclidean2D> node, BSPTree<Euclidean2D> startNode, BSPTree<Euclidean2D> endNode) Build a segment. -
Method Summary
Modifier and TypeMethodDescriptionGet the node whose intersection with current node defines end point.getNext()
Get the next segment.getNode()
Get the node containing segment.Get the previous segment.Get the node whose intersection with current node defines start point.boolean
Check if the segment has been processed.void
Set the next segment.void
setPrevious
(PolygonsSet.ConnectableSegment previous) Set the previous segment.void
setProcessed
(boolean processed) Set the processed flag.
-
Field Details
-
node
Node containing segment. -
startNode
Node whose intersection with current node defines start point. -
endNode
Node whose intersection with current node defines end point. -
previous
Previous segment. -
next
Next segment. -
processed
private boolean processedIndicator for completely processed segments.
-
-
Constructor Details
-
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 Details
-
getNode
Get the node containing segment.- Returns:
- node containing segment
-
getStartNode
Get the node whose intersection with current node defines start point.- Returns:
- node whose intersection with current node defines start point
-
getEndNode
Get the node whose intersection with current node defines end point.- Returns:
- node whose intersection with current node defines end point
-
getPrevious
Get the previous segment.- Returns:
- previous segment
-
setPrevious
Set the previous segment.- Parameters:
previous
- previous segment
-
getNext
Get the next segment.- Returns:
- next segment
-
setNext
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
-