Ray Tracer  2020
RayIntersection.h
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef RAY_INTERSECTION_H_INLUCDED
4 #define RAY_INTERSECTION_H_INCLUDED
5 
6 #include "Point.h"
7 #include "Material.h"
8 #include "Normal.h"
9 
10 #include <memory>
11 
28 
29 public:
30 
34  double distance;
35 
46  bool operator<(const RayIntersection& ri) {
47  return distance < ri.distance;
48  }
49 
50 };
51 
52 #endif // RAY_INTERSECTION_H_INCLUDED
Material class header file.
Direction class header file.
Point class header file.
Class defining Material colours and properties.
Definition: Material.h:29
Class for Normal Vectors.
Definition: Normal.h:24
Class for Point Vectors.
Definition: Point.h:22
Class to store the intersection of a Ray and an Object.
Definition: RayIntersection.h:27
Normal normal
The Normal at the Point of intersection.
Definition: RayIntersection.h:32
Point point
The Point at which a Ray intersects with an Object.
Definition: RayIntersection.h:31
bool operator<(const RayIntersection &ri)
Less-than comparison for RayIntersection.
Definition: RayIntersection.h:46
Material material
The Material of the Object that is hit.
Definition: RayIntersection.h:33
double distance
The distance along the Ray to the intersection Point.
Definition: RayIntersection.h:34