Package javax.vecmath

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


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

        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

        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

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

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

      synchronized(lockObj) {
    if (centroid == null) {
        centroid = new Point3d[geometryArray.length];
        for (int j = 0; j < centroid.length; j++) {
          centroid[j] = new Point3d();
          source.localBounds.getCenter(centroid[j]);
      source.getCurrentLocalToVworld(0).transform(centroid[j]);
        }
                }
    else {
        for (int j = 0; j < centroid.length; j++) {
          source.localBounds.getCenter(centroid[j]);
      source.getCurrentLocalToVworld(0).transform(centroid[j]);
        }
    }
      }

      return;
  }
  // End of new for 1.3.2

  synchronized(lockObj) {
      for (int j = 0; j < geometryArray.length; j++) {
    if (geometryArray[j] == null)
        continue;
    synchronized(geometryArray[j].centroid) {
        if (geometryArray[j].recompCentroid) {
      geometryArray[j].computeCentroid();
      geometryArray[j].recompCentroid = false;
        }
    }
      }
      if (centroidIsDirty) {
    if (centroid == null) {
        centroid = new Point3d[geometryArray.length];
        for (int j = 0; j < centroid.length; j++) {
      if (geometryArray[j] == null)
          continue;
      centroid[j] = new Point3d(geometryArray[j].centroid);
      source.getCurrentLocalToVworld(0).transform(centroid[j]);
        }
    }
    else {
        for (int j = 0; j < centroid.length; j++) {
View Full Code Here

* @param center the center of the bounding sphere
* @param radius the radius of the bounding sphere
*/
public BoundingSphere(Point3d center, double radius) {
  boundId = BOUNDING_SPHERE;
  this.center = new Point3d(center);
  this.radius = radius;
  updateBoundsStates();
}
View Full Code Here

/**
* Constructs and initializes a BoundingSphere with radius = 1 at 0 0 0.
*/
public BoundingSphere() {
  boundId = BOUNDING_SPHERE;
  center = new Point3d();
  radius = 1.0;
}
View Full Code Here

* Constructs and initializes a BoundingSphere from a bounding object.
* @param boundsObject a bounds object
*/
public BoundingSphere(Bounds boundsObject) {
  boundId = BOUNDING_SPHERE;
  center = new Point3d();

  if (boundsObject == null || boundsObject.boundsIsEmpty) {
    setEmptyBounds();
    return;
  }
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.