private Color getReflectionColor(Thing thing, Vector pos, Vector normal, Vector rd, Scene scene, double depth) { return Color.scale(thing.surface.reflect(pos), this.traceRay(new Ray (pos, rd), scene, depth + 1)); }
private Color getNaturalColor(Thing thing, Vector pos, Vector norm, Vector rd, Scene scene) { this.thing = thing; this.pos = pos; this.norm = norm; this.rd = rd; this.scene = scene; return Reduce(scene.lights, Color.defaultColor); }
public Intersection(Thing thing, Ray ray, double dist) { this.thing = thing; this.ray = ray; this.dist = dist; }