#include "Vec3f.hxx"
+class Primitive;
+
class Ray
{
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)