summaryrefslogtreecommitdiff
path: root/src/sphere.cuh
diff options
context:
space:
mode:
authorbrett weiland <brettsweiland@gmail.com>2024-06-01 01:36:18 -0500
committerbrett weiland <brettsweiland@gmail.com>2024-06-01 01:36:18 -0500
commitb0dd97ee6bf8d5daa587da40ad941efac68152df (patch)
treef162d32767e0b0f84bed284f6e8ab2c5309ff248 /src/sphere.cuh
parent093200a449ea38952de52012e324036c106e294b (diff)
got raycasting laid out
Diffstat (limited to 'src/sphere.cuh')
-rw-r--r--src/sphere.cuh17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/sphere.cuh b/src/sphere.cuh
new file mode 100644
index 0000000..0d228ff
--- /dev/null
+++ b/src/sphere.cuh
@@ -0,0 +1,17 @@
+#ifndef SPHERE_H
+#define SPHERE_H
+
+#include "render_object.cuh"
+#include "common.cuh"
+
+class Sphere : public Render_object {
+ using Render_object::Render_object;
+ public:
+ __device__ T distance_estimator(vect3 point) const;
+ __device__ Color get_color(struct Ray ray) const;
+ private:
+ T r_ = 1;
+};
+
+
+#endif