Package javax.vecmath

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


/*     */     {
/* 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

/*     */
/*     */   boolean intersect_ptope_abox(BoundingPolytope polyTope, BoundingBox box)
/*     */   {
/* 533 */     Vector4d[] planes = new Vector4d[6];
/*     */
/* 538 */     planes[0] = new Vector4d(-1.0D, 0.0D, 0.0D, box.lower.x);
/* 539 */     planes[1] = new Vector4d(1.0D, 0.0D, 0.0D, -box.upper.x);
/* 540 */     planes[2] = new Vector4d(0.0D, -1.0D, 0.0D, box.lower.y);
/* 541 */     planes[3] = new Vector4d(0.0D, 1.0D, 0.0D, -box.upper.y);
/* 542 */     planes[4] = new Vector4d(0.0D, 0.0D, -1.0D, box.lower.z);
/* 543 */     planes[5] = new Vector4d(0.0D, 0.0D, 1.0D, -box.upper.z);
/*     */
/* 546 */     BoundingPolytope pbox = new BoundingPolytope(planes);
/*     */
/* 548 */     boolean result = intersect_ptope_ptope(polyTope, pbox);
/*     */
View Full Code Here

/*    */   static boolean pointInPolytope(BoundingPolytope ptope, double x, double y, double z)
/*    */   {
/* 79 */     int i = ptope.planes.length - 1;
/*    */
/* 81 */     while (i >= 0) {
/* 82 */       Vector4d p = ptope.planes[(i--)];
/* 83 */       if (x * p.x + y * p.y + z * p.z + p.w > 1.0E-006D) {
/* 84 */         return false;
/*    */       }
/*    */     }
/* 87 */     return true;
View Full Code Here

/* 1999 */     this.canvas = canvas;
/* 2000 */     this.screenViewCache = screenViewCache;
/* 2001 */     this.viewCache = viewCache;
/*      */
/* 2005 */     for (int i = 0; i < this.leftFrustumPlanes.length; i++) {
/* 2006 */       this.leftFrustumPlanes[i] = new Vector4d();
/* 2007 */       this.rightFrustumPlanes[i] = new Vector4d();
/*      */     }
/*      */
/* 2010 */     for (i = 0; i < this.leftFrustumPoints.length; i++) {
/* 2011 */       this.leftFrustumPoints[i] = new Point4d();
/* 2012 */       this.rightFrustumPoints[i] = new Point4d();
View Full Code Here

/*     */
/* 680 */     ModelClipRetained attr = (ModelClipRetained)originalNode.retained;
/*     */
/* 682 */     ModelClipRetained rt = (ModelClipRetained)this.retained;
/*     */
/* 684 */     Vector4d plane = new Vector4d();
/*     */
/* 686 */     for (int i = 5; i >= 0; i--) {
/* 687 */       attr.getPlane(i, plane);
/* 688 */       rt.initPlane(i, plane);
/* 689 */       rt.initEnable(i, attr.getEnable(i));
View Full Code Here

/*     */   public void writeVector4d(DataOutput out, Vector4d vec) throws IOException {
/* 742 */     writeTuple4d(out, vec);
/*     */   }
/*     */
/*     */   public Vector4d readVector4d(DataInput in) throws IOException {
/* 746 */     return (Vector4d)readTuple4d(in, new Vector4d());
/*     */   }
View Full Code Here

/*      */
/*   98 */   boolean isViewScoped = false;
/*      */
/*      */   ModelClipRetained()
/*      */   {
/*  107 */     this.planes[0] = new Vector4d(1.0D, 0.0D, 0.0D, -1.0D);
/*  108 */     this.planes[1] = new Vector4d(-1.0D, 0.0D, 0.0D, -1.0D);
/*  109 */     this.planes[2] = new Vector4d(0.0D, 1.0D, 0.0D, -1.0D);
/*  110 */     this.planes[3] = new Vector4d(0.0D, -1.0D, 0.0D, -1.0D);
/*  111 */     this.planes[4] = new Vector4d(0.0D, 0.0D, 1.0D, -1.0D);
/*  112 */     this.planes[5] = new Vector4d(0.0D, 0.0D, -1.0D, -1.0D);
/*      */
/*  114 */     for (int i = 0; i < 6; i++)
/*  115 */       this.xformPlanes[i] = new Vector4d(this.planes[i]);
/*      */     int tmp325_324 = (this.enables[2] = this.enables[3] = this.enables[4] = this.enables[5] = 1); this.enables[1] = tmp325_324; this.enables[0] = tmp325_324;
/*      */   }
View Full Code Here

/*      */   {
/*  144 */     Vector4d[] pl = new Vector4d[6];
/*  145 */     initPlanes(planes);
/*      */
/*  147 */     for (int i = 0; i < 6; i++) {
/*  148 */       pl[i] = new Vector4d(this.xformPlanes[i]);
/*      */     }
/*      */
/*  151 */     sendMessage(2, pl, null);
/*      */   }
View Full Code Here

/*      */   }
/*      */
/*      */   void setPlane(int planeNum, Vector4d plane)
/*      */   {
/*  175 */     initPlane(planeNum, plane);
/*  176 */     sendMessage(1, new Integer(planeNum), new Vector4d(this.xformPlanes[planeNum]));
/*      */   }
View Full Code Here

TOP

Related Classes of javax.vecmath.Vector4d

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.