3 /**************************************************************************
5 * Java Grande Forum Benchmark Suite - Version 2.0 *
9 * Java Grande Benchmarking Project *
13 * Edinburgh Parallel Computing Centre *
15 * email: epcc-javagrande@epcc.ed.ac.uk *
17 * Original version of this code by *
18 * Florian Doyon (Florian.Doyon@sophia.inria.fr) *
19 * and Wilfried Klauser (wklauser@acm.org) *
21 * This version copyright (c) The University of Edinburgh, 1999. *
22 * All rights reserved. *
24 **************************************************************************/
28 final public class Ray {
31 public Ray(Vec pnt, Vec dir) {
32 P = new Vec(pnt.x, pnt.y, pnt.z);
33 D = new Vec(dir.x, dir.y, dir.z);
42 public Vec point(float t) {
43 return new Vec(P.x + D.x * t, P.y + D.y * t, P.z + D.z * t);
46 public String toString() {
47 return "{" + P.toString() + " -> " + D.toString() + "}";