/** * Creates a new instance of a quad-edge subdivision based on a frame triangle * that encloses a supplied bounding box. A new super-bounding box that * contains the triangle is computed and stored. * * @param env * the bouding box to surround * @param tolerance * the tolerance value for determining if two sites are equal */ public QuadEdgeSubdivision(Envelope env, double tolerance) { // currentSubdiv = this; this.tolerance = tolerance; edgeCoincidenceTolerance = tolerance / EDGE_COINCIDENCE_TOL_FACTOR; createFrame(env); startingEdge = initSubdiv(); locator = new LastFoundQuadEdgeLocator(this); }
private void init() { lastEdge = findEdge(); }
public LastFoundQuadEdgeLocator(QuadEdgeSubdivision subdiv) { this.subdiv = subdiv; init(); }
/** * Computes the Delaunay triangulation of the initial sites. */ public void formInitialDelaunay() { computeBoundingBox(); subdiv = new QuadEdgeSubdivision(computeAreaEnv, tolerance); subdiv.setLocator(new LastFoundQuadEdgeLocator(subdiv)); incDel = new IncrementalDelaunayTriangulator(subdiv); insertSites(initialVertices); }
/** * Locates an edge e, such that either v is on e, or e is an edge of a triangle containing v. * The search starts from the last located edge amd proceeds on the general direction of v. */ public QuadEdge locate(Vertex v) { if (! lastEdge.isLive()) { init(); } QuadEdge e = subdiv.locateFromEdge(v, lastEdge); lastEdge = e; return e; } }
private void init() { lastEdge = findEdge(); }
/** * Creates a new instance of a quad-edge subdivision based on a frame triangle * that encloses a supplied bounding box. A new super-bounding box that * contains the triangle is computed and stored. * * @param env * the bouding box to surround * @param tolerance * the tolerance value for determining if two sites are equal */ public QuadEdgeSubdivision(Envelope env, double tolerance) { // currentSubdiv = this; this.tolerance = tolerance; edgeCoincidenceTolerance = tolerance / EDGE_COINCIDENCE_TOL_FACTOR; createFrame(env); startingEdge = initSubdiv(); locator = new LastFoundQuadEdgeLocator(this); }
public LastFoundQuadEdgeLocator(QuadEdgeSubdivision subdiv) { this.subdiv = subdiv; init(); }
/** * Computes the Delaunay triangulation of the initial sites. */ public void formInitialDelaunay() { computeBoundingBox(); subdiv = new QuadEdgeSubdivision(computeAreaEnv, tolerance); subdiv.setLocator(new LastFoundQuadEdgeLocator(subdiv)); incDel = new IncrementalDelaunayTriangulator(subdiv); insertSites(initialVertices); }
/** * Locates an edge e, such that either v is on e, or e is an edge of a triangle containing v. * The search starts from the last located edge amd proceeds on the general direction of v. */ public QuadEdge locate(Vertex v) { if (! lastEdge.isLive()) { init(); } QuadEdge e = subdiv.locateFromEdge(v, lastEdge); lastEdge = e; return e; } }