Examples of Vector4d


Examples of javax.vecmath.Vector4d

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

Examples of javax.vecmath.Vector4d

  update(cv.ctx, enableMask, getLastLocalToVworld());
    }

void update(Context ctx, int enableMask, Transform3D trans) {
  for (int i = 0; i < 6; i++) {
    Vector4d v = xformPlanes[i];
    boolean enable = ((enableMask & (1 << i)) != 0);
    Pipeline.getPipeline().updateModelClip(ctx, i, enable,
                                           v.x, v.y, v.z, v.w);
  }
}
View Full Code Here

Examples of javax.vecmath.Vector4d

    protected Object clone() {
        ModelClipRetained mc = (ModelClipRetained)super.clone();

        mc.planes = new Vector4d[6];
  for (int i = 0; i < 6; i++) {
       mc.planes[i] = new Vector4d(this.planes[i]);
       mc.xformPlanes[i] = new Vector4d(this.xformPlanes[i]);
  }

        mc.enables = new boolean[6];
        getEnables(mc.enables);
View Full Code Here

Examples of javax.vecmath.Vector4d

/*      */
/* 1771 */     if ((this.upper.x > frustum.lower.x) && (this.lower.x < frustum.upper.x) && (this.upper.y > frustum.lower.y) && (this.lower.y < frustum.upper.y) && (this.upper.z > frustum.lower.z) && (this.lower.z < frustum.upper.z))
/*      */     {
/* 1778 */       int i = 5;
/* 1779 */       while (i >= 0) {
/* 1780 */         Vector4d vc = frustum.clipPlanes[(i--)];
/* 1781 */         if ((this.upper.x * vc.x + this.upper.y * vc.y + this.upper.z * vc.z + vc.w < 1.0E-008D) && (this.upper.x * vc.x + this.lower.y * vc.y + this.upper.z * vc.z + vc.w < 1.0E-008D) && (this.upper.x * vc.x + this.lower.y * vc.y + this.lower.z * vc.z + vc.w < 1.0E-008D) && (this.upper.x * vc.x + this.upper.y * vc.y + this.lower.z * vc.z + vc.w < 1.0E-008D) && (this.lower.x * vc.x + this.upper.y * vc.y + this.upper.z * vc.z + vc.w < 1.0E-008D) && (this.lower.x * vc.x + this.lower.y * vc.y + this.upper.z * vc.z + vc.w < 1.0E-008D) && (this.lower.x * vc.x + this.lower.y * vc.y + this.lower.z * vc.z + vc.w < 1.0E-008D) && (this.lower.x * vc.x + this.upper.y * vc.y + this.lower.z * vc.z + vc.w < 1.0E-008D))
/*      */         {
/* 1798 */           return false;
/*      */         }
/*      */
View Full Code Here

Examples of javax.vecmath.Vector4d

/*  77 */     for (int i = 0; i < 8; i++) {
/*  78 */       this.verts[i] = new Point3d();
/*     */     }
/*     */
/*  81 */     for (i = 0; i < 6; i++) {
/*  82 */       this.clipPlanes[i] = new Vector4d(planes[i]);
/*     */     }
/*  84 */     for (i = 0; i < 12; i++) {
/*  85 */       this.xEdges[i] = new Point4d();
/*  86 */       this.yEdges[i] = new Point4d();
/*  87 */       this.zEdges[i] = new Point4d();
View Full Code Here

Examples of javax.vecmath.Vector4d

/*     */
/* 110 */     for (int i = 0; i < 8; i++) {
/* 111 */       this.verts[i] = new Point3d();
/*     */     }
/* 113 */     for (i = 0; i < 6; i++) {
/* 114 */       this.clipPlanes[i] = new Vector4d();
/*     */     }
/* 116 */     for (i = 0; i < 12; i++) {
/* 117 */       this.xEdges[i] = new Point4d();
/* 118 */       this.yEdges[i] = new Point4d();
/* 119 */       this.zEdges[i] = new Point4d();
View Full Code Here

Examples of javax.vecmath.Vector4d

/*   68 */     for (int i = 0; i < planes.length; i++)
/*      */     {
/*   71 */       this.mag[i] = Math.sqrt(planes[i].x * planes[i].x + planes[i].y * planes[i].y + planes[i].z * planes[i].z);
/*      */
/*   73 */       double invMag = 1.0D / this.mag[i];
/*   74 */       this.planes[i] = new Vector4d(planes[i].x * invMag, planes[i].y * invMag, planes[i].z * invMag, planes[i].w * invMag);
/*      */     }
/*      */
/*   78 */     computeAllVerts();
/*      */   }
View Full Code Here

Examples of javax.vecmath.Vector4d

/*   95 */     this.boundId = 4;
/*   96 */     this.planes = new Vector4d[6];
/*   97 */     this.mag = new double[this.planes.length];
/*   98 */     this.pDotN = new double[this.planes.length];
/*      */
/*  100 */     this.planes[0] = new Vector4d(1.0D, 0.0D, 0.0D, -1.0D);
/*  101 */     this.planes[1] = new Vector4d(-1.0D, 0.0D, 0.0D, -1.0D);
/*  102 */     this.planes[2] = new Vector4d(0.0D, 1.0D, 0.0D, -1.0D);
/*  103 */     this.planes[3] = new Vector4d(0.0D, -1.0D, 0.0D, -1.0D);
/*  104 */     this.planes[4] = new Vector4d(0.0D, 0.0D, 1.0D, -1.0D);
/*  105 */     this.planes[5] = new Vector4d(0.0D, 0.0D, -1.0D, -1.0D);
/*  106 */     this.mag[0] = 1.0D;
/*  107 */     this.mag[1] = 1.0D;
/*  108 */     this.mag[2] = 1.0D;
/*  109 */     this.mag[3] = 1.0D;
/*  110 */     this.mag[4] = 1.0D;
View Full Code Here

Examples of javax.vecmath.Vector4d

/*  141 */       BoundingSphere sphere = (BoundingSphere)boundsObject;
/*  142 */       this.planes = new Vector4d[6];
/*  143 */       this.mag = new double[this.planes.length];
/*  144 */       this.pDotN = new double[this.planes.length];
/*      */
/*  146 */       this.planes[0] = new Vector4d(1.0D, 0.0D, 0.0D, -(sphere.center.x + sphere.radius));
/*  147 */       this.planes[1] = new Vector4d(-1.0D, 0.0D, 0.0D, sphere.center.x - sphere.radius);
/*  148 */       this.planes[2] = new Vector4d(0.0D, 1.0D, 0.0D, -(sphere.center.y + sphere.radius));
/*  149 */       this.planes[3] = new Vector4d(0.0D, -1.0D, 0.0D, sphere.center.y - sphere.radius);
/*  150 */       this.planes[4] = new Vector4d(0.0D, 0.0D, 1.0D, -(sphere.center.z + sphere.radius));
/*  151 */       this.planes[5] = new Vector4d(0.0D, 0.0D, -1.0D, sphere.center.z - sphere.radius);
/*  152 */       this.mag[0] = 1.0D;
/*  153 */       this.mag[1] = 1.0D;
/*  154 */       this.mag[2] = 1.0D;
/*  155 */       this.mag[3] = 1.0D;
/*  156 */       this.mag[4] = 1.0D;
/*  157 */       this.mag[5] = 1.0D;
/*  158 */       computeAllVerts();
/*      */     }
/*  160 */     else if (boundsObject.boundId == 1) {
/*  161 */       BoundingBox box = (BoundingBox)boundsObject;
/*  162 */       this.planes = new Vector4d[6];
/*  163 */       this.pDotN = new double[this.planes.length];
/*  164 */       this.mag = new double[this.planes.length];
/*      */
/*  166 */       this.planes[0] = new Vector4d(1.0D, 0.0D, 0.0D, -box.upper.x);
/*  167 */       this.planes[1] = new Vector4d(-1.0D, 0.0D, 0.0D, box.lower.x);
/*  168 */       this.planes[2] = new Vector4d(0.0D, 1.0D, 0.0D, -box.upper.y);
/*  169 */       this.planes[3] = new Vector4d(0.0D, -1.0D, 0.0D, box.lower.y);
/*  170 */       this.planes[4] = new Vector4d(0.0D, 0.0D, 1.0D, -box.upper.z);
/*  171 */       this.planes[5] = new Vector4d(0.0D, 0.0D, -1.0D, box.lower.z);
/*  172 */       this.mag[0] = 1.0D;
/*  173 */       this.mag[1] = 1.0D;
/*  174 */       this.mag[2] = 1.0D;
/*  175 */       this.mag[3] = 1.0D;
/*  176 */       this.mag[4] = 1.0D;
/*  177 */       this.mag[5] = 1.0D;
/*  178 */       computeAllVerts();
/*      */     }
/*  180 */     else if (boundsObject.boundId == 4) {
/*  181 */       BoundingPolytope polytope = (BoundingPolytope)boundsObject;
/*  182 */       this.planes = new Vector4d[polytope.planes.length];
/*  183 */       this.mag = new double[this.planes.length];
/*  184 */       this.pDotN = new double[this.planes.length];
/*  185 */       this.nVerts = polytope.nVerts;
/*  186 */       this.verts = new Point3d[this.nVerts];
/*  187 */       for (int i = 0; i < this.planes.length; i++) {
/*  188 */         this.planes[i] = new Vector4d(polytope.planes[i]);
/*  189 */         this.mag[i] = polytope.mag[i];
/*  190 */         this.pDotN[i] = polytope.pDotN[i];
/*      */       }
/*  192 */       for (i = 0; i < this.verts.length; i++) {
/*  193 */         this.verts[i] = new Point3d(polytope.verts[i]);
View Full Code Here

Examples of javax.vecmath.Vector4d

/*  237 */       BoundingSphere sphere = (BoundingSphere)boundsObjects[i];
/*  238 */       this.planes = new Vector4d[6];
/*  239 */       this.mag = new double[this.planes.length];
/*  240 */       this.pDotN = new double[this.planes.length];
/*      */
/*  242 */       this.planes[0] = new Vector4d(1.0D, 0.0D, 0.0D, -(sphere.center.x + sphere.radius));
/*  243 */       this.planes[1] = new Vector4d(-1.0D, 0.0D, 0.0D, sphere.center.x - sphere.radius);
/*  244 */       this.planes[2] = new Vector4d(0.0D, 1.0D, 0.0D, -(sphere.center.y + sphere.radius));
/*  245 */       this.planes[3] = new Vector4d(0.0D, -1.0D, 0.0D, sphere.center.y - sphere.radius);
/*  246 */       this.planes[4] = new Vector4d(0.0D, 0.0D, 1.0D, -(sphere.center.z + sphere.radius));
/*  247 */       this.planes[5] = new Vector4d(0.0D, 0.0D, -1.0D, sphere.center.z - sphere.radius);
/*  248 */       this.mag[0] = 1.0D;
/*  249 */       this.mag[1] = 1.0D;
/*  250 */       this.mag[2] = 1.0D;
/*  251 */       this.mag[3] = 1.0D;
/*  252 */       this.mag[4] = 1.0D;
/*  253 */       this.mag[5] = 1.0D;
/*      */
/*  255 */       computeAllVerts();
/*  256 */     } else if (boundsObjects[i].boundId == 1) {
/*  257 */       BoundingBox box = (BoundingBox)boundsObjects[i];
/*  258 */       this.planes = new Vector4d[6];
/*  259 */       this.mag = new double[this.planes.length];
/*  260 */       this.pDotN = new double[this.planes.length];
/*      */
/*  262 */       this.planes[0] = new Vector4d(1.0D, 0.0D, 0.0D, -box.upper.x);
/*  263 */       this.planes[1] = new Vector4d(-1.0D, 0.0D, 0.0D, box.lower.x);
/*  264 */       this.planes[2] = new Vector4d(0.0D, 1.0D, 0.0D, -box.upper.y);
/*  265 */       this.planes[3] = new Vector4d(0.0D, -1.0D, 0.0D, box.lower.y);
/*  266 */       this.planes[4] = new Vector4d(0.0D, 0.0D, 1.0D, -box.upper.z);
/*  267 */       this.planes[5] = new Vector4d(0.0D, 0.0D, -1.0D, box.lower.z);
/*  268 */       this.mag[0] = 1.0D;
/*  269 */       this.mag[1] = 1.0D;
/*  270 */       this.mag[2] = 1.0D;
/*  271 */       this.mag[3] = 1.0D;
/*  272 */       this.mag[4] = 1.0D;
/*  273 */       this.mag[5] = 1.0D;
/*      */
/*  275 */       computeAllVerts();
/*  276 */     } else if (boundsObjects[i].boundId == 4) {
/*  277 */       BoundingPolytope polytope = (BoundingPolytope)boundsObjects[i];
/*  278 */       this.planes = new Vector4d[polytope.planes.length];
/*  279 */       this.mag = new double[this.planes.length];
/*  280 */       this.pDotN = new double[this.planes.length];
/*  281 */       this.nVerts = polytope.nVerts;
/*  282 */       this.verts = new Point3d[this.nVerts];
/*  283 */       for (i = 0; i < this.planes.length; i++) {
/*  284 */         this.planes[i] = new Vector4d(polytope.planes[i]);
/*  285 */         this.pDotN[i] = polytope.pDotN[i];
/*  286 */         this.mag[i] = polytope.mag[i];
/*      */       }
/*  288 */       for (i = 0; i < this.verts.length; i++) {
/*  289 */         this.verts[i] = new Point3d(polytope.verts[i]);
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.