static void initPUnsorted(Triangulator triRef, int number) { if (number > triRef.maxNumPUnsorted) { triRef.maxNumPUnsorted = number; triRef.pUnsorted = new Point2f[triRef.maxNumPUnsorted]; for(int i = 0; i<triRef.maxNumPUnsorted; i++) triRef.pUnsorted[i] = new Point2f(); } }
@Override Object get() { Tuple2f[] arr = new Tuple2f[this.length]; for (int i = 0; i < this.length; i++) { int j = i * 2; arr[i] = new Point2f(); arr[i].x = this.value[j+0]; arr[i].y = this.value[j+1]; } return arr; }
void initPnts(int number) { if (maxNumPoints < number) { maxNumPoints = number; points = new Point2f[maxNumPoints]; } for(int i = 0; i<number; i++) points[i] = new Point2f(0.0f, 0.0f); numPoints = 0; }
@Override Object get() { return new Point2f(value); }
int storePoint(double x, double y) { int i; if (numPoints >= maxNumPoints) { // System.out.println("Triangulator:storePoint Expanding points array ..."); maxNumPoints += INC_POINT_BK; Point2f old[] = points; points = new Point2f[maxNumPoints]; if(old != null) System.arraycopy(old, 0, points, 0, old.length); } points[numPoints] = new Point2f((float)x, (float)y); // points[numPoints].x = (float)x; // points[numPoints].y = (float)y; i = numPoints; ++numPoints; return i; }
Point2f srcTri = new Point2f(3); Point2f dstTri = new Point2f(3); // ... srcTri.position(0).x((float)landmarks[5*2]).y((float)landmarks[5*2+1]); srcTri.position(1).x((float)landmarks[6*2]).y((float)landmarks[6*2+1]); srcTri.position(2).x((float)landmarks[0*2]).y((float)landmarks[0*2+1]); // and do the same for dstTri warp_mat = getAffineTransform( srcTri.position(0), dstTri.position(0) );
attenuation[i] = new Point2f(this.attenuationDistance[i], this.attenuationGain[i]);
Point2f vertex = new Point2f(); flag = pIt.currentSegment(tmpCoords); if (flag == PathIterator.SEG_LINETO){
geom.setCoordinates(coords); Point2f[] text = new Point2f[16]; text[0] = new Point2f( -6.0f, -17.5f); text[1] = new Point2f( -6.0f, -9.0f); text[2] = new Point2f( -6.0f, -5.0f); text[3] = new Point2f( -6.0f, 0.0f); text[4] = new Point2f( -0.75f, 0.0f); text[5] = new Point2f( -0.25f, -5.0f); text[6] = new Point2f( -0.25f, -9.0f); text[7] = new Point2f(-0.125f, -15.0f); text[8] = new Point2f( 0.125f, -15.0f); text[9] = new Point2f( 0.25f, -9.0f); text[10] = new Point2f( 0.25f, -5.0f); text[11] = new Point2f( 0.75f, 0.0f); text[12] = new Point2f( 6.0f, 0.0f); text[13] = new Point2f( 6.0f, -5.0f); text[14] = new Point2f( 6.0f, -9.0f); text[15] = new Point2f( 6.0f, -17.5f); geom.setTextureCoordinates(text);
attenuation[i] = new Point2f(this.backAttenuationDistance[i], this.backAttenuationGain[i]);
static void sort(Point2f points[], int numPts) { int i,j; Point2f swap = new Point2f(); for (i = 0; i < numPts; i++){ for (j = i + 1; j < numPts; j++){ if (pComp(points[i], points[j]) > 0){ swap.set(points[i]); points[i].set(points[j]); points[j].set(swap); } } } /* for (i = 0; i < numPts; i++) { System.out.println("pt " + points[i]); } */ }
v.normalize(); v.scale(20/mag); final Point2f cp = new Point2f(0, 0); // the current deltas
Point2f[] backAttenuation = new Point2f[arraySize]; for (int i=0; i< arraySize; i++) { attenuation[i] = new Point2f(); backAttenuation[i] = new Point2f(); Point2f[] attenuation = new Point2f[arraySize]; for (int i=0; i< arraySize; i++) attenuation[i] = new Point2f(); ptSound.getDistanceGain(attenuation); double[] frontDistance = new double[arraySize];
center = new Point2f(); Basic.vectorAdd2D(triRef.points[i1], triRef.points[i2[0]], center); Basic.multScalar2D(0.5, center);
Point2f[] attenuation = new Point2f[arraySize]; for (int i=0; i< arraySize; i++) attenuation[i] = new Point2f(); attribs.getDistanceFilter(attenuation); double[] distance = new double[arraySize];