From 093200a449ea38952de52012e324036c106e294b Mon Sep 17 00:00:00 2001 From: Brett Weiland Date: Mon, 27 May 2024 20:56:59 -0500 Subject: boutta switch away from templates --- sphere.cuh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 sphere.cuh (limited to 'sphere.cuh') diff --git a/sphere.cuh b/sphere.cuh new file mode 100644 index 0000000..33c77f2 --- /dev/null +++ b/sphere.cuh @@ -0,0 +1,17 @@ +#ifndef SPHERE_H +#define SPHERE_H +#include "render_object.cuh" +template class sphere : public render_object { + using render_object::render_object; + using T3 = typename vect_t3::vect_t; + public: + __device__ T distance_estimator(T3 point) const; + private: + T r_ = 1; +}; + +template __device__ T sphere::distance_estimator(T3 point) const { + return length(point) - r_; +} + +#endif -- cgit v1.2.3