RobinTrace
ray.h
Go to the documentation of this file.
1 
2 #ifndef RAY_H
3 #define RAY_H
4 
5 #include "base/Vec3.h"
6 #include <iostream>
7 
9 class ray {
10  public:
15  Vec3 p;
16 
23 
36  int code;
37 
39  ray ();
41  ray (Vec3 _p, Vec3 _v);
43  bool is_valid() const;
45  friend std::ostream& operator<< (std::ostream &out, const ray &r);
46 };
47 
48 #endif // RAY_H
Eigen::Vector3d Vec3
Definition: Vec3.h:11
Class for individual rays.
Definition: ray.h:9
bool is_valid() const
Check whether the ray holds valid data.
Definition: ray.cpp:22
friend std::ostream & operator<<(std::ostream &out, const ray &r)
Printer.
Definition: ray.cpp:26
int code
Status code.
Definition: ray.h:36
Vec3 p
Point component.
Definition: ray.h:15
ray()
Default constructor.
Definition: ray.cpp:5
Vec3 v
Orientation component.
Definition: ray.h:22