Class PolygonsSet.Edge
java.lang.Object
org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet.Edge
- Enclosing class:
PolygonsSet
Internal class for holding edges while they are processed to build a BSP tree.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PolygonsSet.VertexEnd vertex.private final LineLine supporting the edge.private BSPTree<Euclidean2D> Node whose cut hyperplane contains this edge.private final PolygonsSet.VertexStart vertex. -
Constructor Summary
ConstructorsConstructorDescriptionEdge(PolygonsSet.Vertex start, PolygonsSet.Vertex end, Line line) Build an edge not contained in any node yet. -
Method Summary
Modifier and TypeMethodDescriptiongetEnd()Get end vertex.getLine()Get the line supporting this edge.getNode()Get the node whose cut hyperplane contains this edge.getStart()Get start vertex.voidsetNode(BSPTree<Euclidean2D> node) Set the node whose cut hyperplane contains this edge.Split the edge.
-
Field Details
-
start
Start vertex. -
end
End vertex. -
line
Line supporting the edge. -
node
Node whose cut hyperplane contains this edge.
-
-
Constructor Details
-
Edge
Edge(PolygonsSet.Vertex start, PolygonsSet.Vertex end, Line line) Build an edge not contained in any node yet.- Parameters:
start- start vertexend- end vertexline- line supporting the edge
-
-
Method Details
-
getStart
Get start vertex.- Returns:
- start vertex
-
getEnd
Get end vertex.- Returns:
- end vertex
-
getLine
Get the line supporting this edge.- Returns:
- line supporting this edge
-
setNode
Set the node whose cut hyperplane contains this edge.- Parameters:
node- node whose cut hyperplane contains this edge
-
getNode
Get the node whose cut hyperplane contains this edge.- Returns:
- node whose cut hyperplane contains this edge (null if edge has not yet been inserted into the BSP tree)
-
split
Split the edge.Once split, this edge is not referenced anymore by the vertices, it is replaced by the two half-edges and an intermediate splitting vertex is introduced to connect these two halves.
- Parameters:
splitLine- line splitting the edge in two halves- Returns:
- split vertex (its incoming and outgoing edges are the two halves)
-