summaryrefslogtreecommitdiff
path: root/object.h
diff options
context:
space:
mode:
Diffstat (limited to 'object.h')
-rw-r--r--object.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/object.h b/object.h
index b6e2bbd..26548c5 100644
--- a/object.h
+++ b/object.h
@@ -5,12 +5,10 @@
#ifndef RT_OBJECT_H
#define RT_OBJECT_H
-#include "hitlist.h"
-#include "viewport.h"
-#include "timer.h"
-#include "bitmap.h"
+#include "material.h"
#include "ray.h"
#include "vec.h"
+#include "bitmap.h"
#include <cstdlib>
#include <memory>
#include <limits>
@@ -18,6 +16,8 @@
#include <iostream>
#include <cstdint>
+class material;
+
class object {
public:
// Will the given ray hit. Returns time t if hits in range [t1, t2].
@@ -36,6 +36,10 @@ public:
// subclasses must have virtual destructors
virtual ~object() = default;
+
+ // Get this object's material.
+ virtual material &material() const = 0;
};
+
#endif //RT_OBJECT_H