12 Ray(const Vec3f& org, const Vec3f& dir);
15 Ray& operator=(const Ray& r);
17 const Vec3f& origin() const;
18 const Vec3f& direction() const;
20 void setHit(Primitive * p);
22 unsigned int recursionDepth() const;
24 void setOrigin(const Vec3f& o);
25 void setDir(const Vec3f& d);
27 void setRecursionDepth(unsigned int i);
30 Vec3f m_org; //!< ray origin
31 Vec3f m_dir; //!< ray direction
32 float m_t; //!< current/maximum hit distance
34 unsigned int m_level; //!< level of recursion
39 inline std::ostream &operator<<(std::ostream &o,const Ray &ray)
40 { o << "Ray [" << ray.origin() << "+t*" << ray.direction() << "]"; return o; }