MultipleObjects

MultipleObjects - trace_ray public RGBColor trace_ray(Ray...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
package raytracer.tracers; import raytracer.utility.*; import raytracer.world.World; public class MultipleObjects extends Tracer { // -------------------------------------------------------------------- default constructor public MultipleObjects() { super(); } // -------------------------------------------------------------------- constructor public MultipleObjects(World world) { super(world); } // --------------------------------------------------------------------
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: trace_ray public RGBColor trace_ray(Ray ray) { ShadeRec sr = world_ptr.hit_bare_bones_objects(ray); if (sr.hit_an_object) return (sr.color); else return (world_ptr.background_color); } @Override public RGBColor trace_ray(Ray ray, int depth) { ShadeRec sr = world_ptr.hit_bare_bones_objects(ray); if (sr.hit_an_object) return (sr.color); else return (world_ptr.background_color); } }...
View Full Document

This note was uploaded on 02/19/2010 for the course CS 390 taught by Professor Hu during the Spring '10 term at Westminster UT.

Ask a homework question - tutors are online