Package ca.eandb.jmist.math

Examples of ca.eandb.jmist.math.Point3.z()


    Point3  p = ray.pointAt(t);
    Vector3  d = ray.direction();
    double  X2e_1 = Math.pow(Math.abs(p.x()), 2.0 / e - 1.0);
    double  Y2e_1 = Math.pow(Math.abs(p.y()), 2.0 / e - 1.0);
    double  Z2n_1 = Math.pow(Math.abs(p.z()), 2.0 / n - 1.0);
    double  X2e = Math.abs(p.x()) * X2e_1;
    double  Y2e = Math.abs(p.y()) * Y2e_1;
    double  Z2n = Math.abs(p.z()) * Z2n_1;
    double  A_1 = Math.pow(X2e + Y2e, e / n - 1.0);
    double  A = (X2e + Y2e) * A_1;
 
View Full Code Here


    double  X2e_1 = Math.pow(Math.abs(p.x()), 2.0 / e - 1.0);
    double  Y2e_1 = Math.pow(Math.abs(p.y()), 2.0 / e - 1.0);
    double  Z2n_1 = Math.pow(Math.abs(p.z()), 2.0 / n - 1.0);
    double  X2e = Math.abs(p.x()) * X2e_1;
    double  Y2e = Math.abs(p.y()) * Y2e_1;
    double  Z2n = Math.abs(p.z()) * Z2n_1;
    double  A_1 = Math.pow(X2e + Y2e, e / n - 1.0);
    double  A = (X2e + Y2e) * A_1;

    return new EvaluateResult(
        A + Z2n - 1.0,
View Full Code Here

        A + Z2n - 1.0,
        (2.0 / n)
        * (A_1
            * (X2e_1 * d.x() * Math.signum(p.x()) + Y2e_1 * d.y()
                * Math.signum(p.y())) + Z2n_1 * d.z()
            * Math.signum(p.z()))
    );

  }

  private double findRoot(Ray3 ray, double a, double b) {
View Full Code Here

    Point3  p = x.getPosition();
    double  A = Math.pow(Math.pow(Math.abs(p.x()), 2.0 / e) + Math.pow(Math.abs(p.y()), 2.0 / e), e / n - 1.0);
    double  X = A * Math.pow(Math.abs(p.x()), 2.0 / e - 1.0);
    double  Y = A * Math.pow(Math.abs(p.y()), 2.0 / e - 1.0);
    double  Z = Math.pow(Math.abs(p.z()), 2.0 / n - 1.0);

    return new Vector3(
      Math.signum(p.x()) * X,
      Math.signum(p.y()) * Y,
      Math.signum(p.z()) * Z
 
View Full Code Here

    double  Z = Math.pow(Math.abs(p.z()), 2.0 / n - 1.0);

    return new Vector3(
      Math.signum(p.x()) * X,
      Math.signum(p.y()) * Y,
      Math.signum(p.z()) * Z
    ).unit();

  }

  /* (non-Javadoc)
 
View Full Code Here

    Point3 c = this.boundingSphere.center();

    return new Box3(
        c.x() - ri,
        c.y() - rj,
        c.z() - rk,
        c.x() + ri,
        c.y() + rj,
        c.z() + rk
        );
View Full Code Here

        c.x() - ri,
        c.y() - rj,
        c.z() - rk,
        c.x() + ri,
        c.y() + rj,
        c.z() + rk
        );

  }

  /* (non-Javadoc)
 
View Full Code Here

             * within the bounds of the cell.  If cx > cz, then
             * the intersection hit the triangle, otherwise, it hit
             * the plane, but on the other half of the cell.
             */
            double cx = (p.x() - p00.x()) / (p10.x() - p00.x());
            double cz = (p.z() - p10.z()) / (p11.z() - p10.z());

            if (cx > cz) {
              Intersection x = newIntersection(ray, t, ray.direction().dot(plane.normal()) < 0.0)
                .setBasis(Basis3.fromW(plane.normal(), Basis3.Orientation.RIGHT_HANDED))
                .setLocation(p);
View Full Code Here

             * within the bounds of the cell.  If cx < cz, then
             * the intersection hit the triangle, otherwise, it hit
             * the plane, but on the other half of the cell.
             */
            double cx = (p.x() - p00.x()) / (p10.x() - p00.x());
            double cz = (p.z() - p10.z()) / (p11.z() - p10.z());

            if (cx < cz) {
              Intersection x = newIntersection(ray, t, ray.direction().dot(plane.normal()) < 0.0)
                .setBasis(Basis3.fromW(plane.normal(), Basis3.Orientation.RIGHT_HANDED))
                .setLocation(p);
View Full Code Here

  protected Point2 getTextureCoordinates(GeometryIntersection x) {
    Point3 p = x.getPosition();
    Box3 bounds = grid.getBoundingBox();
    return new Point2(
        (p.x() - bounds.minimumX()) / (bounds.maximumX() - bounds.minimumX()),
        (p.z() - bounds.minimumZ()) / (bounds.maximumZ() - bounds.minimumZ())
    );
  }

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.SceneElement#isClosed()
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.