02f21a77c708c276f2d0b541f5846ca511d54998
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / renderer / octree / raytracer / Ray.java
1 /*
2  * Sixth 3D engine. Author: Svjatoslav Agejenko. 
3  * This project is released under Creative Commons Zero (CC0) license.
4  */
5 package eu.svjatoslav.sixth.e3d.renderer.octree.raytracer;
6
7 public class Ray {
8
9     // ray origin
10     public double x, y, z;
11
12     // ray direction
13     public double xp, yp, zp;
14
15     // ray hit point
16     public double hitX, hitY, hitZ;
17
18
19     public int hitCellSize;
20
21     public int hitCellX, hitCellY, hitCellZ;
22
23     public Ray(final double X, final double Y, final double Z, final double Xp,
24                final double Yp, final double Zp) {
25         x = X;
26         y = Y;
27         z = Z;
28         xp = Xp;
29         yp = Yp;
30         zp = Zp;
31     }
32
33
34     @Override
35     public String toString() {
36         return "Ray \n" + "     x " + x + "\n" + "      y " + y + "\n" + "      z " + z
37                 + "\n" + "      xp " + xp + "\n" + "    yp " + yp + "\n" + "    zp " + zp
38                 + "\n";
39     }
40 }