Example #1
0
  private ArrayList<Vertex> GetNeighboursVertexes(Vertex vertex) {
    ArrayList<Vertex> neighboursVertexes = new ArrayList();

    HalfEdge startEdge = vertex.getHalfEdge();

    HalfEdge currentEdge = startEdge;

    do {
      neighboursVertexes.add(currentEdge.getOppositeHalfEdge().getStartVertex());
      currentEdge = currentEdge.getOppositeHalfEdge().getNextHalfEdge();
    } while (currentEdge != startEdge);

    return neighboursVertexes;
  }