/*
- * Sixth 3D engine. Copyright ©2012-2019, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 3 of the GNU Lesser General Public License
- * or later as published by the Free Software Foundation.
- *
+ * Sixth 3D engine. Author: Svjatoslav Agejenko.
+ * This project is released under Creative Commons Zero (CC0) license.
*/
-
package eu.svjatoslav.sixth.e3d.renderer.octree;
import eu.svjatoslav.sixth.e3d.renderer.octree.raytracer.Ray;
public class OctreeVolume {
+ // cell is not hit by the ray
public static final int TRACE_NO_HIT = -1;
- /**
- * Single solid color.
- */
+
+ // solid cell (contains color and illumination)
private static final int CELL_STATE_SOLID = -2;
+
+ // unused cell
private static final int CELL_STATE_UNUSED = -1;
final LineAppearance factory = new LineAppearance();
+
+
public int ce1[];
public int ce2[];
public int ce3[];
}
/**
- * @return intersecting cell pointer or -1 if no cell in intersecting this
- * ray.
+ * Trace ray through the world and return pointer to intersecting cell.
+ *
+ * @return pointer to intersecting cell or TRACE_NO_HIT if no intersection.
*/
public int traceCell(final int cellX, final int cellY, final int cellZ,
final int cellSize, final int pointer, final Ray ray) {