Examples of Point3f


Examples of javax.vecmath.Point3f

  String s = text.getString();
  if (s != null) {
      rt.setString(s);
  }

  Point3f p = new Point3f();
  text.getPosition(p);
  rt.setPosition(p);
  rt.setAlignment(text.getAlignment());
  rt.setPath(text.getPath());
  rt.setCharacterSpacing(text.getCharacterSpacing());
View Full Code Here

Examples of javax.vecmath.Point3f

      this.quats[i].set(quats[i]);
  }

  this.positions = new Point3f[positions.length];
  for(int i = 0; i < positions.length; i++) {
      this.positions[i] = new Point3f();
      this.positions[i].set(positions[i]);
  }

  this.scales = new float[scales.length];
  for(int i = 0; i < scales.length; i++) {
View Full Code Here

Examples of javax.vecmath.Point3f

  // No API available to change size of array, so set here explicitly
        positions = new Point3f[len];
        quats = new Quat4f[len];
        scales = new float[len];

        Point3f point = new Point3f();
        Quat4f quat = new Quat4f();

        for (int i = 0; i < len; i++) {
            positions[i] = new Point3f();
            ri.getPosition(i, point);
            setPosition(i, point);

            quats[i] = new Quat4f();
            ri.getQuat(i, quat);
View Full Code Here

Examples of javax.vecmath.Point3f

      this.position.set(position);
  }

        getLastLocalToVworld().transform(position, xformPosition);

        dispatchAttribChange(POSITION_DIRTY_BIT, (new Point3f(this.position)));
  if (source != null && source.isLive()) {
      notifySceneGraphChanged(false);
  }
    }
View Full Code Here

Examples of javax.vecmath.Point3f

      staticTransform.transform.transform(this.position);
  }

        getLastLocalToVworld().transform(position, xformPosition);

        dispatchAttribChange(POSITION_DIRTY_BIT, (new Point3f(this.position)));
  if (source != null && source.isLive()) {
      notifySceneGraphChanged(false);
  }
    }
View Full Code Here

Examples of javax.vecmath.Point3f

    }
    //System.out.println(xyz + " " + xy + " " + ptOffset);
  }
 
  void translateSelected() {
    Point3f ptCenter = viewer.getAtomSetCenter(bsAtoms);
    Point3f pt = new Point3f();
    viewer.transformPoint(ptCenter, pt);
    pt.add(ptOffset);
    viewer.unTransformPoint(pt, pt);
    pt.sub(ptCenter);
    viewer.setAtomCoordRelative(pt, bsAtoms);
    bsAtoms = null;
    ptOffset.set(0, 0, 0);
  }
View Full Code Here

Examples of javax.vecmath.Point3f

      moveToText = viewer.getMoveToText(-1);
      if (navigationMode) {
        xNav = viewer.getNavigationOffsetPercent('X');
        yNav = viewer.getNavigationOffsetPercent('Y');
        navDepth = viewer.getNavigationDepthPercent();
        navCenter = new Point3f(viewer.getNavigationCenter());
      }
    }
View Full Code Here

Examples of javax.vecmath.Point3f

  private int navMode = NAV_MODE_RESET;

  void setScreenParameters(int screenWidth, int screenHeight,
                           boolean useZoomLarge, boolean antialias,
                           boolean resetSlab, boolean resetZoom) {
    Point3f pt = (mode == MODE_NAVIGATION ? new Point3f(navigationCenter)
        : null);
    Point3f ptoff = new Point3f(navigationOffset);
    ptoff.x = ptoff.x / width;
    ptoff.y = ptoff.y / height;
    super.setScreenParameters(screenWidth, screenHeight, useZoomLarge,
        antialias, resetSlab, resetZoom);
    if (pt != null) {
View Full Code Here

Examples of javax.vecmath.Point3f

    case NAV_MODE_IGNORE:
    case NAV_MODE_NEWXYZ:
      // must just be (not so!) simple navigation
      // navigation center will initially move
      // but we center it by moving the rotation center instead
      Point3f pt1 = new Point3f();
      matrixTransform.transform(navigationCenter, pt1);
      float z = pt1.z;
      matrixTransform.transform(fixedRotationCenter, pt1);
      modelCenterOffset = referencePlaneOffset + (pt1.z - z);
      calcCameraFactors();
      calcTransformMatrix();
      break;
    case NAV_MODE_NEWZ:
      // just untransform the offset to get the new 3D navigation center
      navigationOffset.z = referencePlaneOffset;
      // System.out.println("nav_mode_newz " + navigationOffset);
      unTransformPoint(navigationOffset, navigationCenter);
      break;
    }
    matrixTransform.transform(navigationCenter, navigationShiftXY);
    if (viewer.getNavigationPeriodic()) {
      // TODO
      // but if periodic, then the navigationCenter may have to be moved back a
      // notch
      Point3f pt = new Point3f(navigationCenter);
      viewer.toUnitCell(navigationCenter, null);
      // presuming here that pointT is still a molecular point??
      if (pt.distance(navigationCenter) > 0.01) {
        matrixTransform.transform(navigationCenter, pt);
        float dz = navigationShiftXY.z - pt.z;
        // the new navigation center determines the navigationZOffset
        modelCenterOffset += dz;
        calcCameraFactors();
View Full Code Here

Examples of javax.vecmath.Point3f

    // Point3f navigationCenter) {

    // fixedRotationCenter, navigationOffset, navigationCenter
    mode = defaultMode;
    // get the rotation center's Z offset and move X and Y to 0,0
    Point3f pt = new Point3f();
    transformPoint(fixedRotationCenter, pt);
    pt.x -= navigationOffset.x;
    pt.y -= navigationOffset.y;
    // unapply the perspective as if IT were the navigation center
    float f = -getPerspectiveFactor(pt.z);
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.