1 /**************************************************************************
3 * Java Grande Forum Benchmark Suite - Version 2.0 *
7 * Java Grande Benchmarking Project *
11 * Edinburgh Parallel Computing Centre *
13 * email: epcc-javagrande@epcc.ed.ac.uk *
15 * Original version of this code by *
16 * Florian Doyon (Florian.Doyon@sophia.inria.fr) *
17 * and Wilfried Klauser (wklauser@acm.org) *
19 * This version copyright (c) The University of Edinburgh, 1999. *
20 * All rights reserved. *
22 **************************************************************************/
26 final public class Ray {
29 public Ray(Vec pnt, Vec dir) {
30 P = new Vec(pnt.x, pnt.y, pnt.z);
31 D = new Vec(dir.x, dir.y, dir.z);
40 public Vec point(float t) {
41 return new Vec(P.x + D.x * t, P.y + D.y * t, P.z + D.z * t);
44 public String toString() {
45 return "{" + P.toString() + " -> " + D.toString() + "}";