ShadeRec - package raytracer.utility; import...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
package raytracer.utility; import raytracer.world.World; //There is no default constructor as the World reference has to be initialised //There is also no assignment operator as we don't want to assign the world anywhere //The copy constructor only copies the world reference //The ray tracer is written so that new ShadeRec objects are always constructed //using the first constructor or the copy constructor public class ShadeRec { public boolean hit_an_object; // did the ray hit an object? // public Material material; // pointer to the nearest object's material public Point3D hit_point; // world coordinates of intersection public Point3D local_hit_point; // world coordinates of hit point on untransformed object (used for texture transformations) public Normal normal; // normal at hit point public Ray ray; // required for specular highlights and area lights public int depth; // recursion depth public double t; // ray parameter public float u; // texture coordinate public float v; // texture
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the 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.

Page1 / 2

ShadeRec - package raytracer.utility; import...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online