#ifndef RAY_HXX
#define RAY_HXX

#include "Vec3f.hxx"

class Primitive; // forward declaration

class Ray
{
public:
	Vec3f      org; // origin
	Vec3f      dir; // direction
	float        t; // current/maximum hit distance
	Primitive *hit; // currently closest primitive
	float      u,v; // barycentric u/v coordinates
};

inline std::ostream &operator<<(std::ostream &o,const Ray &ray)
{ o << "Ray[" << ray.org << "+t*" << ray.dir << "]"; return o; }

#endif
