//---------------------------------------------------------------------------- // William Baxter III's Ray Tracer // // Project for Comp 238, Raster Graphics // University of North Carolina at Chapel Hill // // $Id:$ //---------------------------------------------------------------------------- #ifndef WB3POINTLIGHT_H #define WB3POINTLIGHT_H #include #include "ray3f.hpp" #include "wb3Light.hpp" //---------------------------------------------------------------------------- class wb3Scene; class wb3Artifact; class wb3PointLight : public wb3Light { public: wb3PointLight(const Vec3f& positon = Vec3f::ZERO); wb3PointLight(const Vec3f& color, const Vec3f& positon); ~wb3PointLight() {}; const Vec3f& GetPosition() const; void SetPosition(const Vec3f& pos); virtual void Contribute( const wb3Scene *scene, const wb3Artifact *hit, const Ray3f& r, const Vec3f &isect, const Vec3f &N, Vec3f& color) const; protected: Vec3f m_pos; }; //---------------------------------------------------------------------------- inline const Vec3f& wb3PointLight::GetPosition() const { return m_pos; } //---------------------------------------------------------------------------- inline void wb3PointLight::SetPosition(const Vec3f& pos) { m_pos = pos; } //---------------------------------------------------------------------------- #endif