diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-06-13 22:55:48 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-06-13 22:55:48 +0000 |
commit | 836d8f7138633517c6e503520f7be354ac32d836 (patch) | |
tree | 9e6947fdabd51dd901a1f4106e2e16c989deffef /libdimension/scene.c | |
parent | 042ef96e2c004a963451edc9efa7074316a360c4 (diff) | |
download | dimension-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.c | 4 |
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 { |