diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-02-25 15:28:23 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-02-25 15:28:23 -0500 |
commit | b27ad82573bc70d84bc4213ba00771f4746b36bc (patch) | |
tree | 6d4b6390da29cb29759b4d469c6869d6180e0680 /libdimension/sphere.c | |
parent | 9e117cb576f55e3215cb46dcd8d2ad3b52124eb4 (diff) | |
download | dimension-b27ad82573bc70d84bc4213ba00771f4746b36bc.tar.xz |
Add the dmnsn_interior* to dmnsn_intersection*.
Diffstat (limited to 'libdimension/sphere.c')
-rw-r--r-- | libdimension/sphere.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libdimension/sphere.c b/libdimension/sphere.c index c238192..d994248 100644 --- a/libdimension/sphere.c +++ b/libdimension/sphere.c @@ -69,10 +69,11 @@ dmnsn_sphere_intersection_fn(const dmnsn_object *sphere, dmnsn_line line) if (t >= 0.0) { intersection = dmnsn_new_intersection(); - intersection->ray = line; - intersection->t = t; - intersection->normal = dmnsn_line_point(line, t); - intersection->texture = sphere->texture; + intersection->ray = line; + intersection->t = t; + intersection->normal = dmnsn_line_point(line, t); + intersection->texture = sphere->texture; + intersection->interior = sphere->interior; /* Flip the normal if we're inside the sphere */ if (dmnsn_vector_dot(line.n, intersection->normal) > 0.0) |