Package org.jmol.util

Examples of org.jmol.util.Point3fi


  }

  public Token checkObjectClicked(int x, int y, int modifiers,
                                    BitSet bsVisible) {
    Shape shape;
    Point3fi pt = null;
    if ((shape = shapes[JmolConstants.SHAPE_ISOSURFACE]) != null
        && (viewer.getDrawPicking() || viewer.getNavigationMode() && viewer.getNavigateSurface())
         && (pt = shape.checkObjectClicked(x, y, modifiers, bsVisible)) != null)
      return new Token(Token.isosurface, pt);
View Full Code Here


    if (action != Binding.MOVED) {
      action = viewer.notifyMouseClicked(x, y, action, mode);
      if (action == Binding.MOVED)
        return false;
    }
    Point3fi nearestPoint = null;
    int tokType = 0;
    // t.tok will let us know if this is an atom or a bond that was clicked
    if (!drawMode && !atomOnly) {
      Token t = viewer.checkObjectClicked(x, y, action);
      if (t != null) {
View Full Code Here

            isNull = true;
          points.add(bs);
          nPoints++;
          break;
        case Token.point3f:
          Point3fi v = new Point3fi((Point3f) args[i].value);
          points.add(v);
          nPoints++;
          break;
        case Token.integer:
        case Token.decimal:
View Full Code Here

          value = bs = (BitSet) expressionResult;
          if (!isSyntaxCheck && bs.length() == 0)
            return;
        }
        if (value instanceof Point3f) {
          Point3fi v = new Point3fi();
          v.set((Point3f) value);
          v.modelIndex = (short) modelIndex;
          value = v;
        }
        if ((nAtoms = ++expressionCount) > 4)
          error(ERROR_badArgumentCount);
View Full Code Here

              deleteMeasurement(i);
              break;
            }
            indices[j] -= nAtomsDeleted;
          } else if (iAtom < 0) {
            Point3fi pt = mt.getAtom(j);
            if (pt.modelIndex > modelIndex) {
              pt.modelIndex--;
            } else if (pt.modelIndex == modelIndex) {
              deleteMeasurement(i);
              break;
View Full Code Here

        + (haveTainted ? getShapeCommands(temp2, null, "select BONDS")
            + "\n" : "");
  }
 
  public boolean checkObjectHovered(int x, int y, BitSet bsVisible) {
    Point3fi pt = new Point3fi();
    Bond bond = findPickedBond(x, y, bsVisible, pt);
    if (bond == null)
      return false;
    viewer.highlightBond(bond.getIndex(), true);
    return true;
View Full Code Here

  }
 

  public Point3fi checkObjectClicked(int x, int y, int modifiers,
                                    BitSet bsVisible) {
    Point3fi pt = new Point3fi();
    Bond bond = findPickedBond(x, y, bsVisible, pt);
    if (bond == null)
      return null;
    pt.index = bond.getIndex();
    viewer.setStatusAtomPicked(-3, "[\"bond\",\"" + bond.getIdentity() + "\"," + pt.x + "," + pt.y + "," + pt.z + "]");
View Full Code Here

      return Float.NaN;
    for (int i = count; --i >= 0;)
      if (countPlusIndices[i + 1] == -1) {
        return Float.NaN;
      }
    Point3fi ptA = getAtom(1);
    Point3fi ptB = getAtom(2);
    Point3fi ptC, ptD;
    switch (count) {
    case 2:
      return ptA.distance(ptB);
    case 3:
      ptC = getAtom(3);
View Full Code Here

          continue;
      }
      boolean drawTicks = (fls.tickInfos != null && (edge = tickEdges[i >> 1]) != 0);
      if (drawTicks) {
        if (atomA == null) {
          atomA = new Point3fi();
          atomB = new Point3fi();
        }
        atomA.set(vertices[edge0]);
        atomB.set(vertices[edge1]);
        float start = 0;
        if (shape instanceof Bbcage)
View Full Code Here

      Object2d obj = (Object2d) e.nextElement();
      if (obj.checkObjectClicked(x, y, bsVisible)) {
        String s = obj.getScript();
        if (s != null)
          viewer.evalStringQuiet(s);
        Point3fi pt = new Point3fi();
        if (obj.xyz != null) {
          pt.set(obj.xyz);
          pt.modelIndex = (short) obj.modelIndex;
        }
        return pt; // may or may not be null
      }
    }
View Full Code Here

TOP

Related Classes of org.jmol.util.Point3fi

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.