/** Light source * Simple version, color and direction only * (could be point in scene instead, may complicate shadow rays in grid?) * @author: Phil Gage */ class Light { // public static Color background = new Color(0.0,0.0,0.5); //sky? public static Color ambient = new Color(0.0,0.0,0.0); //? Color color; Vector3 direction; // Point location; // or position? Light (Vector3 direction, Color color) { // Light (Point location, Color color) { this.color = new Color(color); this.direction = new Vector3(direction); this.direction.normalize(); // this.location = new Point(location); } /** Override to change light for animation frames */ boolean animate (int frame) { // hard to do with Jevans alg, slow complete redraw? // or put light inside grid and set voxel changed flags? return false; // return true if object changed } }