code: public void convert( FeatureGraph2D graph ) {
  		graph.nodes.resize(corners.size);
  		graph.reset();
  		for (int i = 0; i < corners.size; i++) {
  			Node c = corners.get(i);
  			FeatureGraph2D.Node n = graph.nodes.grow();
  			n.reset();
  			n.set(c.x,c.y);
  			n.index = c.index;
  		}
  
  		for (int i = 0; i < corners.size; i++) {
  			Node c = corners.get(i);
  			for (int j = 0; j < 4; j++) {
  				if( c.edges[j] == null )
  					continue;
  				graph.connect(c.index,c.edges[j].index);
  			}
  		}
  	}
docs: Convert into a generic graph.