コード例 #1
0
ファイル: LaplaceNode.java プロジェクト: hfgl/cg
  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;
  }