//---------------------------------------------------------------------------- // William Baxter III's Ray Tracer // // Project for Comp 238, Raster Graphics // University of North Carolina at Chapel Hill // // $Id:$ //---------------------------------------------------------------------------- #ifndef WB3TRACINGSHADER_H #define WB3TRACINGSHADER_H //---------------------------------------------------------------------------- #include "wb3Shader.hpp" #include "wb3Artifact.hpp" #include "wb3Scene.hpp" // The Tracing shader does classic raytracing with reflections and // refractions. class wb3TracingShader : public wb3Shader { public: wb3TracingShader(); ~wb3TracingShader(); virtual void Shade(const wb3Scene* scene, const wb3Artifact* from, const wb3Artifact* hit, const Ray3f& r, const Vec3f &isect, Vec3f& color, Vec3f& attenuation, int hits) const; void SetCutoff(float cutoff); float GetCutoff(void) const; protected: float m_fCutoffAtten; }; //---------------------------------------------------------------------------- inline void wb3TracingShader::SetCutoff(float cutoff) { m_fCutoffAtten = cutoff; } //---------------------------------------------------------------------------- inline float wb3TracingShader::GetCutoff(void) const { return m_fCutoffAtten; } //---------------------------------------------------------------------------- #endif