Examples of Vector4d


Examples of javax.vecmath.Vector4d

  }

  // check if all box points out any frustum plane
  int i = 5;
  while (i>=0){
      Vector4d vc = frustum.clipPlanes[i--];
      if ((( upper.x*vc.x + upper.y*vc.y +
       upper.z*vc.z + vc.w ) < 0.0 ) &&
    (( upper.x*vc.x + lower.y*vc.y +
       upper.z*vc.z + vc.w ) < 0.0 ) &&
    (( upper.x*vc.x + lower.y*vc.y +
View Full Code Here

Examples of javax.vecmath.Vector4d

  this.viewCache = viewCache;

        // Set up the initial plane equations
  int i;
  for (i = 0; i < leftFrustumPlanes.length; i++) {
      leftFrustumPlanes[i] = new Vector4d();
      rightFrustumPlanes[i] = new Vector4d();
  }

  for (i = 0; i < leftFrustumPoints.length; i++) {
      leftFrustumPoints[i] = new Point4d();
      rightFrustumPoints[i] = new Point4d();
View Full Code Here

Examples of javax.vecmath.Vector4d

      for(i=0;i<8;i++){
        verts[i] = new Point3d();
      }

      for(i=0;i<6;i++){
   clipPlanes[i] = new Vector4d( planes[i] );
      }
      computeValues(clipPlanes);
    }
View Full Code Here

Examples of javax.vecmath.Vector4d

      for(i=0;i<8;i++){
        verts[i] = new Point3d();
      }
      for(i=0;i<6;i++){
   clipPlanes[i] = new Vector4d();
      }

    }
View Full Code Here

Examples of javax.vecmath.Vector4d

  ModelClipRetained attr = (ModelClipRetained)
                                originalNode.retained;
  ModelClipRetained rt = (ModelClipRetained) retained;

  Vector4d plane = new Vector4d();

  for (int i=5; i >=0; i--) {
      attr.getPlane(i, plane);
      rt.initPlane(i, plane);
      rt.initEnable(i, attr.getEnable(i));
View Full Code Here

Examples of javax.vecmath.Vector4d

  converged = false;
  firstPoint = true;
  firstInside = false;

  Vector4d pln;

  while( !converged ) {
      if (debug) {
    System.err.println("start: p="+" "+p.x+" "+p.y+" "+p.z);
      }
View Full Code Here

Examples of javax.vecmath.Vector4d

      return true;
  }
    }

    boolean intersect_ptope_abox( BoundingPolytope polyTope, BoundingBox box) {
         Vector4d planes[] = new Vector4d[6];

  if (debug) {
      System.err.println("ptope_abox, box = " + box);
  }
  planes[0] = new Vector4d( -1.0, 0.0, 0.0, box.lower.x);
  planes[1] = new Vector4d1.0, 0.0, 0.0,-box.upper.x);
  planes[2] = new Vector4d0.0,-1.0, 0.0, box.lower.y);
  planes[3] = new Vector4d0.0, 1.0, 0.0,-box.upper.y);
  planes[4] = new Vector4d0.0, 0.0,-1.0, box.lower.z);
  planes[5] = new Vector4d0.0, 0.0, 1.0,-box.upper.z);


  BoundingPolytope pbox = new BoundingPolytope( planes);

  boolean result = intersect_ptope_ptope( polyTope, pbox );
View Full Code Here

Examples of javax.vecmath.Vector4d

    // BoundingPolytope
    // XXXX: remove this once the original method is available (public) in
    // BoundingPolytope
    static boolean pointInPolytope(BoundingPolytope ptope,
           double x, double y, double z ){
  Vector4d p;
  int i = ptope.planes.length - 1;

  while (i >= 0) {
      p = ptope.planes[i--];
      if (( x*p.x + y*p.y + z*p.z + p.w ) > Bounds.EPSILON) {
View Full Code Here

Examples of javax.vecmath.Vector4d

     * Constructs and initializes model clip planes
     */
    ModelClipRetained() {

  // planes contains the negate default values
  planes[0] = new Vector4d( 1.0, 0.00.0,-1.0);
  planes[1] = new Vector4d(-1.0, 0.00.0,-1.0);
  planes[2] = new Vector4d( 0.0, 1.00.0,-1.0);
  planes[3] = new Vector4d( 0.0,-1.00.0,-1.0);
  planes[4] = new Vector4d( 0.0, 0.01.0,-1.0);
  planes[5] = new Vector4d( 0.0, 0.0, -1.0,-1.0);

  for (int i = 0; i < 6; i++)
      xformPlanes[i] = new Vector4d(planes[i]);

        enables[0] = enables[1] = enables[2] = enables[3] =
      enables[4] = enables[5] = true;
    }
View Full Code Here

Examples of javax.vecmath.Vector4d

    void setPlanes(Vector4d[] planes) {
        Vector4d[] pl = new Vector4d[6];
  initPlanes(planes);

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

  sendMessage(PLANES_CHANGED, pl, null);
    }
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.