Raytracer
Loading...
Searching...
No Matches
Ray.hpp
1#include "Common.hpp"
2#include "utils/VecN.hpp"
3
4#ifndef __RAY_HPP__
5 #define __RAY_HPP__
6
7namespace Raytracer::Core
8{
9 class Ray {
10 private:
11 Utils::Point3 _origin;
12 Utils::Vec3 _direction;
13 double _time;
14
15 public:
16 Ray() = default;
17 Ray(const Utils::Point3 &origin, const Utils::Vec3 &direction,
18 double time = 0.0);
19 Utils::Point3 at(double t) const;
20 GET_SET(Utils::Point3, origin)
21 GET_SET(Utils::Vec3, direction)
22 GET_SET(double, time)
23 };
24} // namespace Raytracer::Core
25
26#endif /* __RAY_HPP__ */
Definition Ray.hpp:9
Utils::Point3 at(double t) const
Get the origin of the ray.
Definition Ray.cpp:28
Definition VecN.hpp:40