Esempio n. 1
0
 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));
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 public Intersection(Thing thing, Ray ray, double dist)
 {
     this.thing = thing;
     this.ray = ray;
     this.dist = dist;
 }