mkeeter / fidget

blazing fast implicit surface evaluation
Mozilla Public License 2.0
128 stars 11 forks source link

Passing variables to meshing #183

Open waywardmonkeys opened 3 days ago

waywardmonkeys commented 3 days ago

When using code similar to https://docs.rs/fidget/latest/fidget/mesh/index.html, if your shape needs variables, how can you pass them through?

There doesn't seem to be a way to get them to an eval call.

I guess the same is true for the render APIs?

waywardmonkeys commented 3 days ago

In this case, we're constructing the shape via:

        let radius_var = Var::new();
        let tree = (x.square() + y.square() + z.square()).sqrt() - radius_var;
        let shape = VmShape::from(tree);
mkeeter commented 23 hours ago

I'm working on fixing both this and #182 with a new ShapeVars object, stay tuned...