Package javax.vecmath

Examples of javax.vecmath.Point3f.scaleAdd()


            if (vConnect != null)
              vConnect.add(atom);
            getHybridizationAndAxes(i, z, x, (isEne ? "sp2c"
                : targetValence == 3 ? "sp3d" : "lpb"), false, true);
            pt = new Point3f(z);
            pt.scaleAdd(1.1f, z, atom);
            hAtoms[i][hPt++] = pt;
            if (vConnect != null)
              vConnect.add(atom);
            break;
          case 1:
View Full Code Here


            case 1:
              // sp3 or Boron sp2
              if (getHybridizationAndAxes(i, z, x, (atomicNumber == 5 ? "sp2c"
                  : "sp3d"), true, false) != null) {
                pt = new Point3f(z);
                pt.scaleAdd(1.1f, z, atom);
                hAtoms[i][hPt++] = pt;
                if (vConnect != null)
                  vConnect.add(atom);
              } else {
                hAtoms[i] = new Point3f[0];
View Full Code Here

            case 2:
              // sp2
              getHybridizationAndAxes(i, z, x, (targetValence == 4 ? "sp2c"
                  : "sp2b"), false, false);
              pt = new Point3f(z);
              pt.scaleAdd(1.1f, z, atom);
              hAtoms[i][hPt++] = pt;
              if (vConnect != null)
                vConnect.add(atom);
              break;
            case 3:
View Full Code Here

              break;
            case 3:
              // sp
              getHybridizationAndAxes(i, z, x, "spb", false, true);
              pt = new Point3f(z);
              pt.scaleAdd(1.1f, z, atom);
              hAtoms[i][hPt++] = pt;
              if (vConnect != null)
                vConnect.add(atom);
              break;
            }
View Full Code Here

      // undo inversion for quaternion analysis (requires proper rotations only)

      p1.scaleAdd(-2, v01, p1);
      p2.scaleAdd(-2, v02, p2);
      p3.scaleAdd(-2, v03, p3);

    }

    // The second trick is to use quaternions. Each of the three faces of the
    // frame (xy, yz, and zx)
View Full Code Here

        ptemp.scaleAdd(1, pt1, vtemp);
        ang2 = (int) Measure.computeTorsion(pt00, pa1, ptemp, p0, true);
      } else {
        ptemp.set(pa1);
        ptemp.add(vtemp);
        pt1.scaleAdd(0.5f, vtemp, pa1);
        ang2 = (int) Measure.computeTorsion(pt00, pa1, ptemp, p0, true);
      }

      if (ang2 != 0)
        ang1 = ang2;
View Full Code Here

          draw1.append(drawid).append("rotVector2 diameter 0.1 ").append(
              Escape.escape(pa1)).append(Escape.escape(ptemp)).append(
              " color red");
          pt1.set(pa1);
          if (pitch1 == 0 && pt00.distance(p0) < 0.2)
            pt1.scaleAdd(0.5f, pt1, vtemp);
        } else {
          // screw
          color = "orange";
          draw1.append(drawid).append("rotLine1 ").append(Escape.escape(pt00))
              .append(Escape.escape(pa1)).append(" color red");
View Full Code Here

              .append(Escape.escape(pa1)).append(" color red");
          ptemp.set(pa1);
          ptemp.add(vtemp);
          draw1.append(drawid).append("rotLine2 ").append(Escape.escape(p0))
              .append(Escape.escape(ptemp)).append(" color red");
          pt1.scaleAdd(0.5f, vtemp, pa1);
        }

        // draw arc arrow

        ptemp.set(pt1);
View Full Code Here

        if (iDot > dotCount)
          iDot = dotCount;
        while (--iDot >= 0)
          if (dotsConvexMaps[i].get(iDot)) {
            Point3f pt = new Point3f();
            pt.scaleAdd(atomData.atomRadius[i], Geodesic.getVertexVector(iDot), atomData.atomXyz[i]);
            points[nPoints++] = pt;
          }
      }
    currentPoints = points;
    return points;
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.