summaryrefslogtreecommitdiffstats
path: root/libdimension/scene.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-06-13 22:55:48 +0000
committerTavian Barnes <tavianator@gmail.com>2009-06-13 22:55:48 +0000
commit836d8f7138633517c6e503520f7be354ac32d836 (patch)
tree9e6947fdabd51dd901a1f4106e2e16c989deffef /libdimension/scene.c
parent042ef96e2c004a963451edc9efa7074316a360c4 (diff)
downloaddimension-836d8f7138633517c6e503520f7be354ac32d836.tar.xz
Properly forward-declare dmnsn_object and dmnsn_camera, and take a
transformation matrix in dmnsn_new_perspective_camera().
Diffstat (limited to 'libdimension/scene.c')
-rw-r--r--libdimension/scene.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdimension/scene.c b/libdimension/scene.c
index 780f8c6..4a84823 100644
--- a/libdimension/scene.c
+++ b/libdimension/scene.c
@@ -50,8 +50,8 @@ dmnsn_raytrace_scene(dmnsn_scene *scene)
for (i = 0; i < scene->canvas->x; ++i) {
for (j = 0; j < scene->canvas->y; ++j) {
- ray = (*scene->camera->ray_fn)(scene->canvas, i, j);
- if ((*object->intersections_fn)(ray)->length > 0) {
+ ray = (*scene->camera->ray_fn)(scene->camera, scene->canvas, i, j);
+ if ((*object->intersections_fn)(object, ray)->length > 0) {
dmnsn_set_pixel(scene->canvas, i, j,
dmnsn_color_from_XYZ(dmnsn_whitepoint));
} else {