Package ca.eandb.jmist.math

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


      double r = sphere.radius();
      Point3 c = sphere.center();

      if (this.isEmpty()) {
        minimumX = c.x() - r;
        minimumY = c.y() - r;
        minimumZ = c.z() - r;
        maximumX = c.x() + r;
        maximumY = c.y() + r;
        maximumZ = c.z() + r;
      } else {
View Full Code Here


      if (this.isEmpty()) {
        minimumX = c.x() - r;
        minimumY = c.y() - r;
        minimumZ = c.z() - r;
        maximumX = c.x() + r;
        maximumY = c.y() + r;
        maximumZ = c.z() + r;
      } else {
        minimumX = Math.min(c.x() - r, minimumX);
        minimumY = Math.min(c.y() - r, minimumY);
        minimumZ = Math.min(c.z() - r, minimumZ);
View Full Code Here

        maximumX = c.x() + r;
        maximumY = c.y() + r;
        maximumZ = c.z() + r;
      } else {
        minimumX = Math.min(c.x() - r, minimumX);
        minimumY = Math.min(c.y() - r, minimumY);
        minimumZ = Math.min(c.z() - r, minimumZ);
        maximumX = Math.max(c.x() + r, maximumX);
        maximumY = Math.max(c.y() + r, maximumY);
        maximumZ = Math.max(c.z() + r, maximumZ);
      }
View Full Code Here

      } else {
        minimumX = Math.min(c.x() - r, minimumX);
        minimumY = Math.min(c.y() - r, minimumY);
        minimumZ = Math.min(c.z() - r, minimumZ);
        maximumX = Math.max(c.x() + r, maximumX);
        maximumY = Math.max(c.y() + r, maximumY);
        maximumZ = Math.max(c.z() + r, maximumZ);
      }
    }
  }
View Full Code Here

      Point3 p1 = o1.bound.center();
      Point3 p2 = o2.bound.center();

      switch (this.axis) {
      case X_AXIS: return Double.compare(p1.x(), p2.x());
      case Y_AXIS: return Double.compare(p1.y(), p2.y());
      case Z_AXIS: return Double.compare(p1.z(), p2.z());
      }

      throw new UnsupportedOperationException("invalid axis");
    }
View Full Code Here

    public Point2 project(HPoint3 x) {
      if (!x.isPoint()) {
        return null;
      }
      Point3 p = x.toPoint3();
      return new Point2(0.5 + p.x() / width, 0.5 - p.y() / height);
    }

    /* (non-Javadoc)
     * @see ca.eandb.jmist.framework.path.PathNode#getCosine(ca.eandb.jmist.math.Vector3)
     */
 
View Full Code Here

    Vector3    d = ray.direction();
    Point3    p = ray.pointAt(I.minimum());
    Cell    cell;
    Cell    nextCell = this.nearestCell(p);
    double    rx = p.x() - (bound.minimumX() + (double) nextCell.cx * dx);
    double    ry = p.y() - (bound.minimumY() + (double) nextCell.cy * dy);
    double    rz = p.z() - (bound.minimumZ() + (double) nextCell.cz * dz);

    do {

      cell = nextCell;
View Full Code Here

    Point3 org = ray.origin();
    Vector3 dir = ray.direction();

    double x0 = org.x() / radius;
    double y0 = org.y() / height - 1.0;
    double z0 = org.z() / radius;
    double x1 = dir.x() / radius;
    double y1 = dir.y() / height;
    double z1 = dir.z() / radius;
View Full Code Here

    if (t.length == 2) {
      for (int i = 0; i < 2; i++) {
        if (recorder.interval().contains(t[i])) {
          Point3 p = ray.pointAt(t[i]);
          if (0.0 <= p.y() && p.y() <= height) {
            Intersection x = super.newIntersection(ray, t[i], i == 0, CONE_SURFACE_BODY)
              .setLocation(p);
            recorder.record(x);
          }
        }
View Full Code Here

    if (t.length == 2) {
      for (int i = 0; i < 2; i++) {
        if (recorder.interval().contains(t[i])) {
          Point3 p = ray.pointAt(t[i]);
          if (0.0 <= p.y() && p.y() <= height) {
            Intersection x = super.newIntersection(ray, t[i], i == 0, CONE_SURFACE_BODY)
              .setLocation(p);
            recorder.record(x);
          }
        }
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.