summaryrefslogtreecommitdiffstats
path: root/dimension
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 /dimension
parent13f34392c72f99134342b5a58b14c02e07f0e67b (diff)
downloaddimension-59481d4e4421cc7d0610d49c6dbec720de1f11ea.tar.xz
Add cone support to libdimension.
Diffstat (limited to 'dimension')
-rw-r--r--dimension/realize.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dimension/realize.c b/dimension/realize.c
index 15eb334..dc315d8 100644
--- a/dimension/realize.c
+++ b/dimension/realize.c
@@ -863,12 +863,13 @@ dmnsn_realize_cylinder(dmnsn_astnode astnode)
double theta1 = dmnsn_vector_axis_angle(dmnsn_y, dir, dmnsn_x);
double theta2 = dmnsn_vector_axis_angle(dmnsn_y, dir, dmnsn_z);
- dmnsn_object *cylinder = dmnsn_new_cylinder(dmnsn_realize_integer(open));
+ dmnsn_object *cylinder
+ = dmnsn_new_cylinder(r, r, dmnsn_realize_integer(open));
/* Transformations: lift the cylinder to start at the origin, scale, rotate,
and translate properly */
cylinder->trans = dmnsn_translation_matrix(dmnsn_new_vector(0.0, 1.0, 0.0));
cylinder->trans = dmnsn_matrix_mul(
- dmnsn_scale_matrix(dmnsn_new_vector(r, l/2.0, r)),
+ dmnsn_scale_matrix(dmnsn_new_vector(1.0, l/2.0, 1.0)),
cylinder->trans
);
cylinder->trans = dmnsn_matrix_mul(