Examples of QuadEdge


Examples of com.vividsolutions.jts.triangulate.quadedge.QuadEdge

     * and a bug fix from Dani Lischinski (Graphic Gems 1993). (The modification
     * I believe is the test for the inserted site falling exactly on an
     * existing edge. Without this test zero-width triangles have been observed
     * to be created)
     */
    QuadEdge e = subdiv.locate(v);

    if (subdiv.isVertexOfEdge(e, v)) {
      // point is already in subdivision.
      return e;
    }
    else if (subdiv.isOnEdge(e, v.getCoordinate())) {
      // the point lies exactly on an edge, so delete the edge
      // (it will be replaced by a pair of edges which have the point as a vertex)
      e = e.oPrev();
      subdiv.delete(e.oNext());
    }

    /**
     * Connect the new point to the vertices of the containing triangle
     * (or quadrilateral, if the new point fell on an existing edge.)
     */
    QuadEdge base = subdiv.makeEdge(e.orig(), v);
    QuadEdge.splice(base, e);
    QuadEdge startEdge = base;
    do {
      base = subdiv.connect(e, base.sym());
      e = base.oPrev();
    } while (e.lNext() != startEdge);

    // Examine suspect edges to ensure that the Delaunay condition
    // is satisfied.
    do {
      QuadEdge t = e.oPrev();
      if (t.dest().rightOf(e) && v.inCircle(e.orig(), t.dest(), e.dest())) {
        QuadEdge.swap(e);
        e = e.oPrev();
      } else if (e.oNext() == startEdge) {
        return base; // no more suspect edges.
      } else {
View Full Code Here

Examples of com.vividsolutions.jts.triangulate.quadedge.QuadEdge

     * and a bug fix from Dani Lischinski (Graphic Gems 1993). (The modification
     * I believe is the test for the inserted site falling exactly on an
     * existing edge. Without this test zero-width triangles have been observed
     * to be created)
     */
    QuadEdge e = subdiv.locate(v);

    if (subdiv.isVertexOfEdge(e, v)) {
      // point is already in subdivision.
      return e;
    }
    else if (subdiv.isOnEdge(e, v.getCoordinate())) {
      // the point lies exactly on an edge, so delete the edge
      // (it will be replaced by a pair of edges which have the point as a vertex)
      e = e.oPrev();
      subdiv.delete(e.oNext());
    }

    /**
     * Connect the new point to the vertices of the containing triangle
     * (or quadrilateral, if the new point fell on an existing edge.)
     */
    QuadEdge base = subdiv.makeEdge(e.orig(), v);
    QuadEdge.splice(base, e);
    QuadEdge startEdge = base;
    do {
      base = subdiv.connect(e, base.sym());
      e = base.oPrev();
    } while (e.lNext() != startEdge);

    // Examine suspect edges to ensure that the Delaunay condition
    // is satisfied.
    do {
      QuadEdge t = e.oPrev();
      if (t.dest().rightOf(e) && v.isInCircle(e.orig(), t.dest(), e.dest())) {
        QuadEdge.swap(e);
        e = e.oPrev();
      } else if (e.oNext() == startEdge) {
        return base; // no more suspect edges.
      } else {
View Full Code Here

Examples of com.vividsolutions.jts.triangulate.quadedge.QuadEdge

      }
    }

    // border
    for (int j = 0 ; j < qeFrameBorder.size() ; j++) {
      QuadEdge q = qeFrameBorder.get(j);
      if (! qeFrame.contains(q)) {
        qeBorder.add(q);
      }
    }
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.