diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-06-14 19:58:12 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-06-14 19:58:12 +0000 |
commit | 6c88e0028c11721499ef93a6df651df3a41150c3 (patch) | |
tree | 3f33273a350fe80fb6ce05f3ce0b7e6c54993164 /tests | |
parent | 3a8af6f1536d56fcd50a5f0a0cf264aa62a37599 (diff) | |
download | dimension-6c88e0028c11721499ef93a6df651df3a41150c3.tar.xz |
Use z-index coloring for ray-tracing.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/raytrace.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/raytrace.c b/tests/raytrace.c index ec13782..c8c25cd 100644 --- a/tests/raytrace.c +++ b/tests/raytrace.c @@ -25,7 +25,7 @@ int main() { FILE *file; dmnsn_scene *scene; - dmnsn_object *cube; + dmnsn_object *sphere, *cube; dmnsn_sRGB sRGB; dmnsn_color color; dmnsn_matrix trans; @@ -58,6 +58,10 @@ int main() { color.filter = 0.1; scene->background = color; + sphere = dmnsn_new_sphere(); + sphere->trans = dmnsn_scale_matrix(dmnsn_vector_construct(0.8, 0.8, 0.8)); + dmnsn_array_push(scene->objects, &sphere); + cube = dmnsn_new_cube(); cube->trans = dmnsn_rotation_matrix(dmnsn_vector_construct(0.75, 0.0, 0.0)); dmnsn_array_push(scene->objects, &cube); @@ -68,6 +72,7 @@ int main() { dmnsn_png_write_canvas(scene->canvas, file); dmnsn_delete_cube(cube); + dmnsn_delete_sphere(sphere); dmnsn_delete_perspective_camera(scene->camera); dmnsn_delete_canvas(scene->canvas); dmnsn_delete_scene(scene); |