Package raytracer.common.type

Examples of raytracer.common.type.Vector.crossProduct()


    double l;
    Vector dir = cam.getDirection();

    h = 2. * cam.getDistance() * Math.tan(cam.getFovY() / 2.);
    l = h * (((double) width) / ((double) height));
    u = dir.crossProduct(cam.getUp()).normal().product(l / (double) width);
    v = dir.crossProduct(u).normal().product(h / (double) height);
    ori = pos.add(dir.product(cam.getDistance()))
        .add(u.product(-(double) width / 2.))
        .add(v.product(-(double) height / 2.));
  }
View Full Code Here


    Vector dir = cam.getDirection();

    h = 2. * cam.getDistance() * Math.tan(cam.getFovY() / 2.);
    l = h * (((double) width) / ((double) height));
    u = dir.crossProduct(cam.getUp()).normal().product(l / (double) width);
    v = dir.crossProduct(u).normal().product(h / (double) height);
    ori = pos.add(dir.product(cam.getDistance()))
        .add(u.product(-(double) width / 2.))
        .add(v.product(-(double) height / 2.));
  }

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.