summaryrefslogtreecommitdiffstats
path: root/tests/libdimension/render.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-08-14 17:39:16 -0600
committerTavian Barnes <tavianator@gmail.com>2010-08-14 17:39:16 -0600
commitea6ea322433b583df411d4a5643115e5cff7ebd5 (patch)
tree3a9729b35bc9785297ad302131490e1ca32f63ac /tests/libdimension/render.c
parentdade1a033957df08777904cfbc33884f1bab9aab (diff)
downloaddimension-ea6ea322433b583df411d4a5643115e5cff7ebd5.tar.xz
Add cylinders to libdimension.
Diffstat (limited to 'tests/libdimension/render.c')
-rw-r--r--tests/libdimension/render.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/libdimension/render.c b/tests/libdimension/render.c
index 29e733e..7a55320 100644
--- a/tests/libdimension/render.c
+++ b/tests/libdimension/render.c
@@ -106,6 +106,16 @@ dmnsn_new_test_scene(void)
plane->texture->pigment = dmnsn_new_solid_pigment(dmnsn_white);
dmnsn_array_push(scene->objects, &plane);
+ dmnsn_object *cylinder = dmnsn_new_cylinder();
+ cylinder->trans =
+ dmnsn_matrix_mul(
+ dmnsn_rotation_matrix(dmnsn_new_vector(dmnsn_radians(-45.0), 0.0, 0.0)),
+ dmnsn_scale_matrix(dmnsn_new_vector(0.1, 1.5, 0.1))
+ );
+ cylinder->texture = dmnsn_new_texture();
+ cylinder->texture->pigment = dmnsn_new_solid_pigment(dmnsn_red);
+ dmnsn_array_push(scene->objects, &cylinder);
+
return scene;
}