Examples of Point3d


Examples of javax.vecmath.Point3d

      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

Examples of javax.vecmath.Point3d

  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

Examples of javax.vecmath.Point3d

      }
  }
  // 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

Examples of javax.vecmath.Point3d

    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

Examples of javax.vecmath.Point3d

    }

    @Override
    boolean intersect(PickShape pickShape, PickInfo pickInfo, int flags, Point3d iPnt,
                      GeometryRetained geom, int geomIndex) {
        Point3d pnts[] = new Point3d[3];
        double sdist[] = new double[1];
        double minDist = Double.MAX_VALUE;
        double x = 0, y = 0, z = 0;
        int[] vtxIndexArr = new int[3];

        //NVaidya
        // Bug 447: While loops below now traverse over all
        // elements in the valid index range from initialIndexIndex
        // to initialIndexInex + validIndexCount - 1
        int i = initialIndexIndex;
        int loopStopIndex = initialIndexIndex + validIndexCount;
  pnts[0] = new Point3d();
  pnts[1] = new Point3d();
  pnts[2] = new Point3d();

  switch (pickShape.getPickType()) {
  case PickShape.PICKRAY:
      PickRay pickRay= (PickRay) pickShape;
View Full Code Here

Examples of javax.vecmath.Point3d

        //NVaidya
        // Bug 447: correction for loop indices
        int i = initialIndexIndex;
        int loopStopIndex = initialIndexIndex + validIndexCount;

  points[0] = new Point3d();
  points[1] = new Point3d();
  points[2] = new Point3d();

  switch (pnts.length) {
  case 3: // Triangle
      while (i<loopStopIndex) {
    getVertexData(indexCoord[i++], points[0]);
View Full Code Here

Examples of javax.vecmath.Point3d

        Point3d[] pnts = new Point3d[3];
        //NVaidya
        // Bug 447: correction for loop indices
        int i = initialIndexIndex;
        int loopStopIndex = initialIndexIndex + validIndexCount;
  pnts[0] = new Point3d();
  pnts[1] = new Point3d();
  pnts[2] = new Point3d();

  while (i < loopStopIndex) {
      getVertexData(indexCoord[i++], pnts[0]);
      getVertexData(indexCoord[i++], pnts[1]);
      getVertexData(indexCoord[i++], pnts[2]);
View Full Code Here

Examples of javax.vecmath.Point3d

        Point3d[] pnts = new Point3d[3];
        //NVaidya
        // Bug 447: correction for loop indices
        int i = initialIndexIndex;
        int loopStopIndex = initialIndexIndex + validIndexCount;
        pnts[0] = new Point3d();
  pnts[1] = new Point3d();
  pnts[2] = new Point3d();

  switch(targetBound.getPickType()) {
  case PickShape.PICKBOUNDINGBOX:
      BoundingBox box = (BoundingBox) targetBound;
View Full Code Here

Examples of javax.vecmath.Point3d

    /**
     * Constructs a PickPoint using a default point.
     * The point is initialized to (0,0,0).
     */
    public PickPoint() {
  location = new Point3d();
    }
View Full Code Here

Examples of javax.vecmath.Point3d

    /**
     * Constructs a PickPoint from the specified parameter.
     * @param location the pick point.
     */
    public PickPoint(Point3d location) {
  this.location = new Point3d(location);
    }
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.