_edgeSet = new EdgeSet(256,0.25); _nodeSet = new NodeSet(256,0.25); _nodeList = new NodeList(); _nmin = null; _dmin = 0.0;
/** * Constructs an interpolator with specified method and samples. * Coordinates for each sample must be unique. * <p> * This constructor is provided primarily for testing. * The default Hale-Liang method is accurate and fast. * @param method the implementation method. * @param f array of sample values f(x1,x2). * @param x1 array of sample x1 coordinates. * @param x2 array of sample x2 coordinates. */ public SibsonInterpolator2( Method method, float[] f, float[] x1, float[] x2) { makeMesh(f,x1,x2); _nodeList = new TriMesh.NodeList(); _triList = new TriMesh.TriList(); if (method==Method.WATSON_SAMBRIDGE) { _va = new WatsonSambridge(); } else if (method==Method.BRAUN_SAMBRIDGE) { _va = new BraunSambridge(); } else if (method==Method.HALE_LIANG) { _va = new HaleLiang(); } }
private boolean getNaturalNabors(float x, float y) { _mesh.clearNodeMarks(); _mesh.clearTriMarks(); _nodeList.clear(); _triList.clear(); TriMesh.PointLocation pl = _mesh.locatePoint(x,y); if (pl.isOutside()) return false; addTri(x,y,pl.tri()); return true; } private void addTri(double xp, double yp, TriMesh.Tri tri) {
private void addNode(TriMesh.Node node) { if (_mesh.isMarked(node)) return; _mesh.mark(node); _nodeList.add(node); NodeData data = data(node); data.area = 0.0; } private boolean needTri(double xp, double yp, TriMesh.Tri tri) {