From 49fd22cbb60d3b1e0e009a8c3e78aa8217aac9c5 Mon Sep 17 00:00:00 2001 From: vonhyou Date: Sun, 18 Feb 2024 23:50:10 -0500 Subject: [PATCH] design ray class --- src/Ray.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/Ray.h diff --git a/src/Ray.h b/src/Ray.h new file mode 100644 index 0000000..9fe5b37 --- /dev/null +++ b/src/Ray.h @@ -0,0 +1,21 @@ +#ifndef RAY_H_ +#define RAY_H_ + +#include + +using Eigen::Vector3f; + +class Ray { +public: + Ray(const Vector3f &o, const Vector3f &d) : origin(o), direction(d) {} + +private: + Vector3f origin; + Vector3f direction; + +public: + Vector3f getOrigin() const; + Vector3f getDirection() const; +}; + +#endif // !RAY_H_