org.apache.commons.math3.geometry.euclidean.twod

## Class PolygonsSet.Vertex

- java.lang.Object
- - org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet.Vertex

Enclosing class:
  PolygonsSet

    private static class PolygonsSet.Vertex
    extends java.lang.Object

Internal class for holding vertices while they are processed to build a BSP tree.

### Field Summary

Fields
`private PolygonsSet.Edge` `incoming` Incoming edge.
`private java.util.List<Line>` `lines` Lines bound with this vertex.
`private Vector2D` `location` Vertex location.
`private PolygonsSet.Edge` `outgoing` Outgoing edge.

### Constructor Summary

Constructors
Constructor and Description
`PolygonsSet.Vertex(Vector2D location)` Build a non-processed vertex not owned by any node yet.

### Method Summary

Methods
`void` `bindWith(Line line)` Bind a line considered to contain this vertex.
`PolygonsSet.Edge` `getIncoming()` Get incoming edge.
`Vector2D` `getLocation()` Get Vertex location.
`PolygonsSet.Edge` `getOutgoing()` Get outgoing edge.
`void` `setIncoming(PolygonsSet.Edge incoming)` Set incoming edge.
`void` `setOutgoing(PolygonsSet.Edge outgoing)` Set outgoing edge.
`Line` `sharedLineWith(PolygonsSet.Vertex vertex)` Get the common line bound with both the instance and another vertex, if any.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### location

    private final Vector2D location

Vertex location.

#### incoming

    private PolygonsSet.Edge incoming

Incoming edge.

#### outgoing

    private PolygonsSet.Edge outgoing

Outgoing edge.

#### lines

    private final java.util.List<Line> lines

Lines bound with this vertex.

### Constructor Detail

#### PolygonsSet.Vertex

    public PolygonsSet.Vertex(Vector2D location)

Build a non-processed vertex not owned by any node yet.

Parameters:
  `location` - vertex location

### Method Detail

#### getLocation

    public Vector2D getLocation()

Get Vertex location.

Returns:
  vertex location

#### bindWith

    public void bindWith(Line line)

Bind a line considered to contain this vertex.

Parameters:
  `line` - line to bind with this vertex

#### sharedLineWith

    public Line sharedLineWith(PolygonsSet.Vertex vertex)

Get the common line bound with both the instance and another vertex, if any.

When two vertices are both bound to the same line, this means they are already handled by node associated with this line, so there is no need to create a cut hyperplane for them.

Parameters:
  `vertex` - other vertex to check instance against
Returns:
  line bound with both the instance and another vertex, or null if the two vertices do not share a line yet

#### setIncoming

    public void setIncoming(PolygonsSet.Edge incoming)

Set incoming edge.

The line supporting the incoming edge is automatically bound with the instance.

Parameters:
  `incoming` - incoming edge

#### getIncoming

    public PolygonsSet.Edge getIncoming()

Get incoming edge.

Returns:
  incoming edge

#### setOutgoing

    public void setOutgoing(PolygonsSet.Edge outgoing)

Set outgoing edge.

The line supporting the outgoing edge is automatically bound with the instance.

Parameters:
  `outgoing` - outgoing edge

#### getOutgoing

    public PolygonsSet.Edge getOutgoing()

Get outgoing edge.

Returns:
  outgoing edge