Examples of Point3d


Examples of javax.vecmath.Point3d

      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

Examples of javax.vecmath.Point3d

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

Examples of javax.vecmath.Point3d

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

Examples of javax.vecmath.Point3d

* 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

Examples of javax.vecmath.Point3d

* objects.
* @param boundsObjects an array of bounds objects
*/
public BoundingSphere(Bounds[] boundsObjects) {
  boundId = BOUNDING_SPHERE;
  center = new Point3d();

  if (boundsObjects == null || boundsObjects.length <= 0) {
    setEmptyBounds();
    return;
  }

  // find first non empty bounds object
  int i = 0;
  while( boundsObjects[i] == null && i < boundsObjects.length) {
      i++;
  }

  if (i >= boundsObjects.length) { // all bounds objects were empty
    setEmptyBounds();
    return;
  }

  this.set(boundsObjects[i++]);
  if(boundsIsInfinite)
      return;

  Point3d[] boxVerts = null;
  for(;i<boundsObjects.length;i++) {
      if( boundsObjects[i] == null ); // do nothing
      else if( boundsObjects[i].boundsIsEmpty); // do nothing
      else if( boundsObjects[i].boundsIsInfinite ) {
      setInfiniteBounds();
      return; // We're done.
      }
      else if( boundsObjects[i].boundId == BOUNDING_BOX){
    BoundingBox b = (BoundingBox)boundsObjects[i];
      if (boxVerts == null) {
        boxVerts = new Point3d[8];
        for (int j = 0; j < 8; j++)
          boxVerts[j] = new Point3d();

      }
    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

Examples of model.util.Point3D

                { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 }
        };
    }

    public void test_saccadeRetinaToNewPositionAndGetWhatItSees() throws IOException {
        int[][] seenAreaFittedToRetinaSize = this.imageViewer.saccadeRetinaToNewPositionAndGetWhatItSees(new Point3D(33, 33, 33));
        assertTrue(Arrays.deepEquals(this.twoDotBMP, seenAreaFittedToRetinaSize));
        assertEquals(66, seenAreaFittedToRetinaSize.length);
        assertEquals(66, seenAreaFittedToRetinaSize[0].length);

        int[][] shiftToTheLeftAndZoomIn = this.imageViewer.saccadeRetinaToNewPositionAndGetWhatItSees(new Point3D(16, 33, 25));
        assertEquals(66, shiftToTheLeftAndZoomIn.length);
        assertEquals(66, shiftToTheLeftAndZoomIn[0].length);
        assertTrue(Arrays.deepEquals(this.twoShiftedToTheLeftZoomedIn, shiftToTheLeftAndZoomIn));

        //RegionConsoleViewer.printDoubleIntArray(shiftToTheLeftAndZoomIn);
View Full Code Here

Examples of net.sf.l2j.util.Point3D

    List<CursedWeaponInfo> list = new FastList<CursedWeaponInfo>();
    for (CursedWeapon cw : CursedWeaponsManager.getInstance().getCursedWeapons())
    {
      if (!cw.isActive()) continue;

      Point3D pos = cw.getWorldPosition();

      if (pos != null)
        list.add(new CursedWeaponInfo(pos, cw.getItemId(), cw.isActivated() ? 1 : 0));
    }
View Full Code Here

Examples of net.sourceforge.theba.core.math.Point3D

        int height = control.getStack().getHeight();
        int depth = control.getStack().getDepth();
        automerge = (1 == control.getPreferences().getInt("autoMerge", 0));
        Point[][] skeleton = new Point[control.MAX_FIBERS][depth];
        Collections.sort(seeds);
        Point3D s;
        Iterator<LumenCandidate> iter = seeds.iterator();
        int count = 0;
        keepTracking = true;
        while (iter.hasNext() && keepTracking && !control.isStopped()) {
            while (paused)
View Full Code Here

Examples of org.earth3d.jearth.math.Point3D

    assertEquals(1.0, sphere.getSin(0.25), 0.001);
    assertEquals(-1.0, sphere.getSin(0.75), 0.001);
  }
 
  public void testGetPoint() {
    Point3D result = sphere.getPoint(new Point2D(0,0));
    Point3D result2 = sphere.getPoint(new Point2D(0,0.5));
    Point3D result3 = sphere.getPoint(new Point2D(0,1));
    assertTrue(new Point3D(0,1,0).equals(result));
  }
View Full Code Here

Examples of org.geotools.geometry.iso.util.interpolation.ITP_Interpolation.Point3d

        for ( int i = 0 ; i < nnbr; ++i) {
            nbrDist[i] = Double.MAX_VALUE;
        }

        for ( int i = 0, j = 0 ; i < pIn.size(); ++i) {
          Point3d p1 = pIn.get(i);
            if ( this.mP != p1 ) {
                double dist = (this.mP.x-p1.x)*(this.mP.x-p1.x) + (this.mP.y-p1.y)*(this.mP.y-p1.y);
                if ( j < nnbr ) {
                    nbrDist[j] = dist;
                    nbrs.add(p1);
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.