Ray Tracer  2020
Object.h
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef OBJECT_H_INCLUDED
4 #define OBJECT_H_INCLUDED
5 
6 #include "Material.h"
7 #include "Ray.h"
8 #include "RayIntersection.h"
9 #include "Transform.h"
10 
11 #include <vector>
12 
35 class Object {
36 public:
37 
50  virtual std::vector<RayIntersection> intersect(const Ray& ray) const = 0;
51 
53 
55 
56 protected:
57 
59  Object();
60 
65  Object(const Object& object);
66 
68  virtual ~Object();
69 
75  Object& operator=(const Object& object);
76 
77 };
78 
79 #endif
Material class header file.
Ray class header file.
RayIntersection class header file.
Transform class header file.
Class defining Material colours and properties.
Definition: Material.h:29
Abstract base class for Objects.
Definition: Object.h:35
virtual std::vector< RayIntersection > intersect(const Ray &ray) const =0
Object-Ray intersection computation.
Object & operator=(const Object &object)
Object assignment operator.
Definition: Object.cpp:15
Material material
The colour and reflectance properties of the Object.
Definition: Object.h:54
Object()
Object default constructor.
Definition: Object.cpp:3
Transform transform
A 3D transformation to apply to this Object.
Definition: Object.h:52
virtual ~Object()
Object destructor.
Definition: Object.cpp:11
Rays as a starting Point and Direction.
Definition: Ray.h:20
Class for Transform objects.
Definition: Transform.h:29