1 #ifndef MSP_GEOMETRY_RAY_H_
2 #define MSP_GEOMETRY_RAY_H_
4 #include <msp/linal/vector.h>
9 template<typename T, unsigned D>
13 LinAl::Vector<T, D> start;
14 LinAl::Vector<T, D> direction;
18 Ray(const LinAl::Vector<T, D> &, const LinAl::Vector<T, D> &);
20 const LinAl::Vector<T, D> &get_start() const { return start; }
21 const LinAl::Vector<T, D> &get_direction() const { return direction; }
24 template<typename T, unsigned D>
30 template<typename T, unsigned D>
31 Ray<T, D>::Ray(const LinAl::Vector<T, D> &s, const LinAl::Vector<T, D> &d):
33 direction(normalize(d))
36 } // namespace Geometry