design ray class

This commit is contained in:
Shuo Feng 2024-02-18 23:50:10 -05:00
parent 2f7a9f4cbd
commit 49fd22cbb6
Signed by: sfeng
GPG key ID: 1E83AE6CD1C037B1

21
src/Ray.h Normal file
View file

@ -0,0 +1,21 @@
#ifndef RAY_H_
#define RAY_H_
#include <Eigen/Core>
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_