Package javax.vecmath

Examples of javax.vecmath.Vector3d.sub()


/*     */
/* 177 */     Point3d deltaImgPlate = new Point3d();
/* 178 */     this.canvas.getPixelLocationInImagePlate(xpos + 1, ypos, deltaImgPlate);
/*     */
/* 180 */     Vector3d ptToDelta = new Vector3d();
/* 181 */     ptToDelta.sub(mousePosn, deltaImgPlate);
/* 182 */     double distancePtToDelta = ptToDelta.length();
/* 183 */     distancePtToDelta *= this.tolerance;
/*     */
/* 185 */     this.canvas.getImagePlateToVworld(motion);
/*     */
View Full Code Here


/*  81 */     if ((bounds instanceof BoundingSphere)) {
/*  82 */       Point3d sphCenter = ((BoundingSphere)bounds).getCenter();
/*  83 */       double sphRadius = ((BoundingSphere)bounds).getRadius();
/*  84 */       double sqDist = Distance.pointToRay(sphCenter, this.origin, this.direction, rayPt, null);
/*     */
/*  86 */       vector.sub(rayPt, this.origin);
/*  87 */       double distance = vector.length();
/*  88 */       double radius = getRadius(distance);
/*  89 */       if (sqDist <= (sphRadius + radius) * (sphRadius + radius)) {
/*  90 */         return true;
/*     */       }
View Full Code Here

/*     */
/* 102 */       Point3d center = ((BoundingBox)bounds).getCenter();
/*     */
/* 105 */       double sqDist = Distance.pointToRay(center, this.origin, this.direction, rayPt, null);
/*     */
/* 108 */       vector.sub(rayPt, this.origin);
/* 109 */       double distance = vector.length();
/* 110 */       double radius = getRadius(distance);
/*     */
/* 112 */       double temp = center.x - lower.x + radius;
/* 113 */       double boxRadiusSquared = temp * temp;
 
View Full Code Here

/*     */
/* 154 */       for (int i = 0; i < edges.length; i++)
/*     */       {
/* 156 */         double distToEdge = Distance.rayToSegment(this.origin, this.direction, edges[i][0], edges[i][1], rayPt, null, null);
/*     */
/* 160 */         vector.sub(rayPt, this.origin);
/* 161 */         distance = vector.length();
/* 162 */         radius = getRadius(distance);
/*     */
/* 164 */         if (distToEdge <= radius * radius)
/*     */         {
View Full Code Here

/* 182 */       bsphere.getCenter(sphCenter);
/* 183 */       double sphRadius = bsphere.getRadius();
/*     */
/* 185 */       double sqDist = Distance.pointToRay(sphCenter, this.origin, this.direction, rayPt, null);
/*     */
/* 187 */       vector.sub(rayPt, this.origin);
/* 188 */       double distance = vector.length();
/* 189 */       double radius = getRadius(distance);
/* 190 */       if (sqDist > (sphRadius + radius) * (sphRadius + radius)) {
/* 191 */         return false;
/*     */       }
View Full Code Here

/*     */
/* 214 */           if (PickCylinder.pointInPolytope(ptope, midpt.x, midpt.y, midpt.z))
/*     */           {
/* 218 */             double distToEdge = Distance.rayToSegment(this.origin, this.direction, ptope.verts[i], ptope.verts[j], rayPt, null, null);
/*     */
/* 222 */             vector.sub(rayPt, this.origin);
/* 223 */             distance = vector.length();
/* 224 */             radius = getRadius(distance);
/* 225 */             if (distToEdge <= radius * radius)
/* 226 */               return true;
/*     */           }
View Full Code Here

/*     */
/* 243 */     this.canvas.getImagePlateToVworld(motion);
/*     */
/* 250 */     motion.transform(eyePosn);
/* 251 */     motion.transform(mousePosn);
/* 252 */     mouseVec.sub(mousePosn, eyePosn);
/* 253 */     mouseVec.normalize();
/*     */
/* 261 */     this.pickRay.set(eyePosn, mouseVec);
/*     */
/* 263 */     return this.pickRay;
View Full Code Here

/* 405 */       getVertexData(i++, pnt0);
/* 406 */       getVertexData(i++, pnt1);
/* 407 */       getVertexData(i++, pnt2);
/* 408 */       getVertexData(i++, pnt3);
/*     */
/* 411 */       tmpvec.sub(pnt0, pnt1);
/* 412 */       vec.sub(pnt1, pnt2);
/*     */
/* 415 */       normal.cross(tmpvec, vec);
/* 416 */       normal.normalize();
/*     */
View Full Code Here

/* 470 */           getVertexData(j++, pnt2);
/* 471 */           replaceIndex = 0;
/*     */         }
/*     */
/* 475 */         vec.sub(pnt0, pnt1);
/* 476 */         tmpvec.sub(pnt1, pnt2);
/*     */
/* 479 */         normal.cross(vec, tmpvec);
/* 480 */         normal.normalize();
/*     */
/* 482 */         if (!Double.isNaN(normal.x + normal.y + normal.z))
View Full Code Here

/* 370 */       getVertexData(i++, pnt0);
/* 371 */       getVertexData(i++, pnt1);
/* 372 */       getVertexData(i++, pnt2);
/*     */
/* 375 */       vec.sub(pnt0, pnt1);
/* 376 */       tmpvec.sub(pnt1, pnt2);
/*     */
/* 379 */       normal.cross(vec, tmpvec);
/* 380 */       normal.normalize();
/*     */
/* 383 */       if (!Double.isNaN(normal.x + normal.y + normal.z))
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.