a432830887aafa0aca3c79284286d753f96dd1a7
[MicroTrace.git] / Ray.hxx
1 #ifndef RAY_HXX
2 #define RAY_HXX
3
4 #include "Vec3f.hxx"
5
6 class Ray
7 {
8 public:
9 Ray();
10 Ray(const Vec3f& org, const Vec3f& dir);
11 ~Ray();
12 Ray(const Ray& r);
13 Ray& operator=(const Ray& r);
14
15 const Vec3f& origin() const;
16 const Vec3f& direction() const;
17 float t() const;
18 private:
19 Vec3f m_org; //!< ray origin
20 Vec3f m_dir; //!< ray direction
21 float m_t; //!< current/maximum hit distance
22 };
23
24 inline std::ostream &operator<<(std::ostream &o,const Ray &ray)
25 { o << "Ray [" << ray.origin() << "+t*" << ray.direction() << "]"; return o; }
26
27 #endif
This page took 0.041092 seconds and 3 git commands to generate.