Package ca.eandb.jmist.math

Examples of ca.eandb.jmist.math.Interval.minimum()


      if (I.isEmpty()) {
        return null;
      }

      Vector3    n    = LENS_SPHERE.center().vectorTo(init.pointAt(I.minimum()));
      Vector3    r    = Optics.reflect(init.direction(), n);

      Ray3    ray    = new Ray3(Point3.ORIGIN, r);
      Color    color  = getWhite();
      double    pdf    = 1.0 / 16.0;
View Full Code Here


  @Override
  public void intersect(Ray3 ray, IntersectionRecorder recorder) {
    ensureReady();
    Interval I = boundingBox.intersect(ray).intersect(recorder.interval());
    if (!I.isEmpty()) {
      intersectNode(root, I.minimum(), I.maximum(), ray, recorder);
    }
  }

  private void intersectNode(int node, double near, double far, Ray3 ray,
      IntersectionRecorder recorder) {
View Full Code Here

  public void intersect(Ray3 ray, IntersectionRecorder recorder) {

    Interval I = this.sphere.intersect(ray);

    if (!I.isEmpty()) {
      recorder.record(super.newIntersection(ray, I.minimum(), true));
      recorder.record(super.newIntersection(ray, I.maximum(), false));
    }

  }
View Full Code Here

    Interval I = SUPERELLIPSOID_BOUNDING_BOX.intersect(ray);

    if (I.isEmpty())
      return vt;

    vt.add(I.minimum());
    vt.add(I.maximum());

    for (int i = 0; i < PLANES.length; i++) {
      double t = PLANES[i].intersect(ray);
      if (I.contains(t))
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.