summaryrefslogtreecommitdiff
path: root/sphere.cuh
blob: 33c77f20e1b8f483c80cbfd9ee868320a505c473 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef SPHERE_H
#define SPHERE_H
#include "render_object.cuh"
template<class T> class sphere : public render_object<T> {
  using render_object<T>::render_object;
  using T3 = typename vect_t3<T>::vect_t;
  public:
    __device__ T distance_estimator(T3 point) const;
  private:
    T r_ = 1;
};

template <class T> __device__ T sphere<T>::distance_estimator(T3 point) const {
  return length(point) - r_;
}

#endif