Class PolygonsSet.Vertex
java.lang.Object
org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet.Vertex
- Enclosing class:
PolygonsSet
Internal class for holding vertices while they are processed to build a BSP tree.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PolygonsSet.Edge
Incoming edge.Lines bound with this vertex.private final Vector2D
Vertex location.private PolygonsSet.Edge
Outgoing edge. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Bind a line considered to contain this vertex.Get incoming edge.Get Vertex location.Get outgoing edge.void
setIncoming
(PolygonsSet.Edge incoming) Set incoming edge.void
setOutgoing
(PolygonsSet.Edge outgoing) Set outgoing edge.sharedLineWith
(PolygonsSet.Vertex vertex) Get the common line bound with both the instance and another vertex, if any.
-
Field Details
-
location
Vertex location. -
incoming
Incoming edge. -
outgoing
Outgoing edge. -
lines
Lines bound with this vertex.
-
-
Constructor Details
-
Vertex
Vertex(Vector2D location) Build a non-processed vertex not owned by any node yet.- Parameters:
location
- vertex location
-
-
Method Details
-
getLocation
Get Vertex location.- Returns:
- vertex location
-
bindWith
Bind a line considered to contain this vertex.- Parameters:
line
- line to bind with this vertex
-
setIncoming
Set incoming edge.The line supporting the incoming edge is automatically bound with the instance.
- Parameters:
incoming
- incoming edge
-
getIncoming
Get incoming edge.- Returns:
- incoming edge
-
setOutgoing
Set outgoing edge.The line supporting the outgoing edge is automatically bound with the instance.
- Parameters:
outgoing
- outgoing edge
-
getOutgoing
Get outgoing edge.- Returns:
- outgoing edge
-