summaryrefslogtreecommitdiff
path: root/hitlist.h
diff options
context:
space:
mode:
authorKeuin <[email protected]>2022-04-14 20:55:49 +0800
committerKeuin <[email protected]>2022-04-14 20:55:49 +0800
commit5f9a664b0f0955cf3e49b5da9ce6d5835cf5f73f (patch)
tree0caa3f8e5859fa2a689e685641d6bf24c508ea8a /hitlist.h
parentab29b428bdaa9f5a4691c9896b0fcaa9d7368225 (diff)
Make hitlist<T> no longer a generic class (but hitlist::color<T>(...) is now a generic member function).
Diffstat (limited to 'hitlist.h')
-rw-r--r--hitlist.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/hitlist.h b/hitlist.h
index 02c942a..8625cb5 100644
--- a/hitlist.h
+++ b/hitlist.h
@@ -28,7 +28,6 @@
//#define DIFFUSE_HEMI // Diffuse with hemispherical scattering, i.e. using a normalized random vector within the hemisphere
// A world, T is color depth
-template<typename T>
class hitlist {
std::vector<std::shared_ptr<object>> objects;
@@ -43,6 +42,7 @@ public:
}
// Given a ray, compute the color.
+ template<typename T>
pixel<T> color(ray3d r, random_uv_gen_3d &ruvg, uint_fast32_t max_recursion_depth = 64) const {
assert(r.decay() == 1.0);
while (max_recursion_depth-- > 0) {
@@ -114,6 +114,4 @@ public:
}
};
-using hitlist8b = hitlist<uint8_t>;
-
#endif //RT_HITLIST_H