(Hit i, Ray ray)
| 42 | return (t1 > 0 ? t1 : t2); |
| 43 | } |
| 44 | public Hit intersect(Hit i, Ray ray) { |
| 45 | double l = ray_sphere(ray); |
| 46 | if (l >= i.lambda) return i; |
| 47 | Vec n = add(ray.orig, sub(scale(l, ray.dir), center)); |
| 48 | return new Hit(l, unitise(n)); |
| 49 | } |
| 50 | } |
| 51 | class Group extends Scene { |
| 52 | public Sphere bound; |
nothing calls this directly
no test coverage detected