3d_fractals_cuda/src/sphere.cu
2024-06-01 16:58:25 -05:00

10 lines
221 B
Plaintext

#include "sphere.cuh"
__device__ T Sphere::distance_estimator(vect3 point) const {
return length(this->pos_ - point) - r_;
}
__device__ Color Sphere::get_color(struct Ray ray) const {
return normalize(ray.start);
}