X-Git-Url: http://git.rohieb.name/MicroTrace.git/blobdiff_plain/0b29fae9afb220c13cc0c48c91031f0798b91ec7..dfcd78f3f458d8c4bfbc27b08ced5aae0f2e57d4:/Ray.hxx?ds=sidebyside diff --git a/Ray.hxx b/Ray.hxx index 0b4e796..0ec9f76 100644 --- a/Ray.hxx +++ b/Ray.hxx @@ -9,29 +9,32 @@ class Ray { public: Ray(); - Ray(const Vec3f& org, const Vec3f& dir); + Ray(const Vec3f& org, const Vec3f& dir, unsigned int recursion_level = 0); ~Ray(); Ray(const Ray& r); Ray& operator=(const Ray& r); - + const Vec3f& origin() const; const Vec3f& direction() const; float t() const; - void setHit(Primitive * p); Primitive* hit(); unsigned int recursionDepth() const; + float indexOfRefraction() const; void setOrigin(const Vec3f& o); void setDir(const Vec3f& d); void setT(float t); + void setHit(Primitive* p); void setRecursionDepth(unsigned int i); + void setIndexOfRefraction(float ior); private: Vec3f m_org; //!< ray origin Vec3f m_dir; //!< ray direction float m_t; //!< current/maximum hit distance - + unsigned int m_level; //!< level of recursion + float m_density; //!< index of refraction Primitive* m_hit; };