Package javax.vecmath

Examples of javax.vecmath.Point4f


    Point3f origin = (Point3f) params.functionXYinfo.get(1);
    int[] counts = new int[3];
    int[] nearest = new int[3];
    Vector3f[] vectors = new Vector3f[3];
    for (int i = 0; i < 3; i++) {
      Point4f info = (Point4f) params.functionXYinfo.get(i + 2);
      counts[i] = Math.abs((int) info.x);
      vectors[i] = new Vector3f(info.y, info.z, info.w);
    }
    int nx = counts[0];
    int ny = counts[1];
View Full Code Here


  }

  void setSphere(float radius) {
    dataType = SURFACE_SPHERE;
    distance = radius;
    setEccentricity(new Point4f(0, 0, 1, 1));
    cutoff = Float.MIN_VALUE;
    isCutoffAbsolute = false;
    isSilent = !logMessages;
    script = getScriptParams() + " SPHERE " + radius + ";";
  }
View Full Code Here

      param3 = 0;

    if (param1 == -1) {
      // a plane is defined
      try {
        params.thePlane = new Point4f(parseFloat(), parseFloat(), parseFloat(),
            parseFloat());
      } catch (Exception e) {
        Logger
            .error("Error reading 4 floats for PLANE definition -- setting to 0 0 1 0  (z=0)");
        params.thePlane = new Point4f(0, 0, 1, 0);
      }
      Logger.info("JVXL read: plane " + params.thePlane);
      if (param2 == -1 && param3 < 0)
        param3 = -param3;
      //error in some versions of Jmol. (fixed in 11.3.54)
View Full Code Here

      }
    }
    if (nPoints == 3)
      return new Point3f(points[0], points[1], points[2]);
    if (nPoints == 4)
      return new Point4f(points[0], points[1], points[2], points[3]);
    return strPoint;
  }
View Full Code Here

    // planes, axisangles, and quaternions -- we can use the
    // first three coordinates to determine the relavent axis
    // the fourth then gives us offset to {0,0,0} (plane),
    // rotation angle (axisangle), and cos(theta/2) (quaternion).
   
    return new Point4f(q1, q2, q3, q0);
  }
View Full Code Here

      mean.scale(f / ndata.length);
    // now convert f to the corresponding cosine instead of sine
    f = (float) Math.sqrt(1 - mean.lengthSquared());
    if (Float.isNaN(f))
      f = 0;
    return new Quaternion(new Point4f(mean.x, mean.y, mean.z, f));
  }
View Full Code Here

    functionName = (String) params.functionXYinfo.get(0);
    jvxlFileHeaderBuffer = new StringBuffer();
    jvxlFileHeaderBuffer.append("functionXY\n").append(functionName).append("\n");
    volumetricOrigin.set((Point3f) params.functionXYinfo.get(1));
    for (int i = 0; i < 3; i++) {
      Point4f info = (Point4f) params.functionXYinfo.get(i + 2);
      voxelCounts[i] = Math.abs((int) info.x);
      volumetricVectors[i].set(info.y, info.z, info.w);     
    }
    if (isAnisotropic)
      setVolumetricAnisotropy();
View Full Code Here

    functionName = (String) params.functionXYinfo.get(0);
    jvxlFileHeaderBuffer = new StringBuffer();
    jvxlFileHeaderBuffer.append("functionXYZ\n").append(functionName).append("\n");
    volumetricOrigin.set((Point3f) params.functionXYinfo.get(1));
    for (int i = 0; i < 3; i++) {
      Point4f info = (Point4f) params.functionXYinfo.get(i + 2);
      voxelCounts[i] = Math.abs((int) info.x);
      volumetricVectors[i].set(info.y, info.z, info.w);     
    }
    if (isAnisotropic)
      setVolumetricAnisotropy();
View Full Code Here

        vtemp.set(ax1);
        vtemp.normalize();
        // ax + by + cz + d = 0
        // so if a point is in the plane, then N dot X = -d
        float w = -vtemp.x * pa1.x - vtemp.y * pa1.y - vtemp.z * pa1.z;
        Point4f plane = new Point4f(vtemp.x, vtemp.y, vtemp.z, w);
        List v = new ArrayList();
        v.add(uc.getCanonicalCopy(1.05f));
        TriangleData.intersectPlane(plane, v, 3);

        // returns triangles and lines
View Full Code Here

          strFormat = formatString(strFormat, "p", null, pVal.y, Double.NaN,
              true);
          strFormat = formatString(strFormat, "p", null, pVal.z, Double.NaN,
              true);
        } else if (values[o] instanceof Point4f) {
          Point4f qVal = (Point4f) values[o];
          strFormat = formatString(strFormat, "q", null, qVal.x, Double.NaN,
              true);
          strFormat = formatString(strFormat, "q", null, qVal.y, Double.NaN,
              true);
          strFormat = formatString(strFormat, "q", null, qVal.z, Double.NaN,
View Full Code Here

TOP

Related Classes of javax.vecmath.Point4f

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.