mirror of
https://github.com/vonhyou/ray-tracer-comp371.git
synced 2025-06-08 15:31:59 +00:00
design ray class
This commit is contained in:
parent
2f7a9f4cbd
commit
49fd22cbb6
1 changed files with 21 additions and 0 deletions
21
src/Ray.h
Normal file
21
src/Ray.h
Normal 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_
|
Loading…
Add table
Add a link
Reference in a new issue