-
Notifications
You must be signed in to change notification settings - Fork 944
Closed
Milestone
Description
Currently in material.h
we have a forward declaration of class hit_record
. However, this line is unnecessary because in main.cc
, we include hittable.h
(where hit_record
is defined) before we include material.h
. Further, the class declaration is insufficient, as there are multiple member dereferences throughout material.h
, which requires the hit_record
definition.
The solution to this is to include hittable.h
in the beginning of material.h
. The current situation likely came about as I wrestled with the potential circular dependency where material classes needed access to hit_record
, and hit_record
has a shared pointer to a material
instance. The current class material
declaration at the top of hittable.h
should be sufficient to address this.