Пример #1
0
  /** Compute the labelling for all dirEdges in this star, as well as the overall labelling */
  public void computeLabelling(GeometryGraph[] geom) {
    // Debug.print(this);
    super.computeLabelling(geom);

    // determine the overall labelling for this DirectedEdgeStar
    // (i.e. for the node it is based at)
    label = new Label(Location.NONE);
    for (Iterator it = iterator(); it.hasNext(); ) {
      EdgeEnd ee = (EdgeEnd) it.next();
      Edge e = ee.getEdge();
      Label eLabel = e.getLabel();
      for (int i = 0; i < 2; i++) {
        int eLoc = eLabel.getLocation(i);
        if (eLoc == Location.INTERIOR || eLoc == Location.BOUNDARY)
          label.setLocation(i, Location.INTERIOR);
      }
    }
    // Debug.print(this);
  }
Пример #2
0
 /** Add the edge to the list of edges at this node */
 public void add(EdgeEnd e) {
   // Assert: start pt of e is equal to node point
   edges.insert(e);
   e.setNode(this);
 }