summaryrefslogtreecommitdiffstats
path: root/tests/raytrace.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-06-14 01:48:03 +0000
committerTavian Barnes <tavianator@gmail.com>2009-06-14 01:48:03 +0000
commit355ab840bbfe94604c5a86afccf23efacdbe97d7 (patch)
tree35083f4cb0fed99497c2b566ed3b7aecd43d998d /tests/raytrace.c
parent30cf67b4ff1def502b3e01b6b10d2a8b0f737dd4 (diff)
downloaddimension-355ab840bbfe94604c5a86afccf23efacdbe97d7.tar.xz
New dmnsn_scale_matrix() function.
Diffstat (limited to 'tests/raytrace.c')
-rw-r--r--tests/raytrace.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/raytrace.c b/tests/raytrace.c
index 0cc2876..89a0fcd 100644
--- a/tests/raytrace.c
+++ b/tests/raytrace.c
@@ -34,7 +34,14 @@ int main() {
scene = dmnsn_new_scene();
scene->canvas = dmnsn_new_canvas(768, 480);
scene->camera = dmnsn_new_perspective_camera(
- dmnsn_translation_matrix(dmnsn_vector_construct(0.0, 0.0, -3.0))
+ dmnsn_matrix_mul(
+ dmnsn_translation_matrix(dmnsn_vector_construct(0.0, 0.0, -3.0)),
+ dmnsn_scale_matrix(
+ dmnsn_vector_construct(
+ ((double)scene->canvas->x)/scene->canvas->y, 1.0, 1.0
+ )
+ )
+ )
);
sRGB.R = 0.0;