Package javax.vecmath

Examples of javax.vecmath.Vector3d.sub()


/*  419 */     Vector3d centerToView = new Vector3d();
/*      */
/*  421 */     this.targetTG.getTransform(this.targetTransform);
/*      */
/*  423 */     this.targetTransform.get(this.rotMatrix, this.transVector);
/*  424 */     centerToView.sub(this.transVector, this.rotationCenter);
/*  425 */     this.distanceFromCenter = centerToView.length();
/*  426 */     this.startDistanceFromCenter = this.distanceFromCenter;
/*      */
/*  428 */     this.targetTransform.get(this.rotMatrix);
/*  429 */     this.rotateTransform.set(this.rotMatrix);
View Full Code Here


/* 452 */           getVertexData(j++, pnt1);
/* 453 */           replaceIndex = 2;
/*     */         }
/*     */
/* 457 */         vec.sub(pnt0, pnt1);
/* 458 */         tmpvec.sub(pnt1, pnt2);
/*     */
/* 461 */         normal.cross(vec, tmpvec);
/* 462 */         normal.normalize();
/*     */
/* 464 */         if (!Double.isNaN(normal.x + normal.y + normal.z))
View Full Code Here

/* 105 */     if ((bounds instanceof BoundingSphere)) {
/* 106 */       Point3d sphCenter = ((BoundingSphere)bounds).getCenter();
/* 107 */       double sphRadius = ((BoundingSphere)bounds).getRadius();
/* 108 */       double sqDist = Distance.pointToSegment(sphCenter, this.origin, this.end, rayPt, null);
/*     */
/* 111 */       vector.sub(rayPt, this.origin);
/* 112 */       double distance = vector.length();
/* 113 */       double radius = getRadius(distance);
/* 114 */       if (sqDist <= (sphRadius + radius) * (sphRadius + radius)) {
/* 115 */         return true;
/*     */       }
View Full Code Here

/*     */
/* 127 */       Point3d center = ((BoundingBox)bounds).getCenter();
/*     */
/* 130 */       double sqDist = Distance.pointToSegment(center, this.origin, this.end, rayPt, null);
/*     */
/* 133 */       vector.sub(rayPt, this.origin);
/* 134 */       double distance = vector.length();
/* 135 */       double radius = getRadius(distance);
/*     */
/* 137 */       double temp = center.x - lower.x + radius;
/* 138 */       double boxRadiusSquared = temp * temp;
 
View Full Code Here

/*     */
/* 177 */       for (int i = 0; i < edges.length; i++)
/*     */       {
/* 179 */         double distToEdge = Distance.segmentToSegment(this.origin, this.end, edges[i][0], edges[i][1], rayPt, null, null);
/*     */
/* 183 */         vector.sub(rayPt, this.origin);
/* 184 */         distance = vector.length();
/* 185 */         radius = getRadius(distance);
/*     */
/* 191 */         if (distToEdge <= radius * radius)
/*     */         {
View Full Code Here

/* 209 */       bsphere.getCenter(sphCenter);
/* 210 */       double sphRadius = bsphere.getRadius();
/*     */
/* 212 */       double sqDist = Distance.pointToSegment(sphCenter, this.origin, this.end, rayPt, null);
/*     */
/* 215 */       vector.sub(rayPt, this.origin);
/* 216 */       double distance = vector.length();
/* 217 */       double radius = getRadius(distance);
/*     */
/* 219 */       if (sqDist > (sphRadius + radius) * (sphRadius + radius)) {
/* 220 */         return false;
View Full Code Here

/*     */
/* 243 */           if (PickCylinder.pointInPolytope(ptope, midpt.x, midpt.y, midpt.z))
/*     */           {
/* 247 */             double distToEdge = Distance.segmentToSegment(this.origin, this.end, ptope.verts[i], ptope.verts[j], rayPt, null, null);
/*     */
/* 251 */             vector.sub(rayPt, this.origin);
/* 252 */             distance = vector.length();
/* 253 */             radius = getRadius(distance);
/* 254 */             if (distToEdge <= radius * radius)
/* 255 */               return true;
/*     */           }
View Full Code Here

/*       */       {
/*  7818 */         sqDistToEdge = Distance.rayToSegment(origin, direction, coordinates[i], coordinates[j], iPnt1, iPnt, null);
/*       */       }
/*       */
/*  7823 */       if (sqDistToEdge <= radius * radius) {
/*  7824 */         originToIpnt.sub(iPnt1, origin);
/*  7825 */         dist[0] = originToIpnt.length();
/*  7826 */         freePoint3d(origin);
/*  7827 */         freePoint3d(end);
/*  7828 */         freeVector3d(direction);
/*  7829 */         freeVector3d(originToIpnt);
View Full Code Here

/*       */     }
/*       */     else {
/*  7965 */       sqDist = Distance.pointToRay(pt, origin, direction, iPnt, null);
/*       */     }
/*  7967 */     if (sqDist <= radius * radius) {
/*  7968 */       originToIpnt.sub(iPnt, origin);
/*  7969 */       dist[0] = originToIpnt.length();
/*  7970 */       freePoint3d(origin);
/*  7971 */       freePoint3d(end);
/*  7972 */       freePoint3d(iPnt);
/*  7973 */       freeVector3d(originToIpnt);
View Full Code Here

/*  8010 */       sqDist = Distance.pointToSegment(pt, origin, end, iPnt, null);
/*       */     }
/*       */     else {
/*  8013 */       sqDist = Distance.pointToRay(pt, origin, direction, iPnt, null);
/*       */     }
/*  8015 */     originToIpnt.sub(iPnt, origin);
/*  8016 */     double distance = originToIpnt.length();
/*  8017 */     double radius = Math.tan(cone.getSpreadAngle()) * distance;
/*  8018 */     if (sqDist <= radius * radius) {
/*  8019 */       dist[0] = distance;
/*  8020 */       freePoint3d(origin);
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.