Package javax.vecmath

Examples of javax.vecmath.Point3d


    planes[i] = new Vector4d(polytope.planes[i]);
    pDotN[i] = polytope.pDotN[i];
    mag[i] = polytope.mag[i];
      }
      for(i=0;i<verts.length;i++) {
    verts[i] = new Point3d(polytope.verts[i]);
      }
      centroid = polytope.centroid;
  } else {
      throw new IllegalArgumentException(J3dI18N.getString("BoundingPolytope1"));
  }
View Full Code Here


    mag[i] = polytope.mag[i];
      }
      nVerts = polytope.nVerts;
      verts  = new Point3d[nVerts];
      for (k=0; k<nVerts; k++) {
    verts[k] = new Point3d(polytope.verts[k]);
      }

      boundsIsEmpty = boundsObject.boundsIsEmpty;
      boundsIsInfinite = boundsObject.boundsIsInfinite;
View Full Code Here

            }
  } else if( boundsObject  instanceof BoundingBox){
      BoundingBox b = (BoundingBox)boundsObject;
      if( !allocBoxVerts){
    boxVerts = new Point3d[8];
    for(int j=0;j<8;j++)boxVerts[j] = new Point3d();
    allocBoxVerts = true;
      }
      boxVerts[0].set(b.lower.x, b.lower.y, b.lower.z );
      boxVerts[1].set(b.lower.x, b.upper.y, b.lower.z );
      boxVerts[2].set(b.upper.x, b.lower.y, b.lower.z );
View Full Code Here

    }
      } else if( boundsObjects[i].boundId == BOUNDING_BOX){
    BoundingBox b = (BoundingBox)boundsObjects[i];
    if( !allocBoxVerts){
        boxVerts = new Point3d[8];
        for(int j=0;j<8;j++)boxVerts[j] = new Point3d();
        allocBoxVerts = true;
    }
    boxVerts[0].set(b.lower.x, b.lower.y, b.lower.z );
    boxVerts[1].set(b.lower.x, b.upper.y, b.lower.z );
    boxVerts[2].set(b.upper.x, b.lower.y, b.lower.z );
View Full Code Here

      planes = new Vector4d[6];
      mag = new double[planes.length];
      pDotN  = new double[planes.length];
      nVerts = 1;
      verts = new Point3d[nVerts];
      verts[0] = new Point3d( point.x, point.y, point.z);

      for(i=0;i<planes.length;i++) {
    pDotN[i] 0.0;
      }
      planes[0] = new Vector4d( 1.0, 0.0, 0.0, -point.x );
View Full Code Here

      planes = new Vector4d[6];
      mag = new double[planes.length];
      pDotN  = new double[planes.length];
      nVerts = points.length;
      verts = new Point3d[nVerts];
      verts[0] = new Point3d( points[0].x, points[0].y, points[0].z);

      for(i=0;i<planes.length;i++) {
    pDotN[i] 0.0;
      }
      planes[0] = new Vector4d( 1.0, 0.0, 0.0, -points[0].x );
View Full Code Here

      position.z = start.z;
      position.w = 0.0;
      return true;
  }

  Point3d direction = new Point3d();

  direction.x = end.x - start.x;
  direction.y = end.y - start.y;
  direction.z = end.z - start.z;
View Full Code Here

  y = y*det;
  z = z*det;

  if (pointInPolytope( x, y, z ) ) {
      if (nVerts >= verts.length) {
    Point3d newVerts[] = new Point3d[nVerts << 1];
    for(int i=0;i<nVerts;i++) {
        newVerts[i] = verts[i];
    }
    verts = newVerts;
      }
      verts[nVerts++] = new Point3d( x,y,z);
  }
    }
View Full Code Here

      }
  }
  // XXXX: correctly compute centroid

  x=y=z=0.0;
  Point3d newVerts[] = new Point3d[nVerts];

  for(i=0;i<nVerts;i++) {
      x += verts[i].x;
      y += verts[i].y;
      z += verts[i].z;
View Full Code Here

    region.mag    = new double[planes.length];
    region.pDotN  = new double[planes.length];
    region.verts  = new Point3d[nVerts];
    region.nVerts = nVerts;
    for(k=0;k<nVerts;k++)
        region.verts[k] = new Point3d(verts[k]);
      }


      for(i=0;i<planes.length;i++) {
    region.planes[i].x = planes[i].x;
View Full Code Here

TOP

Related Classes of javax.vecmath.Point3d

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.