void setHitColor(ofColor c) {
//Use of undeclared identifier
hitColor = c;
}
tries to define a function within global scope. This function tries to assign argument c
to unknown (undeclared) hitColor
. To define a member function you must prefix it with name of the class so that compiler will be able to associate it with the definition of your class:
void ImageRayTracer::setHitColor(ofColor c) {
//Use of undeclared identifier
hitColor = c;
}