Examples of Vector4d


Examples of javax.vecmath.Vector4d

/*  326 */     for (int i = 0; i < planes.length; i++)
/*      */     {
/*  328 */       this.mag[i] = Math.sqrt(planes[i].x * planes[i].x + planes[i].y * planes[i].y + planes[i].z * planes[i].z);
/*      */
/*  330 */       double invMag = 1.0D / this.mag[i];
/*  331 */       this.planes[i] = new Vector4d(planes[i].x * invMag, planes[i].y * invMag, planes[i].z * invMag, planes[i].w * invMag);
/*      */     }
/*      */
/*  334 */     computeAllVerts();
/*      */   }
View Full Code Here

Examples of javax.vecmath.Vector4d

/*      */     }
/*  426 */     else if (boundsObject.boundId == 4) {
/*  427 */       BoundingPolytope polytope = (BoundingPolytope)boundsObject;
/*  428 */       if (this.planes.length != polytope.planes.length) {
/*  429 */         this.planes = new Vector4d[polytope.planes.length];
/*  430 */         for (int k = 0; k < polytope.planes.length; k++) this.planes[k] = new Vector4d();
/*  431 */         this.mag = new double[polytope.planes.length];
/*  432 */         this.pDotN = new double[polytope.planes.length];
/*      */       }
/*      */
/*  436 */       for (int i = 0; i < polytope.planes.length; i++) {
View Full Code Here

Examples of javax.vecmath.Vector4d

/*  680 */       this.verts[0] = new Point3d(point.x, point.y, point.z);
/*      */
/*  682 */       for (int i = 0; i < this.planes.length; i++) {
/*  683 */         this.pDotN[i] = 0.0D;
/*      */       }
/*  685 */       this.planes[0] = new Vector4d(1.0D, 0.0D, 0.0D, -point.x);
/*  686 */       this.planes[1] = new Vector4d(-1.0D, 0.0D, 0.0D, point.x);
/*  687 */       this.planes[2] = new Vector4d(0.0D, 1.0D, 0.0D, -point.y);
/*  688 */       this.planes[3] = new Vector4d(0.0D, -1.0D, 0.0D, point.y);
/*  689 */       this.planes[4] = new Vector4d(0.0D, 0.0D, 1.0D, -point.z);
/*  690 */       this.planes[5] = new Vector4d(0.0D, 0.0D, -1.0D, point.z);
/*  691 */       this.mag[0] = 1.0D;
/*  692 */       this.mag[1] = 1.0D;
/*  693 */       this.mag[2] = 1.0D;
/*  694 */       this.mag[3] = 1.0D;
/*  695 */       this.mag[4] = 1.0D;
View Full Code Here

Examples of javax.vecmath.Vector4d

/*  733 */       this.verts[0] = new Point3d(points[0].x, points[0].y, points[0].z);
/*      */
/*  735 */       for (int i = 0; i < this.planes.length; i++) {
/*  736 */         this.pDotN[i] = 0.0D;
/*      */       }
/*  738 */       this.planes[0] = new Vector4d(1.0D, 0.0D, 0.0D, -points[0].x);
/*  739 */       this.planes[1] = new Vector4d(-1.0D, 0.0D, 0.0D, points[0].x);
/*  740 */       this.planes[2] = new Vector4d(0.0D, 1.0D, 0.0D, -points[0].y);
/*  741 */       this.planes[3] = new Vector4d(0.0D, -1.0D, 0.0D, points[0].y);
/*  742 */       this.planes[4] = new Vector4d(0.0D, 0.0D, 1.0D, -points[0].z);
/*  743 */       this.planes[5] = new Vector4d(0.0D, 0.0D, -1.0D, points[0].z);
/*  744 */       this.mag[0] = 1.0D;
/*  745 */       this.mag[1] = 1.0D;
/*  746 */       this.mag[2] = 1.0D;
/*  747 */       this.mag[3] = 1.0D;
/*  748 */       this.mag[4] = 1.0D;
View Full Code Here

Examples of javax.vecmath.Vector4d

/*  833 */     for (i = 0; i < this.planes.length; i++)
/*      */     {
/*  836 */       this.mag[i] = Math.sqrt(this.planes[i].x * this.planes[i].x + this.planes[i].y * this.planes[i].y + this.planes[i].z * this.planes[i].z);
/*      */
/*  838 */       double invMag = 1.0D / this.mag[i];
/*  839 */       this.planes[i] = new Vector4d(this.planes[i].x * invMag, this.planes[i].y * invMag, this.planes[i].z * invMag, this.planes[i].w * invMag);
/*      */     }
/*      */
/*  844 */     for (i = 0; i < this.verts.length; i++)
/*  845 */       matrix.transform(this.verts[i]);
/*      */   }
View Full Code Here

Examples of javax.vecmath.Vector4d

/* 1287 */     else if (boundsObject.boundId == 4) {
/* 1288 */       BoundingPolytope polytope = (BoundingPolytope)boundsObject;
/* 1289 */       if (intersect(polytope)) {
/* 1290 */         Vector4d[] newPlanes = new Vector4d[this.planes.length + polytope.planes.length];
/* 1291 */         for (int i = 0; i < this.planes.length; i++) {
/* 1292 */           newPlanes[i] = new Vector4d(this.planes[i]);
/*      */         }
/* 1294 */         for (i = 0; i < polytope.planes.length; i++) {
/* 1295 */           newPlanes[(this.planes.length + i)] = new Vector4d(polytope.planes[i]);
/*      */         }
/* 1297 */         BoundingPolytope newPtope = new BoundingPolytope(newPlanes);
/*      */
/* 1299 */         newBoundPolytope.set(newPtope);
/* 1300 */         return true;
View Full Code Here

Examples of javax.vecmath.Vector4d

/* 1375 */         else if (boundsObjects[i].boundId == 4) {
/* 1376 */           BoundingPolytope polytope = (BoundingPolytope)boundsObjects[i];
/* 1377 */           if (intersect(polytope)) {
/* 1378 */             Vector4d[] newPlanes = new Vector4d[this.planes.length + polytope.planes.length];
/* 1379 */             for (i = 0; i < this.planes.length; i++) {
/* 1380 */               newPlanes[i] = new Vector4d(this.planes[i]);
/*      */             }
/* 1382 */             for (i = 0; i < polytope.planes.length; i++) {
/* 1383 */               newPlanes[(this.planes.length + i)] = new Vector4d(polytope.planes[i]);
/*      */             }
/* 1385 */             BoundingPolytope newPtope = new BoundingPolytope(newPlanes);
/* 1386 */             if (status) {
/* 1387 */               newBoundingPolytope.combine(newPtope);
/*      */             } else {
View Full Code Here

Examples of javax.vecmath.Vector4d

/* 1671 */     this.pDotN = new double[6];
/* 1672 */     this.mag = new double[6];
/* 1673 */     this.verts = new Point3d[this.planes.length * this.planes.length];
/* 1674 */     this.nVerts = 0;
/*      */
/* 1676 */     this.planes[0] = new Vector4d(1.0D, 0.0D, 0.0D, -1.0D);
/* 1677 */     this.planes[1] = new Vector4d(-1.0D, 0.0D, 0.0D, -1.0D);
/* 1678 */     this.planes[2] = new Vector4d(0.0D, 1.0D, 0.0D, -1.0D);
/* 1679 */     this.planes[3] = new Vector4d(0.0D, -1.0D, 0.0D, -1.0D);
/* 1680 */     this.planes[4] = new Vector4d(0.0D, 0.0D, 1.0D, -1.0D);
/* 1681 */     this.planes[5] = new Vector4d(0.0D, 0.0D, -1.0D, -1.0D);
/* 1682 */     this.mag[0] = 1.0D;
/* 1683 */     this.mag[1] = 1.0D;
/* 1684 */     this.mag[2] = 1.0D;
/* 1685 */     this.mag[3] = 1.0D;
/* 1686 */     this.mag[4] = 1.0D;
View Full Code Here

Examples of javax.vecmath.Vector4d

/* 1705 */       BoundingPolytope region = (BoundingPolytope)r;
/* 1706 */       if (region.planes.length != this.planes.length) {
/* 1707 */         region.planes = new Vector4d[this.planes.length];
/*      */
/* 1709 */         for (int k = 0; k < region.planes.length; k++) {
/* 1710 */           region.planes[k] = new Vector4d();
/*      */         }
/* 1712 */         region.mag = new double[this.planes.length];
/* 1713 */         region.pDotN = new double[this.planes.length];
/* 1714 */         region.verts = new Point3d[this.nVerts];
/* 1715 */         region.nVerts = this.nVerts;
View Full Code Here

Examples of javax.vecmath.Vector4d

/*     */     {
/* 338 */       boolean inside = true;
/* 339 */       double aa = 0.0D; double bb = 0.0D; double cc = 0.0D;
/* 340 */       double ab = 0.0D; double ac = 0.0D; double bc = 0.0D; double ad = 0.0D; double bd = 0.0D; double cd = 0.0D;
/* 341 */       for (int i = 0; i < planes.length; i++) {
/* 342 */         Vector4d pln = planes[i];
/* 343 */         double dist = p.x * pln.x + p.y * pln.y + p.z * pln.z + pln.w;
/*     */
/* 350 */         if (dist > -1.0E-006D) {
/* 351 */           aa += pln.x * pln.x;
/* 352 */           bb += pln.y * pln.y;
 
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.