summaryrefslogtreecommitdiffstats
path: root/tests/libdimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-10-20 18:52:59 -0400
committerTavian Barnes <tavianator@gmail.com>2010-10-20 18:52:59 -0400
commit59481d4e4421cc7d0610d49c6dbec720de1f11ea (patch)
tree7d72d30229073c3997b5fe89faa657e2430f8102 /tests/libdimension
parent13f34392c72f99134342b5a58b14c02e07f0e67b (diff)
downloaddimension-59481d4e4421cc7d0610d49c6dbec720de1f11ea.tar.xz
Add cone support to libdimension.
Diffstat (limited to 'tests/libdimension')
-rw-r--r--tests/libdimension/render.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/libdimension/render.c b/tests/libdimension/render.c
index 3f4525d..0a50ed1 100644
--- a/tests/libdimension/render.c
+++ b/tests/libdimension/render.c
@@ -106,16 +106,29 @@ 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(false);
+ dmnsn_object *cylinder = dmnsn_new_cylinder(0.1, 0.1, false);
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.25, 0.1))
+ dmnsn_scale_matrix(dmnsn_new_vector(1.0, 1.25, 1.0))
);
cylinder->texture = dmnsn_new_texture();
cylinder->texture->pigment = dmnsn_new_solid_pigment(dmnsn_red);
dmnsn_array_push(scene->objects, &cylinder);
+ dmnsn_object *cone = dmnsn_new_cylinder(0.1, 0.0, true);
+ cone->trans =
+ dmnsn_matrix_mul(
+ dmnsn_rotation_matrix(dmnsn_new_vector(dmnsn_radians(-45.0), 0.0, 0.0)),
+ dmnsn_matrix_mul(
+ dmnsn_translation_matrix(dmnsn_new_vector(0.0, 1.375, 0.0)),
+ dmnsn_scale_matrix(dmnsn_new_vector(1.0, 0.125, 1.0))
+ )
+ );
+ cone->texture = dmnsn_new_texture();
+ cone->texture->pigment = dmnsn_new_solid_pigment(dmnsn_red);
+ dmnsn_array_push(scene->objects, &cone);
+
return scene;
}