code for assignment 2
[MicroTrace.git] / Ray.hxx
diff --git a/Ray.hxx b/Ray.hxx
index a432830..f37425c 100644 (file)
--- a/Ray.hxx
+++ b/Ray.hxx
@@ -3,6 +3,8 @@
 
 #include "Vec3f.hxx"
 
+class Primitive;
+
 class Ray
 {
 public:
@@ -15,10 +17,22 @@ public:
   const Vec3f& origin() const;
   const Vec3f& direction() const;
   float t() const;
+  Primitive* hit();
+  unsigned int recursionDepth() const;
+
+  void setOrigin(const Vec3f& o);
+  void setDir(const Vec3f& d);
+  void setT(float t);
+  void setRecursionDepth(unsigned int i);
+
 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
+  
+  Primitive* m_hit;
 };
 
 inline std::ostream &operator<<(std::ostream &o,const Ray &ray)
This page took 0.020738 seconds and 4 git commands to generate.