ShadeRec - constructor ShadeRec:ShadeRec(World& wr...

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

View Full Document Right Arrow Icon
// this file contains the definition of the class ShadeRec / // there is no default constructor as the World reference always has to be initialised // there is also no assignment operator as we don't want to assign the world // 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 / #include "Constants.h" #include "ShadeRec.h"
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: # // ------------------------------------------------------------------ constructor / ShadeRec::ShadeRec(World& wr) : hit_an_object(false), local_hit_point(), normal(), color(black), w(wr) {} { // ------------------------------------------------------------------ copy constructor c ShadeRec::ShadeRec(const ShadeRec& sr) : hit_an_object(sr.hit_an_object), local_hit_point(sr.local_hit_point), color(sr.color), w(sr.w) {} {...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online