From ea6ea322433b583df411d4a5643115e5cff7ebd5 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 14 Aug 2010 17:39:16 -0600 Subject: Add cylinders to libdimension. --- tests/libdimension/render.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/libdimension') 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; } -- cgit v1.2.3