From b40876a197d0965e2bac19d19f28ac1c4c5a29ad Mon Sep 17 00:00:00 2001 From: Chris Hodapp Date: Sun, 29 Dec 2019 22:46:58 -0500 Subject: [PATCH] Add some pesky TODOs --- src/main.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 52bfc61..c06ecb0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -39,8 +39,14 @@ fn test_rule(_v: Vec) -> Vec { Matrix4::from_translation(vec3(1.5, 0.0, 0.0)) * Matrix4::from_scale(0.6); let r = Rule::Recurse(test_rule); - RuleStep { geom: mesh.clone(), rule: Box::new(r), xform: m } + let mut m2 = mesh.clone(); + m2.apply_transformation(m); + RuleStep { geom: m2, rule: Box::new(r), xform: m } }; + // TODO: Why is 'mesh' present in each RuleStep? This is just + // duplicate geometry! Either 'm' applies to 'mesh' (and the + // definition of RuleStep changes) - or 'mesh' needs to already be + // transformed. turns.iter().map(gen_rulestep).collect() } @@ -75,6 +81,8 @@ fn rule_to_mesh(rule: &Rule, xform: Mat4, iter_num: u32) -> Mesh { submesh.apply_transformation(xform); mesh.append(&submesh); + // TODO: I think above is a problem; it accumulates + // submeshes multiple times. } mesh }