Package javax.vecmath

Examples of javax.vecmath.Point2f


/*     */     double det;
/* 104 */     if ((i == j) || (i == k) || (j == k)) {
/* 105 */       det = 0.0D;
/*     */     }
/*     */     else {
/* 108 */       Point2f numericsHP = triRef.points[i];
/* 109 */       Point2f numericsHQ = triRef.points[j];
/* 110 */       Point2f numericsHR = triRef.points[k];
/*     */       double det;
/* 112 */       if (i < j)
/*     */       {
/*     */         double det;
/* 113 */         if (j < k) {
View Full Code Here


/* 259 */       if (numericsHOri1 < 0) {
/* 260 */         angle = -1;
/*     */       }
/*     */       else
/*     */       {
/* 266 */         Point2f numericsHP = new Point2f();
/* 267 */         Point2f numericsHQ = new Point2f();
/* 268 */         Basic.vectorSub2D(triRef.points[i], triRef.points[j], numericsHP);
/* 269 */         Basic.vectorSub2D(triRef.points[k], triRef.points[j], numericsHQ);
/* 270 */         double numericsHDot = Basic.dotProduct2D(numericsHP, numericsHQ);
/*     */         int angle;
/* 271 */         if (numericsHDot < 0.0D)
View Full Code Here

/* 406 */     return true;
/*     */   }
/*     */
/*     */   static double getRatio(Triangulator triRef, int i, int j, int k)
/*     */   {
/* 427 */     Point2f p = triRef.points[i];
/* 428 */     Point2f q = triRef.points[j];
/* 429 */     Point2f r = triRef.points[k];
/*     */
/* 432 */     double a = baseLength(p, q);
/* 433 */     double b = baseLength(p, r);
/* 434 */     double c = baseLength(r, q);
/* 435 */     double base = max3(a, b, c);
View Full Code Here

/* 561 */         if (ori2 > 0) return 2;
/*     */       }
/* 563 */       return -2;
/*     */     }
/*     */
/* 566 */     Point2f pq = new Point2f();
/* 567 */     Basic.vectorSub2D(triRef.points[i1], triRef.points[i2], pq);
/* 568 */     Point2f pr = new Point2f();
/* 569 */     Basic.vectorSub2D(triRef.points[i3], triRef.points[i2], pr);
/* 570 */     double dot = Basic.dotProduct2D(pq, pr);
/* 571 */     if (dot < 0.0D) {
/* 572 */       ori = orientation(triRef, i2, i1, i0);
/* 573 */       if (ori > 0) return 2;
View Full Code Here

/*     */   {
/* 597 */     int sign = Basic.signEps(Basic.det2D(p2, p, p1), triRef.epsilon);
/*     */
/* 599 */     if (sign == 0) return 0.0D;
/*     */
/* 601 */     Point2f v1 = new Point2f();
/* 602 */     Point2f v2 = new Point2f();
/* 603 */     Basic.vectorSub2D(p1, p, v1);
/* 604 */     Basic.vectorSub2D(p2, p, v2);
/*     */
/* 606 */     double angle1 = Math.atan2(v1.y, v1.x);
/* 607 */     double angle2 = Math.atan2(v2.y, v2.x);
View Full Code Here

/*     */       }
/*     */     }
/*     */
/* 195 */     Point2f[] attenuation = new Point2f[distanceLength];
/* 196 */     for (int i = 0; i < distanceLength; i++) {
/* 197 */       attenuation[i] = new Point2f(this.backAttenuationDistance[i], this.backAttenuationGain[i]);
/*     */     }
/*     */
/* 200 */     dispatchAttribChange(256, attenuation);
/* 201 */     if ((this.source != null) && (this.source.isLive()))
/* 202 */       notifySceneGraphChanged(false);
View Full Code Here

/*      */           }
/*      */           else
/*      */           {
/* 1310 */             Point2f[] attenuation = new Point2f[arraySize];
/* 1311 */             for (int i = 0; i < arraySize; i++)
/* 1312 */               attenuation[i] = new Point2f();
/* 1313 */             attribs.getDistanceFilter(attenuation);
/* 1314 */             double[] distance = new double[arraySize];
/* 1315 */             float[] cutoff = new float[arraySize];
/* 1316 */             for (int i = 0; i < arraySize; i++) {
/* 1317 */               distance[i] = attenuation[i].x;
View Full Code Here

/*      */         }
/*      */         else {
/* 2744 */           Point2f[] attenuation = new Point2f[arraySize];
/* 2745 */           Point2f[] backAttenuation = new Point2f[arraySize];
/* 2746 */           for (int i = 0; i < arraySize; i++) {
/* 2747 */             attenuation[i] = new Point2f();
/* 2748 */             backAttenuation[i] = new Point2f();
/*      */           }
/* 2750 */           cnSound.getDistanceGain(attenuation, backAttenuation);
/* 2751 */           double[] frontDistance = new double[arraySize];
/* 2752 */           float[] frontGain = new float[arraySize];
/* 2753 */           double[] backDistance = new double[arraySize];
/* 2754 */           float[] backGain = new float[arraySize];
/* 2755 */           for (int i = 0; i < arraySize; i++) {
/* 2756 */             frontDistance[i] = attenuation[i].x;
/* 2757 */             frontGain[i] = attenuation[i].y;
/* 2758 */             backDistance[i] = backAttenuation[i].x;
/* 2759 */             backGain[i] = backAttenuation[i].y;
/*      */           }
/* 2761 */           this.audioDevice3D.setDistanceGain(index, frontDistance, frontGain, backDistance, backGain);
/*      */         }
/*      */
/*      */       }
/* 2765 */       else if ((sound instanceof PointSoundRetained)) {
/* 2766 */         PointSoundRetained ptSound = (PointSoundRetained)sound;
/*      */
/* 2770 */         int arraySize = ptSound.getDistanceGainLength();
/* 2771 */         if (arraySize == 0)
/*      */         {
/* 2773 */           this.audioDevice3D.setDistanceGain(index, null, null, null, null);
/*      */         }
/*      */         else {
/* 2776 */           Point2f[] attenuation = new Point2f[arraySize];
/* 2777 */           for (int i = 0; i < arraySize; i++)
/* 2778 */             attenuation[i] = new Point2f();
/* 2779 */           ptSound.getDistanceGain(attenuation);
/* 2780 */           double[] frontDistance = new double[arraySize];
/* 2781 */           float[] frontGain = new float[arraySize];
/* 2782 */           for (int i = 0; i < arraySize; i++) {
/* 2783 */             frontDistance[i] = attenuation[i].x;
View Full Code Here

/* 1023 */       this.maxNumPoints = number;
/* 1024 */       this.points = new Point2f[this.maxNumPoints];
/*      */     }
/*      */
/* 1027 */     for (int i = 0; i < number; i++) {
/* 1028 */       this.points[i] = new Point2f(0.0F, 0.0F);
/*      */     }
/* 1030 */     this.numPoints = 0;
/*      */   }
View Full Code Here

/* 1047 */       this.points = new Point2f[this.maxNumPoints];
/* 1048 */       if (old != null) {
/* 1049 */         System.arraycopy(old, 0, this.points, 0, old.length);
/*      */       }
/*      */     }
/* 1052 */     this.points[this.numPoints] = new Point2f((float)x, (float)y);
/*      */
/* 1055 */     int i = this.numPoints;
/* 1056 */     this.numPoints += 1;
/*      */
/* 1058 */     return i;
View Full Code Here

TOP

Related Classes of javax.vecmath.Point2f

Copyright © 2018 www.massapicom. 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.