The following 56 words could not be found in the dictionary of 615 words (including 615 LocalSpellingWords) and are highlighted below:

all   and   Assignment   be   builds   by   can   class   const   Dealing   declare   defines   Discussion   easiest   example   For   get   However   if   implementation   in   In   Insersect   int   integer   interface   internal   Intersect   lazy   members   methods   modified   modify   mutable   needs   of   out   part   Pbrt   Primitive   problem   Question   solution   structures   that   The   the   these   this   to   tree   updated   wanted   with   you   your  


Assignment 2 Discussion and FAQ

Question 1. Dealing with 'const'

Pbrt's Primitive interface defines the Insersect and IntersectP methods as const methods. However, your lazy K-D tree needs to modify internal structures as it builds out the tree as part of the implementation of these methods. The easiest solution to this problem is to declare all members of your lazy K-D tree class that get updated in these methods as mutable structures. In C++, mutable class members can be modified by const methods. For example, if you wanted a mutable integer foo, you'd declare it as:

mutable int foo;